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

RadGrid - SharePoint - Edit Mode lost o

4 Answers 222 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 2
Simon asked on 31 Jan 2008, 01:17 AM
Hi

I'm using RadGrid within a SharePoint 2007 Web Part. I'm using a bespoke IBindableTemplate to Insert & Update row data. However when I click the button to update the data, the Grid's UpdateCommand isn't fired. I added a basic button to the page to simulate a Postback with no CommandName being associated. However when this happens, it appears that the ViewState for the Grid isn't being Loaded back during the Page LoadViewState process.

I have manually specified that EnableViewState = true for the Grid and the Parent Web Part. Also all controls have been given a Unique Id.

Any thoughts as how to resolve this would be most appreciated. Just to let you know I have run a cut down version from a previous thread in ASP.NET and all works fine

Cheers

Simon

4 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 31 Jan 2008, 11:51 AM
Hi Simon,

Thank you for the explanation.

It seems that the viewstate for your grid is not properly persisted across postback requests but unfortunately I am not able to determine the exact reason for that without examining your code implementation in detail. Can you please post the code related to the grid instantiation in your web part in this forum post?

In the meantime please verify that you instantiate the grid structure programmatically in accordance with the concepts explained in the following documentation article:

http://www.telerik.com/help/aspnet/grid/?grdProgrammaticCreation.html

In addition, you may be interested in gathering more general information about how to embed RadGrid in Sharepoint WebPart:

http://www.telerik.com/community/forums/thread/b311D-bamkag.aspx

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Simon
Top achievements
Rank 2
answered on 31 Jan 2008, 12:28 PM
Stephen

Many thanks for your quick response. I have managed to get a work around functioning, may well be the actual solution. The issue was I was calling the .DataBind() too often on Postbacks. So have a BindData function that only binds on the first load of the page, and if I specify to force a re-bind. The reason I was calling this on every load / post back was that I was binding an empty datatable to the GridView if I couldn't find any relevant data, so that I could show a custom No Records Template which had an "Add Row" form built in

Cheers

Simon
0
Neda
Top achievements
Rank 1
answered on 12 Nov 2008, 06:07 AM
hi

i wanna add Telerik in SharePoint 2007, at First i Create Web Application Project and Use from Telerik Tools, but i don't know how to add my dll application to sharepoint, you said that , you used " radGrid in web part ", how did you do that??? 
I don;t know how to  create web part and add radGrid to it.
pls guid me...


thanks
0
Paul
Telerik team
answered on 14 Nov 2008, 09:35 AM
Hello Neda,

I suggest you review the controls' documentation, in particular, the Integrating RadControls in MOSS section.

Sincerely yours,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Sharepoint Integration
Asked by
Simon
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Simon
Top achievements
Rank 2
Neda
Top achievements
Rank 1
Paul
Telerik team
Share this question
or