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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to get value from special controls inside grid control cells

Thread ID:





144565 May 12,2019 07:47 PM UTC May 13,2019 01:45 PM UTC WinForms 1
Tags: GridControl
Asked On May 12, 2019 07:47 PM UTC

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

Mohanraj Gunasekaran [Syncfusion]
Replied On 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 


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon