The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
i am trying to set the value of a combobox cell with the following code:
gridcontrol1[gridcontrol1.RowCount, CurCol].Text = ti.defaultvalue;
where defaultvalue is a string.
I am getting a runtime error (invalid cast exceptions: Specified cast not valid)l
thanks,
ak
ADAdministrator Syncfusion Team July 21, 2005 06:41 PM UTC
Are you using style.DataSource, Style.DisplayeMember, style.ValueMember to set up the combobox cell? If so, is your ValueMember a string? If not, then you should not be setting .Text. Instead set .CellValue = to the object (of the proper type).
AKAdam K.July 21, 2005 06:48 PM UTC
i am setting it up as a combo box with following code
_g[_g.RowCount, CurCol].ChoiceList = ti.enumeration;
_g[_g.RowCount, CurCol].CellType = "ComboBox";
where ti.enumeration is a StringCollection
please let me know your thoughts.
thanks,
ak
ADAdministrator Syncfusion Team July 21, 2005 07:24 PM UTC
Here is sample set up you described.
http://www.syncfusion.com/Support/user/uploads/GC_Combobox_5b7f9a8f.zip
It seems to work OK. Do you have other settings like style.DropDownStyle or style.Exclusive or style.CellValueType that might be affecting this.