Hi,
I am using a Combo Box with Grid based on example here: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridcomboajax/defaultcs.aspx?product=grid
For the life of me, I can not get 2 GUID columns to map. If I leave the DBType to default "object", I get the error "
Anyone have any ideas? Stumped.
thanks.
tom
I am using a Combo Box with Grid based on example here: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridcomboajax/defaultcs.aspx?product=grid
For the life of me, I can not get 2 GUID columns to map. If I leave the DBType to default "object", I get the error "
Conversion failed when converting from a character string to uniqueidentifier".
If I set DBType to "GUID", I get the error "Guid should contain 32 digits with 4 dashes"
Here is my code:| <%@ Control Language="C#" AutoEventWireup="true" CodeFile="ComboBox.ascx.cs" Inherits="MyControls_ComboBox" %> |
| <div id="productselector"> |
| Choose Product |
| <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="SqlDataSource1" |
| DataTextField="Name" DataValueField="ID" Skin="Black" EnableScreenBoundaryDetection="False" |
| EmptyMessage="Choose Product" AppendDataBoundItems="True" AutoPostBack="True"> |
| <Items> |
| <telerik:RadComboBoxItem Text="All" Value="0" Selected="true" /> |
| </Items> |
| </telerik:RadComboBox> |
| </div> |
| <div id="grid" style="margin-top: 15px;"> |
| <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource2" GridLines="Horizontal" |
| Width="300px" AllowMultiRowSelection="True" Skin="Black" AllowPaging="True" AllowSorting="True"> |
| <MasterTableView DataSourceID="SqlDataSource2" AutoGenerateColumns="False"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="Headline" HeaderText="Headline" SortExpression="Headline" |
| UniqueName="Headline"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Content" HeaderText="Content" SortExpression="Content" |
| UniqueName="Content"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| </div> |
| <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Sitefinity %>" |
| SelectCommand="SELECT Name, ID FROM [sf_lst_NamedList]"></asp:SqlDataSource> |
| <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:Sitefinity %>" |
| SelectCommand="SELECT sf_lst_ListItem.Headline, sf_lst_ListItem.[Content] FROM sf_lst_ListItem INNER JOIN sf_lst_NamedList |
| ON sf_lst_ListItem.Application = sf_lst_NamedList.Application WHERE (sf_lst_ListItem.ParentID = @ID)"> |
| <SelectParameters> |
| <asp:ControlParameter Name="ID" PropertyName="SelectedValue" ControlID="RadComboBox1" |
| DbType="Guid" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadComboBox1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="AjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> |
thanks.
tom