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

how to get value from special controls inside grid control cells

I am trying to use a multicolumncombobox inside a grid control cell as "control" cell type.
Multi-Column ComboBox renderes properly inside a cell but the problem is i am not able to get or set the value from/to that control .
and item count of the combobox show 0.
and accessing the cell value from grid control doesnot get combobox valuemember.
Is is possible to get/set value from/to multicolumncombobox inside grid control cell.
Thank You

1 Reply

MG Mohanraj Gunasekaran Syncfusion Team May 13, 2019 01:45 PM UTC

Hi Mahendra, 
Thanks for using Syncfusion product. 
To get/set the control value from grid cell, you could use the Control property from that cellstyle. Please refer the following code example and the sample. 
GridCurrentCell cc = this.gridControl1.CurrentCell; 
GridStyleInfo style = this.gridControl1[cc.RowIndex, cc.ColIndex]; 
if (style.Control != null) 
    MultiSelectionComboBox msc = style.Control as MultiSelectionComboBox; 
    if (msc != null) 
        var value = msc.SelectedItem as DataRowView; 
        if (value != null) 
            //To get the DisplayMember and ValueMember from Control(MultiSelectionComboBox) property 
            var selectedText = value.Row[msc.DisplayMember]; 
Please get back to us if you need any further assistance on this. 
Mohanraj G 

Live Chat Icon For mobile
Up arrow icon