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. Image for the cookie policy date

Grid InlineFormModeTemplate question

Hi,

we use the InlineFormModeTemplate of the grid control to edit data. The edit area contain a MultiColumnDropDownCombo that need to be fill with data. Would you show us in a sample
first: how to set the datasource for the MultiColumnDropDownCombo and 
second: how to set the selected value of the MultiColumnDropDownCombo.

regards
Tuong Trinh

1 Reply

SK Shanmugaraja K Syncfusion Team October 22, 2013 05:18 PM UTC

Hi  Tuong,
 
Thanks for using Syncfusion products.
 
Query 1: how to set the datasource for the MultiColumnDropDownCombo.

please refer the below code snippet for set the datasource for the MulticolumnDropdownCombo.

[CS]

 public void Init1(object sender, EventArgs e)
        {  MultiColumnDropDownCombo obj = sender as MultiColumnDropDownCombo;
            List<MyListClass> mylist = new List<MyListClass>();
            mylist.Add(new MyListClass(458792658));
            mylist.Add(new MyListClass(358765892));
            mylist.Add(new MyListClass(258213658));
            mylist.Add(new MyListClass(331231369));
            mylist.Add(new MyListClass(335454512));
            mylist.Add(new MyListClass(458792658));
            mylist.Add(new MyListClass(358765892));
            mylist.Add(new MyListClass(258213658));
            mylist.Add(new MyListClass(331231369));
            mylist.Add(new MyListClass(335454512));
            obj.DataSource = mylist; }
        [Serializable]
        public class MyListClass
        {
            public MyListClass(int Telephone)
            {
                this.Telephone = Telephone;
               }
            public int Telephone{ get; set; }
             }}}

Query 2:how to set the selected value of the MultiColumnDropDownCombo.

please refer the below code snippet for set the datasource for the MulticolumnDropdownCombo.

[CSHTML]

MultiColumnDropDownCombo mcdd = this.GridGroupingControl1.FormEditCell.FindControl("MultiColumnDropDownCombo1") as MultiColumnDropDownCombo;
                curRecord.SetValue("Telephone", mcdd.Text);

For your convenience we have prepared a sample for the above scenario and it is attached below. Please refer to it.

Regards,
Shanmugaraja K



multicolumndropdown_43b04901.zip

Loader.
Live Chat Icon For mobile
Up arrow icon