开发者

how i can assign one item of listbox to one clumn of listview

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