We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dynamic data binding for autocomplete

Thread ID:





100036 Jun 28,2011 04:35 PM UTC Jul 14,2011 01:37 PM UTC ASP.NET Web Forms (Classic) 5
Tags: Grouping
Namita Jain
Asked On June 28, 2011 04:35 PM UTC


I have a autocomplete drop down in a grouping grid. As soon as the user starts typing in - i need to make a call to fetch the data and bind the same to the control.
I am using the grid_TableControlCurrentCellChanged event to get the typed in data and then making a call. That works fine and i do get my data set.
But the probelm is - the data set doesn't get bound to the dropdown.
What i could make out was, for dynamic data binding the Grid_QueryCellStyleInfo event needs to be handled and the dataset be bound to the control again - Is that correct.
Also, i dont want to cache the dataset and make a call as soon as the user types in - because of which if i add code in the Grid_QueryCellStyleInfo event, i would have to make another call.

Do you have a better way of doing this?

I would really appreciate a quick response.


Namita Jain
Replied On June 28, 2011 06:33 PM UTC

I am using the GridListControl (the autocomplete) in the Grouping grid

Namita Jain
Replied On June 30, 2011 02:34 PM UTC

Can i get to hear anything on this issue please?

Ragamathulla B [Syncfusion]
Replied On July 6, 2011 07:17 AM UTC

Hi Namita,

We regret for the delay in getting back to you.

You can set ‘AutoComplete’ to the combo box cell style’s ‘DropDownStyle’ property to apply the auto complete functionality. In the given sample, I have established combo box cell with cell type ‘GridListControl’ along with the following code.

// In Form1_Load

this.gridGroupingControl1.TableDescriptor.Columns["Custom"].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.GridListControl;
this.gridGroupingControl1.TableDescriptor.Columns["Custom"].Appearance.AnyRecordFieldCell.DataSource = GetTheGridTable();
this.gridGroupingControl1.TableDescriptor.Columns["Custom"].Appearance.AnyRecordFieldCell.DisplayMember = "OrderID";
this.gridGroupingControl1.TableDescriptor.Columns["Custom"].Appearance.AnyRecordFieldCell.ValueMember = "OrderID";
this.gridGroupingControl1.TableDescriptor.Columns["Custom"].Appearance.AnyRecordFieldCell.DropDownStyle = GridDropDownStyle.AutoComplete;

Please refer to the following sample which illustrates the same.


Let me know if this helps.

Ragamathullah B.

Namita Jain
Replied On July 13, 2011 07:29 PM UTC

I don't want to set the same datasource for all the cells in a given column. Each cell can have a different datasource - which is NOT populated on form load and would be populated at run time when the user starts typing(and would be the output of a web service).
I am able to bind different data sources to different cells. the only problem is - as soon as any item from the drop down is clicked, the datasource(for that particular drop down) gets lost.

Is there a way(any event??) i can persist the datasource?I hope you got what I want to convey.

Please advise if you can help on this?

Ragamathulla B [Syncfusion]
Replied On July 14, 2011 01:37 PM UTC

Hi Namita,

Thanks for your interest in Syncfusion products.

You can bind different data source for each comboboxcell using ‘QueryCellStyleInfo’ event. The following code explain the same.

this.gridGroupingControl1.TableDescriptor.QueryCellStyleInfo += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventHandler(TableDescriptor_QueryCellStyleInfo);

void TableDescriptor_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
if (e.TableCellIdentity.ColIndex == 4)
if (e.TableCellIdentity.RowIndex == 6)
e.Style.DataSource = GetTheGridTable2();
else if(e.TableCellIdentity.RowIndex == 7)
e.Style.DataSource = GetTheGridTable1();

Please refer to the following sample which illustrates the same.


Let me know if you have any concern.

Ragamathullah B.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon