datagrid delete question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,

i've got an asp.net page with a datagrid on it. when i delete all the rows
in the datagrid it just shows the column headers. how are some ways i can
clean that up?

thanks,
rodchar
 
If you mean by "clean up" that you want no headers when the there are no
records left, you could test for the number of items and if there aren't any,
make the datagrid.visible=false.
 
yes that's what i mean. i'll give that a try. are there some other ideas to
handle this? thanks
 
Well u can't clean headers from DataGrid.
The solution from my side is that after confirmation that there is no
record in DataGrid use "ShowHeader" attribute:

dgDataGrid.ShowHeader = false;

and if u apply this thing then plz don't forget to change this property
to "true" when there are items in the DataGrid
 
Back
Top