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

Grid problem in DNN, Ajax not working.

6 Answers 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Atiq Ur Rehman
Top achievements
Rank 1
Atiq Ur Rehman asked on 23 Jul 2008, 11:05 AM
Hi,

I am using RadGrid in DNN but the ajax is not working for it. Ajax is enabled in DNN and I am using RadAjaxManager on the page and binding Grid to this Ajax Manager but still nothing. I get a javascript error on the brower which says "'length' is null or not an object", I have tried everything but nothing worked. I tried putting Ajaxpanel as well but that didn't work either.
Here is my ascx code which might be of help;

        <script type="text/javascript">  
        function openWin(args,width,height)  
        {  
            var oWnd = radopen(args, "RadWindow1");  
            oWnd.setSize(width,height);  
            oWnd.center();  
            //oWnd.location.reload();  
            //set a function to be called when RadWindow is closed  
            oWnd.add_close(OnClientClose);  
        }  
          
        function OnClientClose(oWnd)  
        {  
            window.location.reload();  
        }  
        </script> 
 
 
 
            <radT:RadWindowManager Modal="true" KeepInScreenBounds="true" 
     VisibleStatusbar="false" ID="RadWindowManager1" 
            ShowContentDuringLoad="true" runat="server" Skin="Default"   
    Behavior="Maximize">  
        </radT:RadWindowManager> 
 
    <radT:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <radT:AjaxSetting AjaxControlID="rgSchemes">  
                    <UpdatedControls> 
                        <radT:AjaxUpdatedControl ControlID="rgSchemes" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                    </UpdatedControls> 
                </radT:AjaxSetting> 
            </AjaxSettings> 
        </radT:RadAjaxManager> 
    <radT:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30" BackColor="#E0E0E0">  
            <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="margin-top: 75px;" /> 
        </radT:RadAjaxLoadingPanel> 
 
        <TABLE id="tblDataGrid" cellSpacing="1" cellPadding="1" width="100%" align="center" border="1" 
            runat="server">  
            <TR> 
                <TD> 
                       
                    <asp:label id="lblmsg" runat="server" Font-Bold="True" ForeColor="#C00000"></asp:label> 
                       
                    <radT:RadGrid ID="rgSchemes" runat="server" AutoGenerateColumns="False"   
                        GridLines="None" PageSize="7" AllowPaging="True" AllowSorting="True"   
                        Skin="Sunset">  
 
<MasterTableView> 
<RowIndicatorColumn Visible="False">  
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn Visible="False" Resizable="False">  
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
 
 
                        <Columns> 
                            <radT:GridBoundColumn AllowFiltering="False" AllowSorting="false" DataField="BusinessClassID_int"   
                                HeaderText="Id" ReadOnly="True" UniqueName="idCol">  
                                 <HeaderStyle Width="3%" Font-Bold="True"></HeaderStyle> 
                            </radT:GridBoundColumn>                     
                            <radT:GridTemplateColumn HeaderText="Option"   
                                UniqueName="optionCol">  
                                <HeaderStyle Width="5%" Font-Bold="True"></HeaderStyle> 
                                    <ItemStyle BackColor="White"></ItemStyle> 
                                    <ItemTemplate> 
                                        <asp:ImageButton id="editBTN" runat="server" ImageUrl="../../images/QBAdminImages/edit.gif" 
                                            CausesValidation="false" CommandName="EditCmd"></asp:ImageButton> 
                                    </ItemTemplate> 
                            </radT:GridTemplateColumn> 
                            <radT:GridBoundColumn DataField="Title_varchar" HeaderText="Title" ReadOnly="True" UniqueName="titleCol">  
                                <HeaderStyle Width="45%" Font-Bold="True"></HeaderStyle> 
                            </radT:GridBoundColumn>    
                        <radT:GridBoundColumn DataField="BusinessClassType_varchar" AllowSorting="false" HeaderText="Type" ReadOnly="True" UniqueName="typeCol">  
                                    <HeaderStyle Width="9%" Font-Bold="True"></HeaderStyle> 
                            </radT:GridBoundColumn>     
                              
                            <radT:GridTemplateColumn HeaderText="Option"   
                                UniqueName="optionCol">  
                                <HeaderStyle Width="20%" Font-Bold="True"></HeaderStyle> 
                                    <ItemTemplate> 
                                            <asp:ImageButton id="sectionsBTN" runat="server" ImageUrl="../../images/QBAdminImages/sections.gif" 
                                            CausesValidation="false" CommandName="sectionsCMD"></asp:ImageButton> 
                                        <asp:ImageButton id="productsBTN" runat="server" ImageUrl="../../images/QBAdminImages/products.gif" 
                                            CausesValidation="false" CommandName="productsCMD"></asp:ImageButton> 
                                    </ItemTemplate> 
                            </radT:GridTemplateColumn> 
    </Columns> 
 
