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

Edit Form Template

4 Answers 176 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul Taylor
Top achievements
Rank 1
Paul Taylor asked on 01 Apr 2009, 12:11 PM
I could do with some more help.

In my RadGrid I have created a custom edit form using the template mode and I have captured the update command event  to intercept the update as i want to write the information entered by the user manually to my database.

In the update command event I have converted e.item to a GridEditFormItem and now I want to get access to the controls that i have added into my template. There seems to be lots of controls embedded in this item so is there an easier to access the data entered by the user. I have a RadTextBox and RadDateTimePicker.

Thankyou.

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Apr 2009, 12:49 PM
Hello Paul,

You can refer to the following help document to understand how to access controls in the EditFormTemplate and update the database accordingly:
Referring controls in FormTemplate

Thanks
Shinu.
0
Paul Taylor
Top achievements
Rank 1
answered on 01 Apr 2009, 01:48 PM
Perfect, thnx Shinu

Paul
0
Mark Jordan
Top achievements
Rank 1
answered on 31 May 2011, 06:28 PM
This is close to what I need to do.

I have a RadGrid that is using an automatic form editor as a pop up.  I have an ItemTemplate and an EditItemTemplate on a column that is a DateTime.  When the row is edited, I want to use a RadDateTimePicker for the column.  I have successfully implemented this by binding the database field to the RadDateTimePicker's DbSelectedDate attribute.  Very cool.

The challenge comes in that I want to modify the behavior of the TimeView portion of the control based on the current time, i.e., give them a few options to pick from within the time range of "now - 2 hours".  I realize that I need to modify the StartTime attribute of the control, but I don't know what event I should catch in order to make this programmatic change.

Any help would be greatly appreciated.
0
Tsvetina
Telerik team
answered on 06 Jun 2011, 09:07 AM
Hello Mark,

When you want to also access the value of the already bound control in the edit form, use the ItemDataBound event of the grid. Code samples for accessing controls in the grid edit form are available here:
Accessing cells and rows

All the best,
Tsvetina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Paul Taylor
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Paul Taylor
Top achievements
Rank 1
Mark Jordan
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or