Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
Infragistics webdatagrid row color not maintained on postback
posted

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


Parents
No Data
Reply
  • 49378
    posted

    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.

    Best Regards,

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    http://www.infragistics.com/support

Children