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.
Hi All,
I have a ComboBoxExt combine with a GridListControl. The GLC has a datasource, displaymember and value member. The selectedValue is bond with value in the dataset.
I need to programmatically select a particular row in the ComboBox or the GridListControl, which ever is possible.
Please help.
Thanks in advance,
Raj
ADAdministrator Syncfusion Team July 29, 2003 03:49 PM UTC
You can try code like:
this.comboBoxExt1.ListControl.SelectedIndex = 4;
to select the 4th item (starting at 0).
RWRaj WarrierJuly 30, 2003 03:14 AM UTC
> You can try code like:
>
> this.comboBoxExt1.ListControl.SelectedIndex = 4;
>
>
> to select the 4th item (starting at 0).
Thanks Clay,
I was trying that but to no avail. Finally after a lot of trial and error I found this method..
this.SomeGridListControl.SetSelected(i,true);
where i is the 0 based index of the GridListControl and true or false denotes, whether to select or unselect that particular index.
Please let me know, if this is the right approach. It seems to work though.
Clay, thanks for your help again.
Raj
ADAdministrator Syncfusion Team July 30, 2003 05:41 AM UTC
I think your code is fine.
I would have though the suggested code would work as well as long as the GridListControl has been set to the ComboBoxExt before the code is hit. But there may a focus issue or something that might be interferring with that setting. If so, then maybe setting gridListControl.Grid.ForceCurrentCellMoveTo = true might avoid the issue, but I do not think you need to change what you are doing.