the GridCheckBoxColumn and LinqtoSQL don't seem to play well together
a LinqtoSQL data source seems to completely bypass a postback (a good thing, usually) so I can't just go into the ItemDataBinding event and manually set the column
the column appears but doesn't show any data
if I add a DataType an exception is thrown - something about being unable to convert a string to boolean
any assistance is appreciated
I'm working in VS2010, SQL Server 2005, latest and greatest Telerik RAD Ajax controls
the relevant aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AdminPage.aspx.vb" Inherits="AdminPage" %>
<!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>Admin Page</title>
</head>
<body>
<form id="frmAdmin" runat="server">
<telerik:RadScriptManager ID="rsManager" runat="server" />
<table>
<tr>
<td>
<telerik:RadGrid ID="gvVendor" DataSourceID="ldsVendor" runat="server">
<MasterTableView DataKeyNames="VendorID" AutoGenerateColumns="false" AllowSorting="true" AllowPaging="true" CommandItemDisplay="Top" >
<Columns>
<telerik:GridBoundColumn UniqueName="VendorID" DataField="VendorID" HeaderText="VendorID" ReadOnly="true" />
<telerik:GridBoundColumn UniqueName="VendorName" DataField="VendorName" HeaderText="Vendor Name" />
<telerik:GridBoundColumn UniqueName="LNSPrefix" DataField="LNSPrefix" HeaderText="LNSPrefix" />
<telerik:GridBoundColumn UniqueName="KMSPrefix" DataField="KMSPrefix" HeaderText="KMSPrefix" />
<telerik:GridCheckBoxColumn UniqueName="RepGroupFlag" DataFieldName="RepGroupFlag" HeaderText="Rep Group?" />
<telerik:GridEditCommandColumn UniqueName="btnEdit" />
<telerik:GridClientDeleteColumn UniqueName="btnDelete" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
</td>
</tr>
</table>
<asp:LinqDataSource ID="ldsVendor" TableName="Vendors" ContextTypeName="LtSVandorDataContext" EntityTypeName=""
Select="new (VendorID,VendorName,LNSPrefix,KMSPrefix,RepGroupFlag)" OrderBy="VendorName"
EnableDelete="True" EnableInsert="True" EnableUpdate="True" runat="server"></asp:LinqDataSource>
</form>
</body>
</html>
code behind
Imports System.Data
Imports Telerik.Web.UI
Partial Class AdminPage
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
Exit Sub
End If
End Sub
why won't the grid set the checkbox properly?
I get a String was not recognized as a valid Boolean. exception thrown - but the column is tinyint
adding a DataType of System.Int16 does nothing
Marianne
a LinqtoSQL data source seems to completely bypass a postback (a good thing, usually) so I can't just go into the ItemDataBinding event and manually set the column
the column appears but doesn't show any data
if I add a DataType an exception is thrown - something about being unable to convert a string to boolean
any assistance is appreciated
I'm working in VS2010, SQL Server 2005, latest and greatest Telerik RAD Ajax controls
the relevant aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AdminPage.aspx.vb" Inherits="AdminPage" %>
<!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>Admin Page</title>
</head>
<body>
<form id="frmAdmin" runat="server">
<telerik:RadScriptManager ID="rsManager" runat="server" />
<table>
<tr>
<td>
<telerik:RadGrid ID="gvVendor" DataSourceID="ldsVendor" runat="server">
<MasterTableView DataKeyNames="VendorID" AutoGenerateColumns="false" AllowSorting="true" AllowPaging="true" CommandItemDisplay="Top" >
<Columns>
<telerik:GridBoundColumn UniqueName="VendorID" DataField="VendorID" HeaderText="VendorID" ReadOnly="true" />
<telerik:GridBoundColumn UniqueName="VendorName" DataField="VendorName" HeaderText="Vendor Name" />
<telerik:GridBoundColumn UniqueName="LNSPrefix" DataField="LNSPrefix" HeaderText="LNSPrefix" />
<telerik:GridBoundColumn UniqueName="KMSPrefix" DataField="KMSPrefix" HeaderText="KMSPrefix" />
<telerik:GridCheckBoxColumn UniqueName="RepGroupFlag" DataFieldName="RepGroupFlag" HeaderText="Rep Group?" />
<telerik:GridEditCommandColumn UniqueName="btnEdit" />
<telerik:GridClientDeleteColumn UniqueName="btnDelete" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
</td>
</tr>
</table>
<asp:LinqDataSource ID="ldsVendor" TableName="Vendors" ContextTypeName="LtSVandorDataContext" EntityTypeName=""
Select="new (VendorID,VendorName,LNSPrefix,KMSPrefix,RepGroupFlag)" OrderBy="VendorName"
EnableDelete="True" EnableInsert="True" EnableUpdate="True" runat="server"></asp:LinqDataSource>
</form>
</body>
</html>
code behind
Imports System.Data
Imports Telerik.Web.UI
Partial Class AdminPage
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
Exit Sub
End If
End Sub
why won't the grid set the checkbox properly?
I get a String was not recognized as a valid Boolean. exception thrown - but the column is tinyint
adding a DataType of System.Int16 does nothing
Marianne