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

RadGrid NestedItemView Collapse Problem

5 Answers 78 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 2
Michael asked on 30 Sep 2009, 03:06 PM

hi ,,
I am using rad grid at webpart ,  using NestedItem at Grid but after Add Events Fixup Ajax working fine at all grid but i faced 2 issues please help me to find a soultion on them ...

1- the collapse buttom didn't work ( the grid post back and then the nested item didn't collapsed).
2- I can't expand more than 1 nested item at , if i trying to open nested item and it was one else opened the previous one collapsed and the new one expanded ,

here is rad grid code

      <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" Skin="WebBlue" 
                AllowFilteringByColumn="true" dir="rtl" GridLines="None" AllowPaging="True" AllowSorting="True" 
                PageSize="15">  
                <PagerStyle Mode="NumericPages" HorizontalAlign="Center" Font-Bold="true" VerticalAlign="Middle">  
                </PagerStyle> 
                <GroupingSettings CaseSensitive="false" /> 
                <ItemStyle HorizontalAlign="Right" /> 
                <FilterItemStyle HorizontalAlign="Right" /> 
                <CommandItemStyle HorizontalAlign="Left" /> 
                <AlternatingItemStyle HorizontalAlign="Right" /> 
                <HeaderStyle HorizontalAlign="Right" /> 
                <MasterTableView DataKeyNames="STUDENTNO" GridLines="None" DataSourceID="ObjectDataSource1" 
                    CommandItemDisplay="Top">  
                    <NoRecordsTemplate> 
                        
                    </NoRecordsTemplate> 
                    <ExpandCollapseColumn Visible="True">  
                    </ExpandCollapseColumn> 
                    <CommandItemTemplate> 
                        <asp:LinkButton ID="clearFilter" runat="server" Text="مسح كل البحث" ToolTip="الغاء البحث" 
                            OnClick="ClearFilter_Click" Font-Bold="true" Font-Size="14px"></asp:LinkButton> 
                    </CommandItemTemplate> 
                    <Columns> 
                    ... SOME COLUMNS ...  
                    </Columns> 
                    <NestedViewTemplate> 
                        <table> 
                        ... NESTED TEMPATE GOES HERE ...            
                        </table> 
                    </NestedViewTemplate> 
                </MasterTableView> 
                <ClientSettings> 
                    <Selecting AllowRowSelect="true" /> 
                </ClientSettings> 
            </telerik:RadGrid> 

there no important code behind to grid to be diaplay just some binding code ..

i used Event Fixup like the demp here is it
        #region Events & Fixers  
 
        protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
            ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);  
            if (scriptManager == null)  
            {  
                scriptManager = new ScriptManager();  
                scriptManager.ID = "ScriptManager1";  
                this.Page.Form.Controls.AddAt(0, scriptManager);  
            }  
 
            RadAjaxManager ram = RadAjaxManager.GetCurrent(this.Page);  
            if (ram == null)  
            {  
                ram = new RadAjaxManager();  
                ram.ID = "RadAjaxManager1";  
                Page.Form.Controls.Add(ram);  
                Page.Items.Add(ram.GetType(), ram);  
            }  
 
            EnsureChildControls();  
        }  
 
        protected override void OnPreRender(EventArgs e)  
        {  
            base.OnPreRender(e);  
            RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);  
            if (manager != null)  
            {  
                manager.DefaultLoadingPanelID = this.EmployeesListUserControl.AjaxLoadingPanel.ID;  
 
                manager.AjaxSettings.AddAjaxSetting(this.EmployeesListUserControl.GridRootDep, this.EmployeesListUserControl.GridRootDep);  
            }  
        }  
 
        private void EnsureUpdatePanelFixups()  
        {  
            if (this.Page.Form != null)  
            {  
                string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];  
                if (formOnSubmitAtt == "return _spFormOnSubmitWrapper();")  
                {  
                    this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";  
                }  
            }  
 
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "UpdatePanelFixup""_spOriginalFormAction = document.forms[0].action; _spSuppressFormOnSubmitWrapper=true;"true);  
        }  
 
        protected override void Render(HtmlTextWriter writer)  
        {  
            EnsureUpdatePanelFixups();  
            base.Render(writer);  
        }
        #endregion 


please help me ..

5 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 02 Oct 2009, 12:35 PM
Hello Michael,

I reviewed the code, and the setup seems correct. To properly trace the issue, it will be best if you open a formal support ticket, and send us the problematic web part. We will review it locally, and advise you further.

Kind regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michael
Top achievements
Rank 2
answered on 03 Oct 2009, 09:49 PM
Hi Yavor ,

I am using a trail version , so i am asked if there is a problem with that in sharepoint . i give to you all the code i have and there is no need to sent you a webpart you can test the piece of code that i mentioned to .
thank you
0
Yavor
Telerik team
answered on 07 Oct 2009, 05:12 AM
Hi Michael,

The code sent looks correct. In order to properly assist you, as mentioned previously, I will need to have the complete web part - together with the column declarations, databinding logic, and any other code which would allow me to replcicate the problem locally, and debug it as needed. Additionally, you can test the setup in an environment outside sharepoint, such a standard web part, which would rule out whether this is a particular issue related to the sharepoint environment itself.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michael
Top achievements
Rank 2
answered on 08 Oct 2009, 02:52 AM
Hello ,
thanks for your replay , i tested the grid at asp web project and all thing looks , but the problem is related to sharepoint :( .
could you please tell me some tries to do to  make it working .
0
Yavor
Telerik team
answered on 08 Oct 2009, 06:22 AM
Hello Michael,

Can you please send me the complete web part, which includes the grid declaration, as well as databinding logic, and any related resources. You can do so in a formal support ticket.
I will run this under Sharepoint, to get more details on the problem, and provide a possible solution.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Sharepoint Integration
Asked by
Michael
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Michael
Top achievements
Rank 2
Share this question
or