Adding separator to datagrid

  • Thread starter Thread starter AriJayaraman
  • Start date Start date
A

AriJayaraman

I am having one datagrid in my page where the user will enter some
information and that information is saved into database.I am adding
separators to my datagrid rows in the pre render event of the
datagrid.It is displaying the separators properly in the web page.

In the save button click, I am looping through the datagrid items and
then saving the values in the database after checking the itemtype of
the rows .The issue is, the separator replaces the actual row at the
specified index and I am getting exception when trying to access the
item values. Not only that, if I check the itemType ,it is giving me
as Item instead of separator.

If anyone shed light on this it will be relief for me.
 
I am having one datagrid in my page where the user will enter some
information and that information is saved into database.I am adding
separators to my datagrid rows in the pre render event of the
datagrid.It is displaying the separators properly in the web page.

In the save button click, I am looping through the datagrid items and
then saving the values in the database after checking the itemtype of
the rows .The issue is, the separator replaces the actual row at the
specified index and I am getting exception when trying to access the
item values. Not only that, if I check the itemType ,it is giving me
as Item instead of separator.

Can you post here a code of the pre render event?

According to MS the ListItemType.Separator should work
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.datagrid.aspx
 
Back
Top