Rad Grid and Ajax

10 posts, 0 answers
  1. Rafal
    Rafal avatar
    27 posts
    Member since:
    Dec 2007

    Posted 31 Aug 2010 Link to this post

    Hi,

    Im trying to implement this on one of my rad grids. http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx

    However this doesn't work and throws  a " 

    Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.



    Would anybody know a workaround this issue? The grid needs to be wrapped in an ajax panel due to the updates that it does while scrolling or filtering.  But i'd also would like to be able to edit entries usint that methodology or something that looks very similar.

    Thanks
    Rafal

    <telerik:RadAjaxPanel  ID="uPanel" EnableAJAX="true" Width="100%" runat="server">
              <MyGrid:MyRadGrid id="grvTypeList"
                        OnNeedDataSource="GrvTypeList_NeedData"
                        OnItemDataBound="GrvTypeList_ItemDataBound"                  
                                    
                        PageSize="30"
                        AllowSorting="true"
                        runat="server">
                       
                        <MasterTableView UniqueName="miscInfoTypeID" >
                       
                            <NoRecordsTemplate>
                             <div style="clear:both;text-align:center;padding:5px;">
                              <asp:Label CssClass="heading2" ID="labelNoRecords" ForeColor="Red" Text="None Found" runat="server" />
                             </div>
                            </NoRecordsTemplate>
                     
                            <Columns>
                                <MyGrid:MyCheckboxColumn  UniqueName="MiscInfoTypeIDCheckbox" DataField="miscInfoTypeID" HeaderStyle-Width="25"  RowSelector="true"  />
                                <telerik:GridBoundColumn DataField="miscInfoType"  SortExpression="miscInfoType" HeaderText="Miscellaneous Type" HeaderStyle-Width="150" />
                                <telerik:GridBoundColumn DataField="exampleInfo" SortExpression="exampleInfo" HeaderText="Example Info" HeaderStyle-Width="100%" />
                                <telerik:GridEditCommandColumn  UniqueName="EditCommandColumn" HeaderText="Action">
                              <HeaderStyle Font-Bold="true" Width="50px" />
                             
                             </telerik:GridEditCommandColumn >
                      
                            </Columns>
                           
                         <EditFormSettings UserControlName="MiscTypeControl.ascx" EditFormType="WebUserControl">
                                <EditColumn  UniqueName="EditCommandColumn">
                                </EditColumn>
                            </EditFormSettings>
                   
                            <SortExpressions>
                                <telerik:GridSortExpression FieldName="miscInfoType" SortOrder="Ascending" />
                            </SortExpressions>
                        </MasterTableView>
                       
                        <ClientSettings>
                            <ClientEvents OnRowDblClick="RowDblClick" />
                        </ClientSettings> 
                           
                    </Mygrid:MyRadGrid>
                    <div style="display:none;">
                        <asp:Button ID="buttonDoPostback" OnClick="buttonDoPostback_Click" runat="server" />
                    </div>
                
                </telerik:RadAjaxPanel>
            </div> 
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 01 Sep 2010 Link to this post

    Hi Rafal,

    The specified message is not an error in your code as this is the Telerik trial message. It will stop popping up as soon as you upgrade to the Dev version of the controls.


    Sincerely yours,
    Maria Ilieva
    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
  3. Rafal
    Rafal avatar
    27 posts
    Member since:
    Dec 2007

    Posted 01 Sep 2010 Link to this post

    The issue did go away. However now my row isn't highlighting when i edit it. I managed to add a javascript function to the edit button but i dont seem to be able to get the row element and hilight it. Can you by any chance point me in the right direction?

    var grid = window["<%= grvTypeList.ClientID %>"];
     var masterTable = grid.get_masterTableView();
                        
                       
     //var rowControl = grid.RadGridTable.Rows[rowIndex].Control;
     //grid.MasterTableView.SelectRow(rowControl, true);
     //window.radopen("MiscTypeControl.ascx", "WebUserControl");

    Found this on the internet but it doesnt work.

    Thanks!
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 02 Sep 2010 Link to this post

    Hello Rafal,

    Please refer to the following online demo which elaborates on the RadGrid Automatic Operations. I hope this works.


    Best wishes,
    Maria Ilieva
    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
  5. Rafal
    Rafal avatar
    27 posts
    Member since:
    Dec 2007

    Posted 02 Sep 2010 Link to this post

    Hi,

    I understand that that part of the radgrid is automatic but it isn't happening. there has been a similar thread on here that hilighted that issue but the solution posted there didn't work. Now there has to be  a way to highlight a row in java script but i haven't been able to figure it out. If you could help me out with that i would appreciate it.

    Rafal
  6. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 03 Sep 2010 Link to this post

    Hi Rafal,

    If I properly understand you what to mark the currently edited item as selected, right? If this is the case, you can handle the grid ItemDataBound server-side event and set the Selected property for the currently edited items to true.

    Sincerely yours,
    Iana
    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
  7. Rafal
    Rafal avatar
    27 posts
    Member since:
    Dec 2007

    Posted 03 Sep 2010 Link to this post

    Would you be able to provide me with a code example? Everything i'm trying out doesn't seem to work.

    thanks
  8. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 07 Sep 2010 Link to this post

    Hi Rafal,

    Find the attached sample page and let me know if it works for you.

    All the best,
    Iana
    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
  9. Rafal
    Rafal avatar
    27 posts
    Member since:
    Dec 2007

    Posted 07 Sep 2010 Link to this post

    Thank you Lana,

    That did the trick!

    Could you by any chance also help me out with adding a new item? I'm trying to open the custom user control when i add a new item. Unfortunately the demo page does not show an example of how to do that.

    Thanks
    Rafal
  10. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 09 Sep 2010 Link to this post

    Hi Rafal,

    You can find a solution on how to use different edit forms for editing and insertion in this helps article. Give it a try and let me know if any issues arise.

    All the best,
    Iana
    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
Back to Top