Loading grid with column combobox

4 posts, 0 answers
  1. Вадим
    Вадим avatar
    21 posts
    Member since:
    Mar 2016

    Posted 27 Jun 2017 Link to this post

    The grid is loaded through the Bindingsource, adding, deleting, editing is included in the grid. How to make so that in the first column there was a comboBox and at data loading in, to the combo box the data was substituted.

    I did, but I do not understand correctly.

    _bindingSourceSurvey = new BindingSource { DataSource = commandServer.GetDataGridSet(@"select * from GetSurvey(" + _keyAlone + ")").Tables[0] };
    radGridView2.Invoke(new MethodInvoker(delegate ()
    {

    GridViewComboBoxColumn comboColumn = new GridViewComboBoxColumn("Phone");

    comboColumn.DataSource = _bindingSpeziolist;

    radGridView2.Columns[1] = comboColumn;

    radGridView2.DataSource = _bindingSourceSurvey;

    }));

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3532 posts

    Posted 29 Jun 2017 Link to this post

    Hello Вадим, 

    Thank you for writing.  

    Please refer to the following help article demonstrating how to add a GridViewComboBoxColumn, bind it to a DataSource collection: http://docs.telerik.com/devtools/winforms/gridview/columns/column-types/gridviewcomboboxcolumn

    Note that it is important to specify the GridViewComboBoxColumn.FieldName property. Thus, the column will be populated with the respective data considering the specified DataSource's field.

    You can refer to our Demo application >> GridView >> Columns >> Column Types example. The Demo application is located in the installation folder of the suite.

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Jegan Sivathanu
    Jegan Sivathanu avatar
    3 posts
    Member since:
    Jul 2017

    Posted 07 Jul 2017 Link to this post

    Hi,
    I have three column in my Rad gridview.1st and 2 nd columns are Text box column 3 rd column is GridViewComboBoxColumn.i need to add items in combobox in dynamically based on some condition.for example if the first cell value is "String1" means the combo box items would be three value.if cell value is "string2" means the combo box items values are 4 values.how we can proceed with telerik grid.
    Thanks in advance
  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3532 posts

    Posted 07 Jul 2017 Link to this post

    Hello Jegan, 

    Thank you for writing.  

    Please refer to the following KB article which is quite useful for filling the values in a GridViewComboBoxColumn considering the value from another cell: http://www.telerik.com/support/kb/winforms/gridview/details/cascading-comboboxes-in-radgridview

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top