Hello Guys, Hoping you guys are going to help me as always I am using Infragistics webdatagrid inside an updatepanel and the requirement is set the color of the row by getting color values from the database. I am able to see color when my grid is getting populated 1st time as the color is getting set initially using Initialize row event but on postback the color is not getting maintained. Please see the code below
protected void grdShowTransPort_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e){ int intTemp = e.Row.Index; Style rowStyle = new Style(); int TransportStatusColorPriority = ((ShowTransportsBO)(e.Row.DataItem)). TripStatusColorPrioirty; rowStyle.BackColor = System.Drawing.ColorTranslator.FromHtml (TransportColorPriorityBO.GetTransportColorPriorityBOByPriority (TransportStatusColorPriority).ColorCode); e.Row.CssClass = Infragistics.Web.UI.Framework.AppSettings.AppStylingManager. CssRegistry.Add(rowStyle, "TBODY TR.{0} TD"); }
Your help will be much much appreciated. Thanks in Advance
Best Regards,
Chetan
Hi Chetan,
I have investigate your scenario but am so far unable to replicate the behavior using version 11.1. In order to be able to investigate this further I would need to know which version of .NetAdvantage you are using.
What I can suggest is trying to disable Ajax on the grid in order to see if the matter persists ( or alternatively, taking the grid out of the updatePanel).
Please contact me if you have any questions.
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://www.infragistics.com/support
Hi Petar, seems that I have the same problem with Infragistics4.Web.v17.2, even I have updated the row CSS class
, it still remains the previous CSS style. Could you help?