|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ItemDataBoundI have datagrid with buttons in one column.
In ItemDataBound I can disable cells by: e.Item.Cells.Enabled=False How can I do exact thing by disable only buttons, not entire cells. Thanks for answer, Simon Simon,
This should do e.Item.Cells.FindControl (buttonId).Enabled=False Eliyahu Show quoteHide quote "Simon Abolnar" <Simon.Abol***@tscng.net> wrote in message news:e2%23tsPkRFHA.2736@TK2MSFTNGP09.phx.gbl... > I have datagrid with buttons in one column. > In ItemDataBound I can disable cells by: > > e.Item.Cells.Enabled=False > > How can I do exact thing by disable only buttons, not entire cells. > > Thanks for answer, > > Simon > > How can I find out buttonID?
Thanks for help! Simon Show quoteHide quote "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message news:%23$QfjWkRFHA.2736@TK2MSFTNGP09.phx.gbl... > Simon, > > This should do > > e.Item.Cells.FindControl (buttonId).Enabled=False > > Eliyahu > > "Simon Abolnar" <Simon.Abol***@tscng.net> wrote in message > news:e2%23tsPkRFHA.2736@TK2MSFTNGP09.phx.gbl... >> I have datagrid with buttons in one column. >> In ItemDataBound I can disable cells by: >> >> e.Item.Cells.Enabled=False >> >> How can I do exact thing by disable only buttons, not entire cells. >> >> Thanks for answer, >> >> Simon >> >> > > It's the ID you've given the control in your ASPX page:
<asp:Button runat=server id=yourButtonID ... /> -Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > How can I find out buttonID? > > Thanks for help! > > Simon > > "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message > news:%23$QfjWkRFHA.2736@TK2MSFTNGP09.phx.gbl... > >> Simon, >> >> This should do >> >> e.Item.Cells.FindControl (buttonId).Enabled=False >> >> Eliyahu >> >> "Simon Abolnar" <Simon.Abol***@tscng.net> wrote in message >> news:e2%23tsPkRFHA.2736@TK2MSFTNGP09.phx.gbl... >> >>> I have datagrid with buttons in one column. >>> In ItemDataBound I can disable cells by: >>> e.Item.Cells.Enabled=False >>> >>> How can I do exact thing by disable only buttons, not entire cells. >>> >>> Thanks for answer, >>> >>> Simon >>> If the column contains a button only, try (c#)
e.Item.Cells.Controls [0].Enabled=False Eliyahu Show quoteHide quote "Simon Abolnar" <Simon.Abol***@tscng.net> wrote in message news:edM%237ZmRFHA.2252@TK2MSFTNGP15.phx.gbl... > How can I find out buttonID? > > Thanks for help! > > Simon > > > "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message > news:%23$QfjWkRFHA.2736@TK2MSFTNGP09.phx.gbl... > > Simon, > > > > This should do > > > > e.Item.Cells.FindControl (buttonId).Enabled=False > > > > Eliyahu > > > > "Simon Abolnar" <Simon.Abol***@tscng.net> wrote in message > > news:e2%23tsPkRFHA.2736@TK2MSFTNGP09.phx.gbl... > >> I have datagrid with buttons in one column. > >> In ItemDataBound I can disable cells by: > >> > >> e.Item.Cells.Enabled=False > >> > >> How can I do exact thing by disable only buttons, not entire cells. > >> > >> Thanks for answer, > >> > >> Simon > >> > >> > > > > > >
Designer locking mdb file... (file and dir GRANTS FULL CONTROL FOR "EVERYONE")
Howto insert delete rows into a ASP.net datagrid? read row values from datagrid and populate in new datagrid values from connected Datagrid Paging Stretch Data Programmatically Rotate Datagrid Rows Accessing data object on delete command. Datagrid paging keeps going back to the first group filtering from multiple dropdownlists Slow datagrid on postback DataGrid.Dispose |
|||||||||||||||||||||||