I'm not sure if this is right for getting a value of a multi combo box
when user selects something i need to get it's first column value and pass it to my DB
i'm trying to get a value from the telerik Multicombo box and idon't know wich event handler to use?
here's my code
private void radMultiColumnComboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (radMultiColumnComboBox3.MultiColumnComboBoxElement.Rows.Count > 0)
{
radMultiColumnComboBox3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
var item = radMultiColumnComboBox3.MultiColumnComboBoxElement.Rows[0];
radGridView1.Rows.Add(item);
}
else
{
MessageBox.Show("PLS select a row", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
This is how you get the value of the first column when the user selects a row in the Telerik's MultiColumnComboBox:
void radMultiColumnComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
var value = radMultiColumnComboBox1.EditorControl.Rows[radMultiColumnComboBox1.SelectedIndex].Cells[0].Value;
}
You can find the documentation of the SelectedIndexChanged
event here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.