|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to set cell background based on cell value when datagrid is displayedI would like to check a datagrid cell value, and change the color of the
cell background, when a datagrid is displayed. I want to do this as early as possible after / during a page load event. I tried looking into the DataBinding event of the datagrid, but couldn't see how to get the individual cells out of the EventArg passed into the DataBinding handler. I am hoping this can be done in a VB.net code-behind class and not require editing of the HTML to accomplish this. Thanks for any insights. RJ Second parameter passed to the event handler has type of
DataGridItemEventArgs. It has property Item which represents a datagrid row. It has in turn property Cells which is what you are after. Eliyahu Show quoteHide quote "RJ" <R*@PostOnly.com> wrote in message news:u1G6VxSFFHA.3824@TK2MSFTNGP10.phx.gbl... > I would like to check a datagrid cell value, and change the color of the > cell background, when a datagrid is displayed. I want to do this as early > as possible after / during a page load event. I tried looking into the > DataBinding event of the datagrid, but couldn't see how to get the > individual cells out of the EventArg passed into the DataBinding handler. I > am hoping this can be done in a VB.net code-behind class and not require > editing of the HTML to accomplish this. Thanks for any insights. > > RJ > >
How to pass the selected row of a datagrid to another form
Adding "delete" functionality in DataGrid - without a ButtonColumn Add additional row into header? bound columns of a datagrid How To Insert ASP.NET User Control into DataGrid Column? Adding CSS to LinkButton JavaScript confirmation Add header text dynamically in a datagrid with templatecolumns? Datagrid colum has no Dataformat property Printer-Friendly DataGrid option |
|||||||||||||||||||||||