telerik.web.ui.gridboundcolumn shows error

8 posts, 0 answers
  1. Sucheta Patil
    Sucheta Patil avatar
    52 posts
    Member since:
    Jan 2010

    Posted 12 Jul 2010 Link to this post

    Hi guys,
    I had a RADScript manager then I add a Rad grid to my form.
    Below is the code snippet.
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="WebUserControl1" %>  

    <%

    @ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

     

     
      
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="ConnectionString1" 
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [tblCentre]">
    </asp:SqlDataSource>
      
      
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" 
        GridLines="None">
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" 
            DataSourceID="SqlDataSource1">
    <RowIndicatorColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </RowIndicatorColumn>
      
    <ExpandCollapseColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>
        <Columns>
            <telerik.web.ui.gridboundcolumn datafield="ID" datatype="System.Int32" 
                headertext="ID" readonly="True" sortexpression="ID" uniquename="ID"></telerik.web.ui.gridboundcolumn>
            <telerik.web.ui.gridboundcolumn datafield="Centre" headertext="Centre" 
                sortexpression="Centre" uniquename="Centre"></telerik.web.ui.gridboundcolumn>
        </Columns>
    </MasterTableView>
    </telerik:RadGrid>
    Every time I have to replace
    telerik.web.ui.gridboundcolumn by Telerik:GridBoundColumn and the code works else it throws error as 
    *******************************
    Telerik.Web.UI.GridColumnCollection must have items of type 'Telerik.Web.UI.GridColumn'. 'telerik.web.ui.gridboundcolumn' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.
    *******************************
    IS there any way I dont have to keep changing this everytime.?
    Like I have included
    using Telerik.Web.UI  in ascx.cs file and Also there is a reference shown in ascx file too.
    Thanks in advance..
  2. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 12 Jul 2010 Link to this post

    Hi Sucheta,

    It is incorrect ot use teleri.web.ui.gridboundcolumn as you have registered "telerik" as the tagprefix for the objects in the Teleri.Web.UI assembly, Teleri.Web.UI namespace:

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


    All the best,
    Tsvetoslav
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sucheta Patil
    Sucheta Patil avatar
    52 posts
    Member since:
    Jan 2010

    Posted 12 Jul 2010 Link to this post

    Hello,
    When I drag the Radgrid and I assign the datasource then I get this in design view.
    I have stated that I have to replace Telerik.Web.UI to Telerik.GridBoundCoulmn.
    I am not manually adding anything.

    Any help is appreciated!!!
  5. Sucheta Patil
    Sucheta Patil avatar
    52 posts
    Member since:
    Jan 2010

    Posted 12 Jul 2010 Link to this post

    Hello
    If you see my code I have already added the reference you have said.

    Any other answer please!!!!
  6. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 14 Jul 2010 Link to this post

    Hi Sucheta,

    Your page directive should be as follows:
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

    and the mark-up for the button column:
    <telerik:GridButtonColumn ...... />


    All the best,
    Tsvetoslav
    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. TechSavvySam
    TechSavvySam avatar
    38 posts
    Member since:
    Jul 2009

    Posted 28 Sep 2010 Link to this post

    I'm using Version 2010.2.826.35 and I found this solution to be insufficient to fix the problems.  Telerik support got me on the right track.  I found this in the web.config did not work correctly (note that this is what the Telerik template puts in the web.config):

    <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>

    You MUST instead FULLY qualify the assembly:

    <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI,
       Version=2010.2.826.35, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>

    now when I make any additions to the page, the telerik controls are prefixed with "<telerik:" instead of "<telerik.web.ui."

    here's the other forum thread that applies to this:

                   http://www.telerik.com/community/forums/aspnet-ajax/grid/driving-me-nuts.aspx

    and love the subject on that thread--I feel their pain man!

  8. Chen
    Chen avatar
    46 posts
    Member since:
    Oct 2010

    Posted 14 Oct 2010 Link to this post

    You are officially my hero of the week.
    This was such a waste of time chasing this issue.

    Telerik support - you must find a way to publish workarounds  to your bugs in a more approachable way.
    People are wasting so much time on this stuff.
  9. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 15 Oct 2010 Link to this post

    Point taken, guys - appreciate your feedback. We will definitely look into other ways to make important information like this one easily accessible for the Telerik Community members and clients - using sticky forum posts or our Public Issue Tracking System (PITS).

    Kind regards,
    Sebastian
    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
UI for ASP.NET Ajax is Ready for VS 2017