RadGrid - SharePoint - Edit Mode lost o

5 posts, 0 answers
  1. Simon
    Simon avatar
    9 posts
    Member since:
    Jan 2008

    Posted 30 Jan 2008 Link to this post

    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
  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 31 Jan 2008 Link to this post

    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

  3. Simon
    Simon avatar
    9 posts
    Member since:
    Jan 2008

    Posted 31 Jan 2008 Link to this post

    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
  4. Neda
    Neda avatar
    2 posts
    Member since:
    Nov 2008

    Posted 12 Nov 2008 Link to this post

    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
  5. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 14 Nov 2008 Link to this post

    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.
Back to Top