I want to use a editable data grid, to add, edit data. Is it possible with wpf? Can some one give an the example?
You can set the properties CanUserAddRows to true to allow user to add rows. DataGrid is editable by default, where each column has an edit control which lets you edit its value. By default the DataGrid automatically generates columns for every property in your Model, so you don't even have to define it's columns.
A Grid is a control for laying out other controls on the form (or page). A DataGrid is a control for displaying tabular data as read from a database for example.
The WPF Data Grid (GridControl) is a data-aware control designed to display and edit data in different layouts: tabular, treelike, and card. The GridControl allows users to manage large amounts of data (sort, group, filter, and so on).
DataGrid controls has all that functionality built-in. You can set the properties CanUserAddRows to true to allow user to add rows.
DataGrid
is editable by default, where each column has an edit control which lets you edit its value. By default the DataGrid
automatically generates columns for every property in your Model, so you don't even have to define it's columns.
Here are some good links with detailed examples you can look into:
http://wpftutorial.net/DataGrid.html
http://www.codeproject.com/Articles/30905/WPF-DataGrid-Practical-Examples
http://www.c-sharpcorner.com/UploadFile/mahesh/datagrid-in-wpf/
Good luck
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With