most of time the default editform works fine. There are cases that I just need to have a little bit tweak, for example, the textbox needs to be a little bit wider etc. If switch to use template for editform, I have to start from scratch, creating all those boring stuff, my question: is there somewhere we can get the aspx code the default editform? so it will be just a few minutes to add simple/quick customization.
Thanks.
Thanks.
5 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 05 Apr 2012, 05:10 AM
Hello Henry,
You can access the controls in ItemDataBound and set its width as shown below.
C#:
Thanks,
Shinu.
You can access the controls in ItemDataBound and set its width as shown below.
C#:
protected
void
grid1_ItemDataBound(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
if
(e.Item
is
GridEditableItem && e.Item.IsInEditMode)
{
GridEditableItem item = (GridEditableItem)e.Item;
TextBox txt = (TextBox)item[
"UniqueName"
].Controls[0];
txt.Width = Unit.Pixel(60);
}
}
Thanks,
Shinu.
0

Henry
Top achievements
Rank 1
answered on 05 Apr 2012, 05:26 AM
Shinu, thanks for the quick response, that can solve this particular case, but not other more completed case. I guess my real question is how to get the those default aspx code so to save lot of typing in the editform, is there a solution?
Thanks.
Thanks.
0
Hello Henry,
Please provide more details about the desired functionality. I'm not sure that I understand what your requirements are.
Regards,
Daniel
the Telerik team
Please provide more details about the desired functionality. I'm not sure that I understand what your requirements are.
Regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Henry
Top achievements
Rank 1
answered on 10 Apr 2012, 04:29 AM
Daniel, it is more like a convenient feature, for example, the grid have 30 fields, in the default editform, each field will be in its own row, so there are 30 rows in the editform, now if I want to have 3 fields in one row so total 10 row. in this case, we have to manual type in all the aspx code and bindings in the edit template. if we can get the default editform aspx code, then it will be much easier to rearrange them into what I want. not sure if I expressed myself clearly.
Thanks.
Thanks.
0
Hello Henry,
Yes, this makes sense. Please examine the following demo:
Grid / Edit Form with Multiple Columns
Kind regards,
Daniel
the Telerik team
Yes, this makes sense. Please examine the following demo:
Grid / Edit Form with Multiple Columns
Kind regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.