Hello, our existing VWG app adds listview subitems that contain a button.
Button btn = new Button();
btn.Click += …;
btn.ImageSource = …;
ListViewItem newItem = listview.items.Add(…);
newItem.SubItems.Add(btn);
This fails to compile in WiseJ. Any suggestions on how to accomplish this?
Thanks,
Andrew
In details view only? Isn’t that basically a datagrid with a button cell?
We can’t add controls to ListViewItem (actually we can, but it’s an overkill approach since you have to create the controls on the server and the client). The listview (and datagrid view) are based on a data stream (data store) class that receives only data and style info from the server and renders only the viewable area in the dom. The different cells in the datagridview are accomplished through cell renderers in javascript, that’s how we have the image, button, link, and other cells.
Creating an actual button control to place it in a cell works if you have few rows, but it quickly uses too many resources when creating hundreds or thousands of rows.
We are looking into implementing custom ColumnHeader classes like the DataGridViewColumn classes to support different views for the cells. Can you send me a screenshot of what you need the listview to look like or better a small VWG sample?
Thanks,
Luca
While you are working on the listview :
Does Wisej support displaying a panel upon clicking on a listview row ? This was a very powerful option in VWG.
This makes room underneath the select row to display details inline the listview.
See attachment for a sample view after a listviewitem has been clicked.