|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Can I read the relevant CSS class?I have a datagrid, where I have used CSS classes for the item style and alternating item style. The grid draws great when I load the page, but I have problems when I want to select a line by clicking on it. When a row is clicked on, I set the backcolor of that row in order to show it highlighted. BEfore I do this I read the current value of Backcolor for that row, so that I can set it back to the same colour when it is not selected. The problem is that because the colours of the rows are set in a CSS style, the CSS values are not reflected in the BackColor property of the datagrid rows. If I explicitly set the row colours in the databound event, then everything works fine. How can I either: - Read the required colour from the CSS in the databound event and explicitly set the colour at that point. OR - Read the colour actaully used to draw the row when I click on it I am using .Net 1.1 and VS 2003 Thankyou. Paul Cheetham Paul,
I have run into the same problem and come up empty after hours of searching. If anyone has the answer, I would like to know it as well. -Tom Show quoteHide quote "Paul Cheetham" <PAC.N***@dsl.pipex.com> wrote in message news:enEFQrGOGHA.536@TK2MSFTNGP09.phx.gbl... > Hi, > > I have a datagrid, where I have used CSS classes for the item style and > alternating item style. > The grid draws great when I load the page, but I have problems when I want > to select a line by clicking on it. > > When a row is clicked on, I set the backcolor of that row in order to show > it highlighted. > BEfore I do this I read the current value of Backcolor for that row, so > that I can set it back to the same colour when it is not selected. > > The problem is that because the colours of the rows are set in a CSS > style, the CSS values are not reflected in the BackColor property of the > datagrid rows. > If I explicitly set the row colours in the databound event, then > everything works fine. > > How can I either: > - Read the required colour from the CSS in the databound event and > explicitly set the colour at that point. > OR > - Read the colour actaully used to draw the row when I click on it > > > > I am using .Net 1.1 and VS 2003 > > > Thankyou. > > Paul Cheetham
ASP.NET 2.0 Easier than ASP? Gimmie a Break!
checking checkboxes per javascript in asp.net 2.0 treeview TabStrip - create tabs dynamicly on client-side Compare Validator for Date AND Time WebPartManager is Undefined asp wizard Parsing HTML in Controls hyperlink in a Calendar Control ASP.Net 2.0 Table not expanding 100% .NET 2.0 ImageButton control not submitting like form button |
|||||||||||||||||||||||