We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Simple CRUD application with SfDataGrid

Hi,

is there a simple SfDataGrid based CRUD application?

Within my application I have to implement a simple administration interface to maintain the master data of up to 20 data tables with MVVM.

It should be very basic, but cover the following requirements:
  • inline editing
  • inline deleting (by del key)
  • inline inserting new record (by AddNewRowPosition=Bottom)
  • some columns mustn't be edited (Id, CreationDate, ModificationDate, ...)
  • some columns should be edited as ComboBoxes (Gender, Country, ...)
  • some columns should be edited as DateTimePickers (Birthdate, ...)
  • CancelEdit is NOT necessary but would be helpful
  • Validation is NOT necessary but would be helpful
  • a award winning design is NOT necessary, because it's within the administration area
Regards
Harald





1 Reply

GT Gnanasownthari Thirugnanam Syncfusion Team January 25, 2017 02:40 AM UTC

Hi Harald, 

We have analyzed your query, you can achieve your requirement in below mentioned ways. 

Query 1: inline editing 
You can enable the editing in SfDataGrid by setting SfDataGrid.AllowEditing as true. 

Please refer the below UG link. 

Query2: inline deleting (by del key) 
You can delete the selected record in SfDataGrid by setting SfDataGrid.AllowDeleting as true. 

Please refer the below UG link. 

Query3: inline inserting new record (by AddNewRowPosition=Bottom) 
In SfDataGrid you can enable the AddNewRow by specifying the position through SfDataGrid.AddNewRowpostion as Bottom. 

Please refer the below UG link. 

Query3: some columns mustn't be edited (Id, CreationDate, ModificationDate, ...) 
You can disable the editing in particular column in SfDataGrid by setting GridColumn.Allowediting as false. 
Query4: some columns should be edited as ComboBoxes (Gender, Country, ...) 
You can use GridComboBoxColumn to load ComboBox in edit mode for Enum and collection type properties. 

Please refer the below UG link. 


Query5: some columns should be edited as DateTimePickers (Birthdate, ...) 
You can use GridDateTimeColumn to load DatePicker for Date type properties 

Please refer the below UG link. 

Query6: CancelEdit is NOT necessary but would be helpful 
You can cancel the editing in using SfDataGrid.CurrentCellBeginEditEvent. 

Please refer the below UG link. 

Query7: Validation is NOT necessary but would be helpful 
 
SfDataGrid is support to Validation. 

Please refer the below UG link. 

Query8:a award winning design is NOT necessary, because it's within the administration area 
 
SfDataGrid is designed based on the WPF template-based architecture that provides support to customize the grid easily and fully supports binding. And  

Please refer the below UG link. 


Please let me know if you have any further assistance on this. 
Regards, 
Gnanasownthari T. 


Loader.
Up arrow icon