This is a migrated thread and some comments may be shown as answers.

radcombobox not working inside radgrid for first time

1 Answer 99 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Arun
Top achievements
Rank 1
Arun asked on 05 Jun 2014, 12:34 PM


 I have two combo box on my page one as pagination combo box and another one is for filtering results in rad grid both are resides in same rad grid.

radcombobox not working inside radgrid for first time.

But it starts working as expected after post back

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 06 Jun 2014, 06:47 AM
Hi Arun,

Please have a look into the following sample code snippet which works fine at my end. Please provide your code if it doesn't help.

ASPX:
<telerik:RadGrid ID="radgrdOrders" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="false" AllowPaging="true" AllowFilteringByColumn="true">
    <MasterTableView>
        <Columns>
            <telerik:GridTemplateColumn>
                <FilterTemplate>
                    <telerik:RadComboBox ID="RadComboBoxTitle" DataSourceID="SqlDataSource1" runat="server"DataTextField="CustomerID" DataValueField="CustomerID" Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("CustomerID").CurrentFilterValue %>'
                       OnClientSelectedIndexChanged="TitleIndexChanged">
                        <Items>
                            <telerik:RadComboBoxItem Text="All" />
                        </Items>
                    </telerik:RadComboBox>
                    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                        <script type="text/javascript">
                            function TitleIndexChanged(sender, args) {
                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                tableView.filter("CustomerID", args.get_item().get_value(), "EqualTo");
                            }
                        </script>
                    </telerik:RadScriptBlock>
                </FilterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="OrderID" UniqueName="OrderID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CustomerID" UniqueName="CustomerID">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Thanks,
Shinu.
Tags
ComboBox
Asked by
Arun
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or