<EditFormSettings> 
<PopUpSettings ScrollBars="None"></PopUpSettings> 
</EditFormSettings> 
</MasterTableView> 
<PagerStyle NextPageText="Next" PrevPageText="Prev" Mode="NextPrevAndNumeric">  
                </PagerStyle> 
 
                    </radT:RadGrid> 
                      
                      
                                      
 
 
 
                  
                </TD> 
            </TR> 
            <TR> 
                <TD align="left">  
                  
                <img alt="Business Class Wizard" id="HtmlImg"   
                src="../../../../images/QBAdminImages/AddScheme.gif" onclick="openWin('/dotnetnuke_4_8_2_multi/DesktopModules/Tonyg.SchemeShop.Admin/addBusinessClass.aspx','850','550'); return false;" /> 
                    </TD> 
            </TR> 
        </TABLE> 

Please help me out with this.

Thanks
Atiq

6 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 25 Jul 2008, 08:24 AM
Hi Atiq Ur Rehman,

I followed your scenario in order to replicate the error but RadAjax works fine on my end. Please find attached a sample DNN module and let me know how it works with you and if I missed something from your logic.

Additionally, could you check if the error persists if you remove RadAjax at all so we are sure the issue is caused by it?
 
Best wishes,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Atiq Ur Rehman
Top achievements
Rank 1
answered on 25 Jul 2008, 09:07 AM
Hi the problem is still there. I copied all of your code to my dotnetnuke but I got the same javascript error and if I remove the AjaxManager from page then I don't get any javascript error but of course the ajax dont work.
Again the error is "'length' is null or not an object" and it comes on a line which doesn't exist if i open the source.

What shall I do?
0
Iana Tsolova
Telerik team
answered on 25 Jul 2008, 12:38 PM
Hi Atiq Ur Rehman,

Have you tried installing the module sent instead of copying the code and check if the problem persists? I suggest that you open a formal support ticket and send me an installable package of the problematic DNN module. Thus I could investigate the issue in depth and ring you back a resolution.

Let me now how it goes.

Regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Atiq Ur Rehman
Top achievements
Rank 1
answered on 25 Jul 2008, 01:47 PM
Hi,

Thanks for the reply, yes I did try to install the module but it gave me an error saying .dnn file could not be found. so I just copied the code instead!
The problem is I can't send my module as its too big and there are many more things in the module, but on the page where I use DataGrid there is only that much information which I have copied above.
Can you tell me what are the reasons when I would get this error which I am getting?
Can you suggest what to do now?
0
Iana Tsolova
Telerik team
answered on 28 Jul 2008, 02:52 PM
Hi Atiq Ur Rehman,

Could you please try disabling the ajax of the ajax manager by setting its EnablaAjax property to false and check if you receive any client or server errors? Thus we are sure that the problem comes from RadAjax.

Additionally, I suggest that you try updating to the latest version of RadControls for ASP.NET AJAX and see if it makes any difference.

Let me know how it goes.

Kind regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Atiq Ur Rehman
Top achievements
Rank 1
answered on 29 Jul 2008, 02:40 PM
hi,

Ok it only works if I disable Ajax from DNN and put script manager on the page it need to use Ajax. If I enable Ajax from DNN it doen't work, so i'll live with it then if this is the only thing which can work.

Thanks for the help.
bye
Tags
Grid
Asked by
Atiq Ur Rehman
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Atiq Ur Rehman
Top achievements
Rank 1
Share this question
or