This is a migrated thread and some comments may be shown as answers.

[Solved] Reseting Combobox Datasource

1 Answer 172 Views
GridView
This is a migrated thread and some comments may be shown as answers.
jerry
Top achievements
Rank 1
jerry asked on 11 Feb 2010, 09:06 PM
I have added a combobox column that is based on a user selection.  The first time through the column appears and works correctly.  The second time through the combobox column is already within my grid so I don't have to create it again but I need to know how to change it's source when a users changes a different combobox within my form.  Do I have to remove the added column and re add it?

Thank You

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 17 Feb 2010, 09:02 AM
Hi jerry,

If you want to change the DataSource of GridViewComboBoxColumn dynamically, please call the Update method on the GridElement of RadGridView. Currently, we have a refresh issue in this scenario that will be addressed in one of our next releases:
private void btnVegetables_Click(object sender, EventArgs e)
{
    // setting new DataSource
    comboCol.DataSource = vegetablesList;
    this.radGridView1.GridElement.Update(GridUINotifyAction.DataChanged);
}

If you have additional questions, feel free to contact me.

Regards,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
jerry
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or