Hi, On 4/18/06, Jim Hunter <[EMAIL PROTECTED]> wrote: > I have a question that I could not find an answer for in this list or the > docs that came with the framwork... I need to know the index of the row that > is clicked when I click on the ListView. I found this in the demo for drag & > drop: > > this.getPane().getManager().getSelectedItems() > > but that returns a object that I don't know what properties it contains. How > does everyone else handle clicks of the ListView?
This method returns a slice of the object-array, that you inserted into the data array, when constructing the listview with new QxListView(thisIsMyDataArray, columnDefinition) Of course it only contains the selected rows. Regarding your question about the index: The QxListView does not provide any index of the selected rows, but it's quite easy to do yourself. Just add another property to your row data objects, that's not present in the header, and use it to hold the index of the row. Be careful to update this index, when updating/rerendering the listview. Hope that helped Cheers Benjamin