Hi guys,
I had a RADScript manager then I add a Rad grid to my form.
Below is the code snippet.
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..
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
>
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..