Hi Truong,
Thanks for using Syncfusion products.
Currently we do not have the direct support to get the value member of ComboBox column when changing the other item column values. But you can achieve your scenario by handling the RecordValueChanged event and use the Dictionary collection(values) to save the DisplayMember values and ValueMember values of ComboBox to achieve your scenario. Please refer the below code snippet and refer the attached sample
Code snippet:
this.gridGroupingControl1.Table.RecordValueChanged += Table_RecordValueChanged;
Dictionary<string, string> values = new Dictionary<string, string>();
void Table_RecordValueChanged(object sender, Syncfusion.Grouping.RecordValueChangedEventArgs e)
{
Record record = e.Record;
GridTableCellStyleInfo style = (record.ParentTable as GridTable).GetTableCellStyle(record, "Name");
DataTable combo = style.DataSource as DataTable;
this.ComboBoxDisplayMemberValues(combo);
string valuemember = values.ContainsKey(style.FormattedText.ToString()) ? values[style.FormattedText.ToString()].ToString() : string.Empty;
MessageBox.Show("Combo box value member value:" + valuemember);
}
private void ComboBoxDisplayMemberValues(DataTable dt)
{
if (dt != null)
{
foreach (DataRow dr in dt.Rows)
{
if (!values.ContainsKey(dr[0].ToString()))
values.Add(dr[0].ToString(), dr[1].ToString());
}
}
}
Regards,
Mohanraj G.