Web Listbox Editing

Please Please Please someone tell me there is a way to edit cells in a web listbox? Im currently rewriting a huge program into several different web apps. I have figured out how to make many things work in order to create these web apps but the one thing I cant get past is not being able to edit listboxes. Im dealing with an accounting program an sometimes the listbox has to be edited directly and there is no way of putting the number fields in a text field so that will no work. The only way that will work is editing the listbox. Can anyone please please please tell me how I can do it? Preferably not plugins but if that’s then only way then okay. I dont want to go back to desktop programming because I cant edit listboxes. Thanks for any help

We got around this limitation by adding a container to control that looks like the The row that needed to be edited.

In the clicked event of the cell We disable to this box and we present the container control. It is not direct editing of the data in the Liz box however the user doesn’t know any different.

I think I got it figured out without going that deep into it. On the selection changed I called a method created named SetEditFocus.

iSelectedRow = Listbox.ListIndex
iSelectedColumn = 5

For i As Integer = 0 To Listbox.RowCount-1
  Listbox.CellStyle(i, iSelectedColumn) = ListboxTextStyleEdit

Listbox.CellStyle(iSelectedRow, 5) = ListboxTextStyleEditPressed

EditTextField.Text = Listbox.Cell(iSelectedRow, iSelectedColumn)

When a row is selected, I set focus to an invisible text field which allows me to type. The on the keydown even for the text field I set the cell’s value to equal the text field. So as soon as im typing it is copying it over to the cell and the user knows no difference. Also with some manipulation of styles and the borders of the cell I was able to show setting focus on a cell. Its a work around but its emulating it perfectly.

Here’s the code on the text field’s keypressed event

Listbox.cell(iSelectedRow, iSelectedColumn) = Me.Text

That’s how I do it Jeffrey

Hi Jeffery, is the text field outside the listbox?
how do you make it invisible?

GraffitiSuite.com has an editable webgrid.

[quote=478254:@Giacomo Bernardi]Hi Jeffery, is the text field outside the listbox?
how do you make it invisible?
Yeah the text field is just hidden outside of the listbox. Its hidden behind the listbox so it cant be seen but It accepts the value being typed and immediately updates the listbox cell with what is being typed.