Hi,
I'm using your griddropdowncolumn very nicelly, but realized there's a problem with the filtered field it uses by default.
Facts:
I'm using your griddropdowncolumn very nicelly, but realized there's a problem with the filtered field it uses by default.
Facts:
- have 2 tables related in grid
- one table named Table with these columns IDTable, TableDesc, IDForeign
- my foreign table is called Foreign and has IDForeign and ForeignDesc columns
- columns in Grid are: TableDesc (GridBoundColumn) and ForeignDesc(GridDropDownColumn)
- grid alows filtering
- Filter works fine in column TableDesc but NOT in ForeignDesc
If you insert data in both tables and try to filter by any content in the ForeignDesc column it doesn't return anything, it only works if you use the IDForeign content in the filter. It should be possible to use the ForeignDesc content for filtering the data, no?
What am I doing wrong? Here's what I have.
| <telerik:RadGrid ID="rdTableForeign" runat="server" DataSourceID="sdsTable" AllowPaging="True" |
| ShowFooter="True" AutoGenerateColumns="False" AllowSorting="True" EnableViewState="true" |
| AllowFilteringByColumn="True" AllowAutomaticInserts="False" AllowAutomaticUpdates="True"> |
| <GroupingSettings CaseSensitive="false" /> |
| <MasterTableView DataKeyNames="IDTable" AutoGenerateColumns="false" AllowMultiColumnSorting="True" |
| EnableViewState="true" EnableColumnsViewState="true"> |
| <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true" /> |
| <Columns> |
| <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderText="Edit" ButtonType="ImageButton"> |
| <ItemStyle Width="50px" /> |
| </telerik:GridEditCommandColumn> |
| <telerik:GridBoundColumn DataField="TableDesc" HeaderText="Description" UniqueName="TableDesc" DataType="System.String"> |
| </telerik:GridBoundColumn> |
| <telerik:GridDropDownColumn DataSourceID="dsForeign" ListTextField="ForeignDesc" |
| AllowFiltering="true" ListValueField="IDForeign" UniqueName="GridDropDownColumn" |
| SortExpression="ForeignDesc" HeaderText="Foreign" DropDownControlType="RadComboBox" |
| DataField="IDForeign" DataType="System.String"> |
| </telerik:GridDropDownColumn> |
| </Columns> |
| <EditFormSettings> |
| <EditColumn ButtonType="ImageButton" /> |
| </EditFormSettings> |
| </MasterTableView> |
| <ClientSettings> |
| <Resizing AllowColumnResize="true" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| <asp:SqlDataSource ID="sdsTable" ConnectionString="<%$ ConnectionStrings:MyConnection %>" |
| SelectCommand="SELECT * FROM [Table]" runat="server" UpdateCommand="wcspTableUpdate" |
| UpdateCommandType="StoredProcedure"> |
| <UpdateParameters> |
| <asp:Parameter Name="IDTable" Type="Int32" /> |
| <asp:Parameter Name="TableDesc" Type="Int32" /> |
| </UpdateParameters> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource runat="server" ID="dsForeign" ConnectionString="<%$ ConnectionStrings:MyConnection %>" |
| SelectCommand="SELECT [IDForeign], [ForeignDesc] FROM [Foreign]"></asp:SqlDataSource> |
Thanks for any help!
Tauz