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

telerik.web.ui.gridboundcolumn shows error

7 Answers 306 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sucheta Patil
Top achievements
Rank 1
Sucheta Patil asked on 12 Jul 2010, 12:15 PM
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..

7 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 12 Jul 2010, 02:38 PM
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
0
Sucheta Patil
Top achievements
Rank 1
answered on 12 Jul 2010, 03:45 PM
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!!!
0
Sucheta Patil
Top achievements
Rank 1
answered on 12 Jul 2010, 03:48 PM
Hello
If you see my code I have already added the reference you have said.

Any other answer please!!!!
0
Tsvetoslav
Telerik team
answered on 14 Jul 2010, 09:56 AM
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
0
TechSavvySam
Top achievements
Rank 1
answered on 28 Sep 2010, 01:47 PM
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!

0
Chen
Top achievements
Rank 1
answered on 15 Oct 2010, 02:15 AM
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.
0
Sebastian
Telerik team
answered on 15 Oct 2010, 09:41 AM
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
Tags
General Discussions
Asked by
Sucheta Patil
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Sucheta Patil
Top achievements
Rank 1
TechSavvySam
Top achievements
Rank 1
Chen
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or