Hi,
I have a RadGrid with a combobox column with filter (see below). However I wish to set the datasource of the combobox with a specific
parameter, so that I can use the same datasource for different columns in the grid with different parameters
Say that the Datasource is as sqldatasource called sql_baselines and the parameter is day_id how do I set the datasource
for day_id = 1
Thanks in advance
Robert
</telerik:GridBoundColumn>
<telerik:GridDropDownColumn FilterControlWidth="250px"
DataField = "monday" DataSourceID="sql_baselines_monday"
HeaderText="monday" ListTextField="shift" ListValueField="BaseLineId"
UniqueName="monday" ColumnEditorID="DropDownColumnEditor1">
<HeaderStyle Width="160px" />
<FilterTemplate>
<telerik:RadComboBox ID="RadComboBoxDayDate" DataSourceID="sql_baselines_monday" DataTextField="shift"
DataValueField="BaselineId" AppendDataBoundItems="true"
SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("monday").CurrentFilterValue %>'
runat="server" OnClientSelectedIndexChanged="DayDateIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="All" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function DayDateIndexChanged(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("monday", args.get_item().get_value(), "EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridDropDownColumn>
I have a RadGrid with a combobox column with filter (see below). However I wish to set the datasource of the combobox with a specific
parameter, so that I can use the same datasource for different columns in the grid with different parameters
Say that the Datasource is as sqldatasource called sql_baselines and the parameter is day_id how do I set the datasource
for day_id = 1
Thanks in advance
Robert
</telerik:GridBoundColumn>
<telerik:GridDropDownColumn FilterControlWidth="250px"
DataField = "monday" DataSourceID="sql_baselines_monday"
HeaderText="monday" ListTextField="shift" ListValueField="BaseLineId"
UniqueName="monday" ColumnEditorID="DropDownColumnEditor1">
<HeaderStyle Width="160px" />
<FilterTemplate>
<telerik:RadComboBox ID="RadComboBoxDayDate" DataSourceID="sql_baselines_monday" DataTextField="shift"
DataValueField="BaselineId" AppendDataBoundItems="true"
SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("monday").CurrentFilterValue %>'
runat="server" OnClientSelectedIndexChanged="DayDateIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="All" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function DayDateIndexChanged(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("monday", args.get_item().get_value(), "EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridDropDownColumn>