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

Insert row in r.a.d grid

4 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rahul Kansara
Top achievements
Rank 1
Rahul Kansara asked on 19 Apr 2010, 11:06 AM
I have defined auto insert on my r.a.d. grid. When I click on Add New Record button, a form is displayed above the grid which displays all fields of the grid. This is default behavior of r.a.d grid. I want to achieve same behavior using code. Any idea?
Please help.

4 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 21 Apr 2010, 02:43 PM
Hello Rahul,

If you mean you need to show the insert form from the code-behind, you can simply do:

RadGrid1.MasterTableView.InsertItem();


Kind regards,
Veli
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Emmanuel
Top achievements
Rank 1
answered on 27 Jul 2012, 07:02 PM
I've a RadGrid with scroll option enabled by below settings

<ClientSettings>

 <Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="false" >

</Scrolling>

</ClientSettings>

and need to insert a record(with editform template) performing some validations. Once the validation check is over , grid automatically creates a new row same as previous row. When we try to hit the save button it throws below error:

Microsoft JScript runtime error:
Sys.WebForms.PageRequestManagerServerErrorException: Invalid JSON primitive: .

Attached screenshot for reference.. Contents in red color box is created automatically by grid after the validations at server side.

When I remove the Scroll settings and perform insert operation everything works fine. No idea when scroll option is enabled grid behave differently.

Any ideas!!.

0
Emmanuel
Top achievements
Rank 1
answered on 07 Aug 2012, 04:04 PM
Any Ideas!.. looking forward to hear from someone in telerik team.
0
Radoslav
Telerik team
answered on 10 Aug 2012, 06:49 AM
Hello Emmanuel,

Could you please post your aspx markup code with the related code behind file? Thus we will be able to get more information about your scenario and provide you more to the point answer. Also at a meantime if you have RadAjaxManager or RadAjaxPanel in your application could you please try disabling ajax, by setting the EnableAjax property of the RadAjaxManager/RadAjaxPanel control to "false" and let me know what is the real exception message.

Looking forward for your reply.


Greetings,
Radoslav
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.
Tags
Grid
Asked by
Rahul Kansara
Top achievements
Rank 1
Answers by
Veli
Telerik team
Emmanuel
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or