Bill,
Thanks, I have been hiding and showing the columns using the visible property at runtime and this works. I was wondering if there was another way.
I see that I can do the following at runtime, I thought that I could also perhaps define the DataField at runtime.
this.MyTable.Columns[1].HeaderText = "Whatever"
Thanks,
Jerry
>Hi Jerry,
>
>One way is to place all the potential columns in the DataGrid at design time and then at run time, depending on the requirements, hide selected columns using the Visible (=false;) property of the appropriate column(s).
>
>To manipulate data in specific columns of specif rows at run time you can use the ItemDataBound event of the grid.
>
>Bill
>
>>Is there a way to fill in a Gridview's information at runtime in a Asp.Net webform?
>>
>>Depending on the button that was clicked, I would like the Gridview to show certain columns and hide others. What sort of technique works best in this case?
>>
>>Thanks,
>>
>>Jerry
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement