This is a migrated thread and some comments may be shown as answers.

[Solved] Radgrid Item Update,Edit,Cancel problem

1 Answer 264 Views
Grid
This is a migrated thread and some comments may be shown as answers.
DK
Top achievements
Rank 2
DK asked on 29 Jun 2009, 08:27 AM
hi,
i am using radgrid controls for my project.
 i have the following problems.
1. i am using Eval method to bind template fields of the grid. the problem is when page loads and there is no data in the grid then it is not showing its headers , i have marked true the showheaderwhennorecord property of the grid to true.
2. the datasource to the grid is dataset and thos dataset is result of stored procedures not direct connection strings.
so tell me how to update records in this grid.
3. let me know how to use edit,update,cancel commands of radgrid to update data inform mode of edit.
its urgetn please help me as soon as possible.

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 01 Jul 2009, 12:35 PM
Hi DK,

1. The only way RadGrid would not show its headers is when it is not actually bound to any data source (its DataSource is null) where it shows only the grid borders. Please see if you are actually binding your grid to a data source with no records, or you are not binding your grid at all.

2. If you are using custom data source operations for retrieving your data, you need to handle the Update/insert events manually. RadGrid's UpdateCommand and InsertCommand events are the place where you can get to the edited / inserted item data and upate your data source manually. The e.Item property of the event argument is the reference to the GridEditableItem that you are editing.

3. If your edit form is autogenerated, you can cast your e.Item property to a GridEditableItem and use its EditManager.GetColumnEditor("ColumnUniqueName") method to reference the column editor that you need to take the value from. More information on the topic can be found here and here. If, however, you are using some custom controls inside your edit form, you will need to find them by ID using the e.Item.FindControl() method in side the update/insert events. Check this article for more info.

Kind regards,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
DK
Top achievements
Rank 2
Answers by
Veli
Telerik team
Share this question
or