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;
case (long)PropertyDataTypeEnum.Numeric:
e.Row.Cells["DisplayValue"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Double;
}
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.
Looking closly into it , realised if displayvalue is empty string, it takes longer otherwise its fine.
Still don't know how to solve it :(
Hello,
I tried this and it always works fine for me so I attached my sample to this post for you. Please review it and feel free to let me know if I misunderstood you or if you have any other questions.