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();
}
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.