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
90
setting cell style to date on ultragrid makes it slow.
posted

I have an unbound coulmn on ultragrid, of type object. On RowInitialize I set the cell style for unbound coulmn to numeric, datetime, dropdownList... depending on anothe coulmns value.

private void gridPropertyInstance_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)

        {   

long dataTypeId = (long)e.Row.Cells["PropertyDataTypeId"].Value;

 switch (dataTypeId)

            { 

case (long)PropertyDataTypeEnum.DateTime: 

  e.Row.Cells["DisplayValue"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Date;

break;  

case (long)PropertyDataTypeEnum.List:

                    e.Row.Cells["DisplayValue"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;         

break;            

case (long)PropertyDataTypeEnum.Numeric:

                    e.Row.Cells["DisplayValue"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Double;

                  break;

            } 

        }

 

This works fine but setting style to Date makes it slow. I have tried removing date styling from rowinitialize to cellclick, which makes loading quick but cell click is slow now.

Is there work around and any other approach that I should go for?

Basically I have an entity with 3 properties : name , displayvalue(string), type.

Ddepending on type displayvalue format can be character, list, numeric, datetime...

On grid I need to display list of entity and should be able to edit displayvalue.

Thanks for help.