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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top