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

Rad Grid and Ajax

9 Answers 71 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Rafal
Top achievements
Rank 1
Rafal asked on 31 Aug 2010, 04:21 PM
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> 

9 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 01 Sep 2010, 02:48 PM
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
0
Rafal
Top achievements
Rank 1
answered on 01 Sep 2010, 07:07 PM
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!
0
Maria Ilieva
Telerik team
answered on 02 Sep 2010, 03:25 PM
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
0
Rafal
Top achievements
Rank 1
answered on 02 Sep 2010, 03:29 PM
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
0
Iana Tsolova
Telerik team
answered on 03 Sep 2010, 01:40 PM
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
0
Rafal
Top achievements
Rank 1
answered on 03 Sep 2010, 03:49 PM
Would you be able to provide me with a code example? Everything i'm trying out doesn't seem to work.

thanks
0
Iana Tsolova
Telerik team
answered on 07 Sep 2010, 12:48 PM
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
0
Rafal
Top achievements
Rank 1
answered on 07 Sep 2010, 06:28 PM
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
0
Iana Tsolova
Telerik team
answered on 09 Sep 2010, 12:52 PM
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
Tags
Ajax
Asked by
Rafal
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Rafal
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or