Adding separator to datagrid

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top