|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Disable button in datagird on conditionI have web datagrid with button column (delete button). I would like to
disable buttons in some raws of datagrid, depending on condition. How to do that? Thanks for help! Simon How about :
1. add ItemDataBound event to your datagrid 2. inside this event check if e.Item.ItemType = ListItemType.Item 3. inside this IF you enable or disable your button e.Item.Cells(X).Enabled = False/True (where X-column index) Show quoteHide quote "Simon Abolnar" wrote: > I have web datagrid with button column (delete button). I would like to > disable buttons in some raws of datagrid, depending on condition. > > How to do that? > > Thanks for help! > > Simon > > > It seems good. But you should also include
ListItemType.AlternatingItem. Elton Wang >-----Original Message----- e.Item.Cells(X).Enabled >How about : >1. add ItemDataBound event to your datagrid >2. inside this event check if e.Item.ItemType = ListItemType.Item >3. inside this IF you enable or disable your button >= False/True (where X-column index) I would like to > > >"Simon Abolnar" wrote: > >> I have web datagrid with button column (delete button). Show quoteHide quote >> disable buttons in some raws of datagrid, depending on condition. >> >> How to do that? >> >> Thanks for help! >> >> Simon >> >> >> >. >
Default Paging
Dynamically created control in Datagrid problem Background of datagrid Inserting Text before the Numberic Page numbers in paging Changing paging look TemplateColumn with CheckBox DataBind in C# recursive relation in datagrid Problem editing checkbox template column Paging Problem GUI of Datagrid |
|||||||||||||||||||||||