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 have a read only GridControl. I am implementing the filter feature, so that user cna select items from a combo box and data will be filtered based on the selection in the combo.
gridControl1.ColStyles[1].CellValueType = typeof(string);
gridControl1[1, 1].CellType = "ComboBox";
gridControl1[1, 1].ChoiceList = GetNames();
gridControl1[1, 1].CellValue = "test";
//gridControl1[1, 1].ReadOnly = true;
If I make the grid readonly, when the user select any item in the combo box and navigate away from the combo, the selection is not retained in the cell. Do I need to capture any event and set the Text of the combo cell explicitely ?
(This issue occurs only if the grid is readonly.)
ADAdministrator Syncfusion Team July 23, 2004 01:46 PM UTC
If you want to change the value of the combobox cell (and it sounds like you do), then you will have to turn off the ReadOnly for this cell.
Is it that you want to force your users to select something from the combobox, and not let them arbitrary type values into the cell? If so, try setting style.DropDownStyle to exclusive to see if that will do what you want.
TJTony JohnJuly 23, 2004 02:53 PM UTC
Thanks for the info. But it didn''t work for me if the grid itself is ReadOnly.
So I had to do the following work around:
Set grid.ReadOnly = false and make all other cells ReadOnly = true to avoid editing the cells by user.
Thanks.
>If you want to change the value of the combobox cell (and it sounds like you do), then you will have to turn off the ReadOnly for this cell.
>
>Is it that you want to force your users to select something from the combobox, and not let them arbitrary type values into the cell? If so, try setting style.DropDownStyle to exclusive to see if that will do what you want.
>