GGC cell with ComboBox autocomplete

Hello,

I have GGC with some columns, on of the cell is Combobox which is previously filled with some data from table..
I want when user types something to open combobox and suggest him to choose something that matches to text that he is entering but with option that he can type something that doesn't match to anything in the list.

So far this is current setting for desired cell

AnyRecordFieldCell:

CellType = "ComboBox"
CellValueType = System.String
ValueMember = "SifraMaterijala"
DisplayMember = "SifraMaterijala"
AutoCompleteInEditMode = Both
ShowButtons = Show
ExclusiveChoiceList = True
AutoComplete = True

3 Replies

SN Sindhu Nagarajan Syncfusion Team June 12, 2018 01:02 PM UTC

Hi Josip, 

Thanks for contacting Syncfusion support. 

We have analyzed the code snippet that you provided. We suspect that you want to show the dropdown when text is entered in the  combobox celltype. By default, GridControl does not have the support to show the dropdown to suggest the text. But, you can be achieved this requirement by handling TableControlCurrentCellKeyPress event. Please refer to the below code snippet and the KB document, 

Code Example 
//Event Triggering 
this.gridGroupingControl1.TableControlCurrentCellKeyPress += GridGroupingControl1_TableControlCurrentCellKeyPress; 
 
//Event customization 
private void GridGroupingControl1_TableControlCurrentCellKeyPress(object sender, GridTableControlKeyPressEventArgs e) 
{ 
   if(!e.TableControl.CurrentCell.IsDroppedDown) 
    { 
        e.TableControl.CurrentCell.ShowDropDown(); 
    } 
} 

Sample Link: Sample 


Please let us know if you have any other queries. 

Regards, 
Sindhu TN 



JO Josip replied to Sindhu Nagarajan June 19, 2018 07:04 PM UTC

Hi Josip, 

Thanks for contacting Syncfusion support. 

We have analyzed the code snippet that you provided. We suspect that you want to show the dropdown when text is entered in the  combobox celltype. By default, GridControl does not have the support to show the dropdown to suggest the text. But, you can be achieved this requirement by handling TableControlCurrentCellKeyPress event. Please refer to the below code snippet and the KB document, 

Code Example 
//Event Triggering 
this.gridGroupingControl1.TableControlCurrentCellKeyPress += GridGroupingControl1_TableControlCurrentCellKeyPress; 
 
//Event customization 
private void GridGroupingControl1_TableControlCurrentCellKeyPress(object sender, GridTableControlKeyPressEventArgs e) 
{ 
   if(!e.TableControl.CurrentCell.IsDroppedDown) 
    { 
        e.TableControl.CurrentCell.ShowDropDown(); 
    } 
} 

Sample Link: Sample 


Please let us know if you have any other queries. 

Regards, 
Sindhu TN 


This is exactly what I want. Thank you for help and support!


SN Sindhu Nagarajan Syncfusion Team June 20, 2018 04:02 AM UTC

Hi Josip, 

Thanks for the update. 
We are glad to hear that the provided solution resolved your scenario. Please let us know if you have any other queries. 

Regards, 
Sindhu  


Loader.
Up arrow icon