|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataGrid displaying hidden EditCommandColumn Values on PostBackHi
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. -- GettingHelp/JustTryingToHelp It sounds to me like you need to rebind the datagrid on postback.
Show quoteHide quote "freshRecruit" wrote: > 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. > > -- > GettingHelp/JustTryingToHelp 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. -- Show quoteHide quoteGettingHelp/JustTryingToHelp "Harolds" wrote: > It sounds to me like you need to rebind the datagrid on postback. > > "freshRecruit" wrote: > > > 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. > > > > -- > > GettingHelp/JustTryingToHelp
CompareValidator Only Works On Manual Input
Base Page Design Question Which page load fires first? ASPX or ASCX? style width and height PropertyDescriptor in GetDataSource Repeater question Resolving datasource expression Parsing nested Tags Bizarre - DataGrid inside HTML Table 2.0 ascx on a 1.1 aspx? |
|||||||||||||||||||||||