WinForms Grid: Inline Data Editing Form (What's New in 13.2)

Thinking Out Loud
05 November 2013

In our upcoming release (v13.2), we will be shipping a brand new data editing feature for our WinForms Grid Control. This new option will give you additional UI flexibility and make it easier for your end-users to edit data. One use-case would be grids that contain numerous columns. In such instances, you may not want to force users to scroll horizontally to edit individual field values. Instead of creating a custom form, you can simply use the built in inline editor to display and edit all fields in a compact (and fully customizable) layout.

In the following image, we are editing a row using the inline edit feature and have customized it's layout/appearance via the DevExpress WinForms Layout Control.

WinForms Data Grid Inline Data Editing Form

 

For those of you who prefer to limit data editing within the grid container and instead use popup forms or modal dialogs for data editing, the inline edit form can be displayed as a popup as well. Again, just like inline editing pictured above, you can provide a fully customized data editing experience via the popup without having to create a custom data editing form.

WinForms Data Grid Inline Editing Popup

In either instance, you are in full control and can deliver the UI experience most appropriate to your needs.

 

Differences between standard inplace row editing and the new edit form

When editing row values using cell editors (standard inplace row editing), if you enter/modify a value and move to the next cell, values are auto-posted to the row source. I wont go into detail as this is a long-standing feature and many of you probably use it in your applications currently.

When editing row values using the new edit form, you have 3 unique UI options:

  • Display the edit form below the "edited" row during edit operations.
  • Hide the "edited" row and display the edit form between rows.
  • Display the edit form as a popup and allows users to move/resize the popup as needed.


By default, the edit form is generated based on properties you set for corresponding columns, but as I mentioned previously, you can design it from scratch using the DevExpress Layout Control or build any layout you desire via user control.

When using the "standard" edit form, you can customize the columns you wish to display within the edit form. The columns displayed can be different from those columns visible in the Grid View. You can show/hide any column you require or change it's position. The edit form also allows you to create row/column spans to create more appealing interfaces (using memo edits, image edits).

You can also customize the manner in which users display the edit form (either by double-click, F2-key, or Enter-key).

Data binding options include both a direct and cached mode. 

  • In direct mode - values are posted to the row immediately after leaving a given field.
  • In cached mode – values are posted only when you click the update button. 

 

If you have any questions or would like more information on this feature, feel free to leave me a comment...I look forward to your feedback. 

WinForms Data Grid Awards

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
Yudha Yan Kusuma
Yudha Yan Kusuma

Just editing?

Is it possible to add new row (new record) using Inline Data Editing Form?

5 November 2013
Christopher Todd
Christopher Todd

Nice carry over from the asp.net toolset. I could see me using this for sure.

5 November 2013
Robert Fuchs
Robert Fuchs

I hope this works in XAF too.

5 November 2013
Brian Maxim
Brian Maxim

Yep, you would need to support insert to complete the feature. Most would create a popup dialog that works for both adding/editing so unless this did both they wouldn't be replacing there own.

6 November 2013
Edilson Junior
Edilson Junior

Vote for XAF having it too!

6 November 2013
Del W
Del W

Nice, look forward to trying it out.

6 November 2013
Iskandar Achmad
Iskandar Achmad

Great feature.

Save a lot of time than making separate Entry Form.

Hope this will be implement in your VCL version also.

6 November 2013
Crono
Crono

Since the new item row can be "edited" then I'm assuming this works with new items too. :)

I'm more curious about how this plays along with other grid's features, like printing, splitting, or anything related to events like Showing/ShownEditor, CustomUnboundColumnData and CustomRowCellEditor. Also I'm assuming we'll get to see new stuff in GridHitInfo classes.

In any case, it's a welcome addition. One I might actually use. :p

7 November 2013
Ray Navasarkian (DevExpress)
Ray Navasarkian (DevExpress)

As Crono said, you have a new item row and therefore you can use the inline editor.

7 November 2013
Crono
Crono

What about the other things I've mentionned, Ray?

11 November 2013
Brian Maxim
Brian Maxim

The issue with New Item Row is that's its not particularly pleasant or user friendly if you have a record with lots of columns that takes a lot of scrolling and has dependant validation based on other columns.

If its basic with a few columns like code & description then fine, but otherwise you would really need a dialog for inserting.

19 November 2013
Ayan Qayyum
Ayan Qayyum

Excellent & time saving feature

23 November 2013
Zinc Zinc
Zinc Zinc

I think this can be a workaround for adding a new row (assuming the grid has an embedded navigator):

private void gridControl1_EmbeddedNavigator_ButtonClick(object sender, DevExpress.XtraEditors.NavigatorButtonClickEventArgs e)

       {

           switch (e.Button.ButtonType)

           {

               case DevExpress.XtraEditors.NavigatorButtonType.Append:

                   e.Handled = true;

                   gridView1.AddNewRow();

                   gridView1.ShowEditForm();

                   break;

               default:

                   break;

           }

       }

12 January 2014

Please login or register to post comments.