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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Simple CRUD application with SfDataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

128450 Jan 23,2017 08:14 PM UTC Jan 25,2017 02:40 AM UTC WPF 1
loading
Tags: SfDataGrid
Harald Betzler
Asked On January 23, 2017 08:14 PM UTC

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





Gnanasownthari Thirugnanam [Syncfusion]
Replied On 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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;