i have one combobox and one listview i want to select item of listbox and click on one clumn of listview multi clumn then clumn name that i clicked be equal whit item name of listbox tanks for answer
i want to select one item of listbox,then click on开发者_运维技巧 one clumn of listview's clumns, then this clumn name be equal to selected item in listbox
private void DataValuelst_ColumnClick(object sender, ColumnClickEventArgs e)
{
DataValuelst.Columns[?].Text = Schemacmb.SelectedItem.ToString();
}
the index of clumn that i clicked must be replace whit ?
You can use the SelectedIndex
property... So it should be something like this...
private void DataValuelst_ColumnClick(object sender, ColumnClickEventArgs e)
{
DataValuelst.Columns[Schemacmb.SelectedIndex].Text = Schemacmb.SelectedItem.ToString();
}
精彩评论