[CLOSED] Mr

Closed
0
0

Hi

Does the DataGridView have the equivalent of the VWG panel cell where you can effectively define a panel that contains a number of controls (User Control)and add it as a DataGridView cell?

I use this feature a lot in VWG to create MS Access style scrolling forms.

Thanks for your help

Ewan

 

Attachment
  • You must to post comments
0
0

Is this possible now there is a custom user cell that can be added to a DGV so you can create an MS Access style scrolling grid.

Ie a set of scrolling panels each containing a set of controls with each panel representing one row in the dgv

Thanks for you help

Ewan

  • You must to post comments
0
0

Hi Frank

I will look at putting a demo together. It however is just built using the VWG DGV Cell Panel concept, which was put in place to allow a DGV to contain any type of column such as dates and custom combo boxes such as multicolumn / tree view drop down variants.

Does your existing grid allow you to have such columns as listed above? (I have yet to get started with the beta so my apologies here)

Regards

Ewan

  • You must to post comments
0
0

Hi Ewan,

thanks for your detailed input about this functionality.

Would it be possible for you to wrap up a small VWG test case for us as well ?

Best regards
Frank

  • You must to post comments
0
0

Forgot to say that I link the grid columns to the panel controls by making sure they are named so that the control name can be used to access the relevant grid column. eg dtEvidence is a date picker which will pass values to the grid column Evidence.

Hope this helps

Ewan

  • You must to post comments
0
0

Hi

The approach I use is as follows:

  1. Define a grid in the usual way with one column for each field and an extra column to hold the panel column. (User Control)
  2. Define an empty panel that can be used as the base for any panel or user control you subsequently define. This empty control needs to have an inheritable changed event.
  3. Hide all the columns apart from the panel column.
  4. Use the grid format event to populate the controls on the panel with the hidden column values. Note the controls on the panel are NOT bound to the data source.
  5. When the user changes control values within the panel the changed event feeds the values back to the relevant hidden column in the grid.
  6. I use the Data Grid View header click event to trigger saving the row data.
  7. I use the Data Grid View header double click event to trigger cancel updates or to request row deletion.

With VWG you also have to use a panel cell to incorporate certain controls such as a date picker into the grid. This is much simpler to implement as you are just dealing with a single control which in this case is a data bound column.

Hope this helps

Ewan

  • You must to post comments
0
0

I always liked that control in Access. Many years ago I developed something similar for Gupta SQLWindows and published it on their magazine at the time. It was called Super Flexible Table Window… July 1997 Page 9

Anyway, I didn’t know that VWG had a panel cell. We already have the infrastracture to use user controls as cells and as editors but it’s not exposed yet and it’s not a DGV cell class.

I’m thinking that we are probably looking at a new dedicated component along the lines of an ASPNET repeater. Maybe a RepeaterPanel with methods, properties and events that are specific for this functionality. We may be able to add a virtual option to reuse a single instance of the panel class when turned on.

In fewer words: no we don’t have it now but will add the custom panel cell and a new RepeaterPanel component to the list. If you can share some insights on the databinding or other features that are useful it’s appreciated.

 

Best,

Luca

  • You must to post comments
Showing 6 results