Click here to Skip to main content
15,920,956 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a problem for which i need a solution. Using a class which implements an interface ITemplate, dynamically i am creating GridView Columns at runtime.

The Columns Headers of gridview are also based on database entry in some table.
Now at GridView_RowEditing event, i am clearing GridView columns and re-creating TemplateField with CommandField for that gridview.

But now when in Row_updating event when i am trying to get values from some of TextBoxes or Literal Control it is returning a null value.

Please help me out.
Posted
Comments
walterhevedeich 6-Feb-12 2:30am    
Maybe some of your code snippets will help us identify the problem.
Herman<T>.Instance 6-Feb-12 5:19am    
In your question I read:
' i am clearing GridView columns '
And
'But now when in Row_updating event when i am trying to get values from some of TextBoxes or Literal Control it is returning a null value.'

Do the columns exist before clearing the gridView?
Christian Graus 6-Feb-12 6:43am    
IS this a website, or not ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900