I am using a datagrid view bound to a System.ComponentModel.BindingList(Of uiDevice) using a dgv.DataSource = uiDeviceList
The uiDevice.canEdit property can be used to know if the column should have an edit button
The first column of my datagridview is a non bound button column for an Edit button. I would be ok with a bound button if that works better….
Depending on the user’s security rights, I would like to either have the “edit button” not show or be disabled. How do I do this at a row level?
[Edit] Test 1 – editable
Test 2 – not editable
[Edit] Test 3 – editable
In VWG I always used ListViews because of their flexibility. So DataGridViews are a whole new world to me….
See attached modified sample.
The button column’s default cell renderer always shows a button. But you can easily override the column and cell and switch the renderer and change the content to anything you like. You can even have multiple link, buttons, text, images, etc.
You can use the DataBindingComplete event to go through the rows and adapt the row or the entire column. Use row.DataBoundItem to retrieve the original data used to create the row.
You can use the button column, or you can render any type of html content in a cell, including custom styled buttons, or use “qx-button” to use the css class name of wisej themed buttons. You can use a simple link, or an image, etc. You can also place actual controls in a cell.
See attached small sample.