Hi
can anyone tell me why i am getting this error:
--------------------------------------------------------------
------------------------------------------------------------------
here is my source code
---------------------------------------------------------------------------
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<table class="style1">
<tr>
<td>
<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True" AllowFilteringByColumn="True" AllowPaging="True"
AllowSorting="True" AutoGenerateEditColumn="True" DataSourceID="SqlDataSource1"
GridLines="None" ShowFooter="True">
<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataKeyNames="CategoryID"
DataSourceID="SqlDataSource1">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="CategoryID" DataType="System.Int32"
DefaultInsertValue="" HeaderText="CategoryID" ReadOnly="True"
SortExpression="CategoryID" UniqueName="CategoryID">
<HeaderStyle Width="20%" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="CategoryName" DataField="CategoryName" HeaderText="Category" HeaderStyle-Width="250px">
<FilterTemplate>
<telerik:RadComboBox ID="RadComboBoxCategory" Width="250" DataSourceID="SqlDataSource2" DataTextField="CategoryName"
DataValueField="CategoryName" Height="400px" AppendDataBoundItems="true" SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("CategoryName").CurrentFilterValue %>'
runat="server" OnClientSelectedIndexChanged="CategoryIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="All" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
<script type="text/javascript">
function CategoryIndexChanged(sender, args) {
var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");
tableView.filter("CategoryName", args.get_item().get_value(), "EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
<HeaderStyle Width="250px"></HeaderStyle>
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
</telerik:RadGrid>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:OrderSystemConn %>"
DeleteCommand="DELETE FROM [Category] WHERE [CategoryID] = @CategoryID"
InsertCommand="INSERT INTO [Category] ([CategoryName]) VALUES (@CategoryName)"
SelectCommand="SELECT [CategoryID], [CategoryName] FROM [Category] ORDER BY [CategoryName]"
UpdateCommand="UPDATE [Category] SET [CategoryName] = @CategoryName WHERE [CategoryID] = @CategoryID">
<DeleteParameters>
<asp:Parameter Name="CategoryID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="CategoryName" Type="String" />
<asp:Parameter Name="CategoryID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="CategoryName" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:OrderSystemConn %>"
SelectCommand="SELECT [CategoryID], [CategoryName] FROM [Category] ORDER BY [CategoryName]">
</asp:SqlDataSource>
</form>
--------------------------------------------------------------------------------
Thanks
can anyone tell me why i am getting this error:
--------------------------------------------------------------
[ArgumentOutOfRangeException: Selection out of range Parameter name: value] Telerik.Web.UI.RadComboBox.PerformDataBinding(IEnumerable dataSource) +259 Telerik.Web.UI.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data) +10 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31 Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e) +73 Telerik.Web.UI.RadComboBox.PerformSelect() +21 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73 System.Web.UI.Control.DataBindChildren() +211 System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102 System.Web.UI.Control.DataBind() +15 System.Web.UI.Control.DataBindChildren() +211 System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102 System.Web.UI.Control.DataBind() +15 Telerik.Web.UI.GridItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +515 Telerik.Web.UI.GridTableView.CreateFilteringItem(Boolean useDataSource, GridColumn[] copiedColumnSet, GridTHead thead) +100 Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +761 Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +495 System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57 System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142 Telerik.Web.UI.GridTableView.PerformSelect() +4 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73 Telerik.Web.UI.GridTableView.DataBind() +221 Telerik.Web.UI.GridTableView.Rebind() +48 Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +1019 Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +134 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 Telerik.Web.UI.GridEditFormItem.OnBubbleEvent(Object source, EventArgs e) +299 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
------------------------------------------------------------------
here is my source code
---------------------------------------------------------------------------
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<table class="style1">
<tr>
<td>
<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="True"
AllowAutomaticUpdates="True" AllowFilteringByColumn="True" AllowPaging="True"
AllowSorting="True" AutoGenerateEditColumn="True" DataSourceID="SqlDataSource1"
GridLines="None" ShowFooter="True">
<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataKeyNames="CategoryID"
DataSourceID="SqlDataSource1">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="CategoryID" DataType="System.Int32"
DefaultInsertValue="" HeaderText="CategoryID" ReadOnly="True"
SortExpression="CategoryID" UniqueName="CategoryID">
<HeaderStyle Width="20%" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="CategoryName" DataField="CategoryName" HeaderText="Category" HeaderStyle-Width="250px">
<FilterTemplate>
<telerik:RadComboBox ID="RadComboBoxCategory" Width="250" DataSourceID="SqlDataSource2" DataTextField="CategoryName"
DataValueField="CategoryName" Height="400px" AppendDataBoundItems="true" SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("CategoryName").CurrentFilterValue %>'
runat="server" OnClientSelectedIndexChanged="CategoryIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="All" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
<script type="text/javascript">
function CategoryIndexChanged(sender, args) {
var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");
tableView.filter("CategoryName", args.get_item().get_value(), "EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
<HeaderStyle Width="250px"></HeaderStyle>
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
</telerik:RadGrid>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:OrderSystemConn %>"
DeleteCommand="DELETE FROM [Category] WHERE [CategoryID] = @CategoryID"
InsertCommand="INSERT INTO [Category] ([CategoryName]) VALUES (@CategoryName)"
SelectCommand="SELECT [CategoryID], [CategoryName] FROM [Category] ORDER BY [CategoryName]"
UpdateCommand="UPDATE [Category] SET [CategoryName] = @CategoryName WHERE [CategoryID] = @CategoryID">
<DeleteParameters>
<asp:Parameter Name="CategoryID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="CategoryName" Type="String" />
<asp:Parameter Name="CategoryID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="CategoryName" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:OrderSystemConn %>"
SelectCommand="SELECT [CategoryID], [CategoryName] FROM [Category] ORDER BY [CategoryName]">
</asp:SqlDataSource>
</form>
--------------------------------------------------------------------------------
Thanks