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:
CellValueType = System.String
ValueMember = "SifraMaterijala"
DisplayMember = "SifraMaterijala"
AutoCompleteInEditMode = Both
ShowButtons = Show
ExclusiveChoiceList = True
AutoComplete = True
SIGN IN To post a reply.
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
KB Link: https://www.syncfusion.com/kb/6946/how-to-show-the-dropdown-of-combobox-on-entering-a-text-in-cell
Please let us know if you have any other queries.
Regards,
Sindhu TN
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 Triggeringthis.gridGroupingControl1.TableControlCurrentCellKeyPress += GridGroupingControl1_TableControlCurrentCellKeyPress;//Event customizationprivate void GridGroupingControl1_TableControlCurrentCellKeyPress(object sender, GridTableControlKeyPressEventArgs e){if(!e.TableControl.CurrentCell.IsDroppedDown){e.TableControl.CurrentCell.ShowDropDown();}}
Sample Link: Sample
KB Link: https://www.syncfusion.com/kb/6946/how-to-show-the-dropdown-of-combobox-on-entering-a-text-in-cell
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
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
JO Josip
- Jun 11, 2018 09:39 PM UTC
- Jun 20, 2018 04:02 AM UTC