Problem: RadGrid namespace undefined (The RadGrid is not working when used underasp:multiview)

8 posts, 0 answers
  1. sujatha vimal
    sujatha vimal avatar
    4 posts
    Member since:
    May 2006

    Posted 04 Jun 2006 Link to this post

    Hi,

    My website page has asp:multiview withing that I have 5 views. I am trying to use RadGrid feature inside the 3rd view but it is popping an error saying "RadGrid namespace undefined" but if I use the RadGrid in asp's first view it is working fine and I am not sure why this happening, probably if I use RadGrid in other than the first view the "RadGridNamespace" control or id is lost. I give the sample code below.

    <asp:multiview ....>
     <asp:view ....>
      -- the RadGrid control works only here
    </asp:view>
    <asp:view>
     -- the radgrid control is not working here
    </asp:view>
    <asp:view>
    -- The RadGrid control is not working here
    </asp:view>

    -- Let me know of any information.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 05 Jun 2006 Link to this post


    Hi Sujatha,

    We are not sure where the source of this issue is at your side and that is why we have created for you an example illustrating the correct work of r.a.d.grid.

    Please find it attached and let us know how it goes.

    Regards,
    Vlad
    the telerik team
  3. sujatha vimal
    sujatha vimal avatar
    4 posts
    Member since:
    May 2006

    Posted 05 Jun 2006 Link to this post

    Thanks, for your reply.

    I modified the code(only default.aspx) you sent to add "Atlas update Panel", and add the RadGrid inside a webpart/Panel in second/third view the RadGrid not seems to work. Your help would be appreciated.
    Attaching the code:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <%@ Register TagPrefix="radG" Namespace="Telerik.WebControls" Assembly="RadGrid.Net2" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" />
        <asp:WebPartManager ID="WebPartManager1" runat="server">
                </asp:WebPartManager>
            &nbsp;
            <atlas:UpdatePanel ID="mainMenuPanel" runat="server">
                <ContentTemplate>
                    <table height="100%" style="width: 100%">
            <div>
               
                <br />
                <br />
                <br />
                <asp:Button ID="Button1" Text="View1" runat="server" OnClick="ChangeView" />
                <asp:Button ID="Button2" Text="View2" runat="server" OnClick="ChangeView" />
                <asp:Button ID="Button3" Text="View3" runat="server" OnClick="ChangeView" />
                <asp:MultiView ID="MultiView1" ActiveViewIndex="0" runat="server">
                    <asp:View ID="View1" runat="server">
                        <br />
                        <br />
                        View1
                        <br />
                        <br />
                        <radG:RadGrid ID="RadGrid1" AllowPaging="true" AllowSorting="true" DataSourceID="AccessDataSource1"
                            runat="server" EnableAJAX="True" EnableAJAXLoadingTemplate="True" OnNeedDataSource="RadGrid1_NeedDataSource">
                            <MasterTableView DataSourceID="AccessDataSource1">
                                <EditFormSettings>
                                    <EditColumn CancelImageUrl="~/RadControls/Grid/Skins/Default/Cancel.gif" EditImageUrl="~/RadControls/Grid/Skins/Default/Edit.gif"
                                        InsertImageUrl="~/RadControls/Grid/Skins/Default/Insert.gif" UniqueName="EditCommandColumn"
                                        UpdateImageUrl="~/RadControls/Grid/Skins/Default/Update.gif">
                                    </EditColumn>
                                </EditFormSettings>
                                <ExpandCollapseColumn ButtonType="ImageButton" UniqueName="ExpandColumn" Visible="False">
                                    <HeaderStyle Width="19px" />
                                </ExpandCollapseColumn>
                                <RowIndicatorColumn UniqueName="RowIndicator" Visible="False">
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                            </MasterTableView>
                            <FilterMenu HoverBackColor="LightSteelBlue" HoverBorderColor="Navy" NotSelectedImageUrl="~/RadControls/Grid/Skins/Default/NotSelectedMenu.gif"
                                SelectColumnBackColor="Control" SelectedImageUrl="~/RadControls/Grid/Skins/Default/SelectedMenu.gif"
                                TextColumnBackColor="Window"></FilterMenu>
                        </radG:RadGrid>
                    </asp:View>
                    <asp:View ID="View2" runat="server">
                        <br />
                        <asp:WebPartZone ID="WebPartZone1" runat="server">
                            <ZoneTemplate>
                                <asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
                        <radG:RadGrid ID="RadGrid2" AllowPaging="true" AllowSorting="true" DataSourceID="AccessDataSource2"
                            runat="server" EnableAJAX="True" EnableAJAXLoadingTemplate="True">
                            <MasterTableView DataSourceID="AccessDataSource2">
                                <EditFormSettings>
                                    <EditColumn CancelImageUrl="~/RadControls/Grid/Skins/Default/Cancel.gif" EditImageUrl="~/RadControls/Grid/Skins/Default/Edit.gif"
                                        InsertImageUrl="~/RadControls/Grid/Skins/Default/Insert.gif" UniqueName="EditCommandColumn"
                                        UpdateImageUrl="~/RadControls/Grid/Skins/Default/Update.gif">
                                    </EditColumn>
                                </EditFormSettings>
                                <ExpandCollapseColumn ButtonType="ImageButton" UniqueName="ExpandColumn" Visible="False">
                                    <HeaderStyle Width="19px" />
                                </ExpandCollapseColumn>
                                <RowIndicatorColumn UniqueName="RowIndicator" Visible="False">
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                            </MasterTableView>
                            <FilterMenu HoverBackColor="LightSteelBlue" HoverBorderColor="Navy" NotSelectedImageUrl="~/RadControls/Grid/Skins/Default/NotSelectedMenu.gif"
                                SelectColumnBackColor="Control" SelectedImageUrl="~/RadControls/Grid/Skins/Default/SelectedMenu.gif"
                                TextColumnBackColor="Window"></FilterMenu>
                        </radG:RadGrid></asp:Panel>
                            </ZoneTemplate>
                        </asp:WebPartZone>
                        <br />
                        View2&nbsp;<br />
                        <br />
                    </asp:View>
                    <asp:View ID="View3" runat="server">
                        <br />
                        <br />
                        View3
                        <br />
                        <br />
                        <radG:RadGrid ID="RadGrid3" AllowPaging="true" AllowSorting="true" DataSourceID="AccessDataSource3"
                            runat="server">
                        </radG:RadGrid>
                    </asp:View>
                </asp:MultiView>
                <asp:AccessDataSource ID="AccessDataSource1" DataFile="~/Nwind.mdb" SelectCommand="SELECT * FROM Customers"
                    runat="server"></asp:AccessDataSource>
                <asp:AccessDataSource ID="AccessDataSource2" DataFile="~/Nwind.mdb" SelectCommand="SELECT * FROM Orders"
                    runat="server"></asp:AccessDataSource>
                <asp:AccessDataSource ID="AccessDataSource3" DataFile="~/Nwind.mdb" SelectCommand="SELECT * FROM Products"
                    runat="server"></asp:AccessDataSource>
            </div>
            </table>
          </ContentTemplate>
          </atlas:UpdatePanel>
        </form>
    </body>
    </html>


  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 05 Jun 2006 Link to this post

    Hello sujatha,

    We tried to replicate this unwanted behavior under Windows 2003, but to no avail.
     
    Please, open a formal suppor ticket and send us a small runnable project demonstrating this issue. We will test locally your source code and we will get back to you with more info.


    Sincerely yours,

    Vlad
    the telerik team

  5. Guy Cocuzzo
    Guy Cocuzzo avatar
    12 posts
    Member since:
    Sep 2004

    Posted 07 Nov 2006 Link to this post

    I am also getting a "Namespace is undefined" error. My web app works fine on my development pc, but when I run it off a uat server, all the rad controls give a namespace is undefined error. This is our first .net 2.0 web app with rad controls. We have used rad controls in .net 1.1 apps with no issues. Is there anytihng that needs to be configured or installed on the server? Is there anything special to do when I "publish" the compiled version of the app to the server? I have installed the rad controls on my development pc, but not on the server. Everything ought to be compiled in the bin folder, right? The radcontrols folder with the rad control specific sub folders, scripts and skins all published over correctly.

    Any ideas?

    Thanks
  6. Guy Cocuzzo
    Guy Cocuzzo avatar
    12 posts
    Member since:
    Sep 2004

    Posted 07 Nov 2006 Link to this post

    it figures that as soon as I post about it, my fellow developer found the issue. .axd files were being blocked by urlscan. We added .axd to the list of files allowed by urlscan and it resolved our issue.
  7. Adina
    Adina avatar
    1 posts
    Member since:
    Jan 2007

    Posted 30 Jan 2007 Link to this post

    Having the same problem with Rad Combobox.
    Add the ras combobox to only one of the views. Try to switch to a second view by clicking an outside button that switches bewteen views, you'll get error on page....
  8. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 30 Jan 2007 Link to this post

    Hi Adina,

    We are not sure where the problem could be from the information provided. Your test case works properly in our tests, so it is possible that we are missing and important piece of information here.

    Could you open a formal support ticket and send us a small runnable project demonstrating this issue? We will test locally your source code and we will get back to you with more info.


    Sincerely yours,
    Rob
    the telerik team
Back to Top