DataGrid displaying hidden EditCommandColumn Values on PostBack

F

freshRecruit

Hi

I am filling a datagrid with values. One of the columns is a EditCommand
Column and an other column is an 'Y/N' Bound column. If the value is 'Y' than
the Edit Command link is displayed if the values is 'N' than the EditCommand
link is not displayed and the value is disabled. I am doing the text setting
and disabling on the ItemDataBound Event of the DataGrid. This datagrid is in
one of the panels(trying to do a tabbed form) which is a usercontrol. When I
click on an other tab and hide this panel and than display it again(on click
of the particular image button) the hidden values are displayed and are
Enabled. The EnableViewState is Enabled.

Please help..I am on a deadline.

Thanks in advance.
 
F

freshRecruit

Thanks I figured it out. I was just doing e.Item.Cells[0].Text for the
editColumn hence the viewState was not saving the values. I had to typecast
it to (LinkButton)(e.Item.Cells[0].Controls[0]).Text and now it is saved.
 

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,776
Messages
2,569,603
Members
45,197
Latest member
ScottChare

Latest Threads

Top