This is my first stab at grid. I am experienced at asp but I cant seem to create a simple example
The page is simply
-------------------------------------------------------------------------------------------------
<%@ Page Language="c#" CodeFile="TelerikGrid.aspx.cs" Inherits="Telerik.GridExamplesCSharp.Hierarchy.NestedViewTemplate.DefaultCS" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body class="BODY">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:NewtonBidsConnectionString %>"
SelectCommand="SELECT DISTINCT * FROM [t2]"></asp:SqlDataSource>
</body>
</html>
-------------------------------------------------------------------------------------------------
code behind is empty ie
-------------------------------------------------------------------------------------------------
using System;
using Telerik.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI;
namespace Telerik.GridExamplesCSharp.Hierarchy.NestedViewTemplate
{
public partial class DefaultCS : System.Web.UI.Page
{
}
}
-------------------------------------------------------------------------------------------------
the table t2 is a very simple table with 10 columns colum0 being unique
When I add Ragrid in to the source page and select the above datasource I get the following ( in summary.. )
RadGrid - RadGrid1System.Web.HttpException (0x80004005): 'MasterTableView' could not be initialized. Details: 'Columns' could not be initialized. Details: 'Columns' could not be added to the collection. Details: 'Column 0' could not be set on property 'UniqueName'. ---> System.Web.HttpException (0x80004005): 'Columns' could not be initialized. Details: 'Columns' could not be added to the collection. Details: 'Column 0' could not be set on property 'UniqueName'. ---> System.Web.HttpException (0x80004005): 'Columns' could not be added to the collection. Details: 'Column 0' could not be set on property 'UniqueName'. ---> System.Web.HttpException (0x80004005): 'Column 0' could not be set on property 'UniqueName'. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: UniqueName cannot contain spaces at Telerik.Web.UI.GridColumn.set_UniqueName(String value) --- End of inner exception stack trace --- at
What step am I missing ?
thanks
The page is simply
-------------------------------------------------------------------------------------------------
<%@ Page Language="c#" CodeFile="TelerikGrid.aspx.cs" Inherits="Telerik.GridExamplesCSharp.Hierarchy.NestedViewTemplate.DefaultCS" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body class="BODY">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:NewtonBidsConnectionString %>"
SelectCommand="SELECT DISTINCT * FROM [t2]"></asp:SqlDataSource>
</body>
</html>
-------------------------------------------------------------------------------------------------
code behind is empty ie
-------------------------------------------------------------------------------------------------
using System;
using Telerik.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI;
namespace Telerik.GridExamplesCSharp.Hierarchy.NestedViewTemplate
{
public partial class DefaultCS : System.Web.UI.Page
{
}
}
-------------------------------------------------------------------------------------------------
the table t2 is a very simple table with 10 columns colum0 being unique
When I add Ragrid in to the source page and select the above datasource I get the following ( in summary.. )
RadGrid - RadGrid1System.Web.HttpException (0x80004005): 'MasterTableView' could not be initialized. Details: 'Columns' could not be initialized. Details: 'Columns' could not be added to the collection. Details: 'Column 0' could not be set on property 'UniqueName'. ---> System.Web.HttpException (0x80004005): 'Columns' could not be initialized. Details: 'Columns' could not be added to the collection. Details: 'Column 0' could not be set on property 'UniqueName'. ---> System.Web.HttpException (0x80004005): 'Columns' could not be added to the collection. Details: 'Column 0' could not be set on property 'UniqueName'. ---> System.Web.HttpException (0x80004005): 'Column 0' could not be set on property 'UniqueName'. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: UniqueName cannot contain spaces at Telerik.Web.UI.GridColumn.set_UniqueName(String value) --- End of inner exception stack trace --- at
What step am I missing ?
thanks