-
listview question ?
hi,
I am having difficulty in editing the innner data items inside the listview in column view (details)
herez how I add item
int i = listViewFeeDetails.Items.Count+1;
ListViewItem lv = new System.Windows.Forms.ListViewItem(new string[] {
i.ToString(),
"FEE "+i.ToString(),
"0.00"}, -1, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))));
listViewFeeDetails.Items.Add(lv);
now by adding one item it adds
"1", "Fee 1", "0.00"
I have kept the labeledit to true but its not allowing inner labels like
"Fee 1" and "0.00" to be editable ?
how do I achieve that?
-thanks in advance
-Paresh
-
Yes, that is the required behaviour. When you set the LabelEdit property to true, listview control allows you to edit the item labels.
Item labels are the first item in the row. (Sub item with the index 0).
If you need to edit also subitems, you need to implement that behaviour yourself. Even, you can use some grid instead of listview control.
Martin
-
try to place an editbox on top of your listview and than change the value of subitems
if you need a sample i can provide one
let me know if this help
-
sure this helped me. could u provide sample. thanks
-
1 Attachment(s)
take a look at this
(I can't upload the entire solution archived but if you provide me an email adress...)
-