GRID BOUND COLUMN:
<telerik:GridBoundColumn UniqueName="emname" DataField="EM" HeaderText="EM"
HeaderStyle-Width="70px">
<FilterTemplate>
<telerik:RadComboBox ID="RadComboBoxEM" DataSourceID="sdsEmList" DataTextField="emname"
DataValueField="emname" Height="200px" Width="90" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("emname").CurrentFilterValue %>'
runat="server" OnClientSelectedIndexChanged="TitleIndexChangedEM" HeaderStyle-Width="60px">
<Items>
<telerik:RadComboBoxItem Text="All" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlockEM" runat="server">
<script type="text/javascript">
function TitleIndexChangedEM(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("emname", args.get_item().get_value(), "EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridBoundColumn>
DATA SOURCE:
<asp:SqlDataSource ID="sdsEmList" runat="server" ConnectionString="<%$ ConnectionStrings:MGSIProcessConnectionString %>" SelectCommand="select distinct em.employeename as emname,em.EmployeeId from Project p
join Employee em on em.EmployeeId=p.emid
order by emname"></asp:SqlDataSource>
<telerik:GridBoundColumn UniqueName="emname" DataField="EM" HeaderText="EM"
HeaderStyle-Width="70px">
<FilterTemplate>
<telerik:RadComboBox ID="RadComboBoxEM" DataSourceID="sdsEmList" DataTextField="emname"
DataValueField="emname" Height="200px" Width="90" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("emname").CurrentFilterValue %>'
runat="server" OnClientSelectedIndexChanged="TitleIndexChangedEM" HeaderStyle-Width="60px">
<Items>
<telerik:RadComboBoxItem Text="All" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlockEM" runat="server">
<script type="text/javascript">
function TitleIndexChangedEM(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("emname", args.get_item().get_value(), "EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridBoundColumn>
DATA SOURCE:
<asp:SqlDataSource ID="sdsEmList" runat="server" ConnectionString="<%$ ConnectionStrings:MGSIProcessConnectionString %>" SelectCommand="select distinct em.employeename as emname,em.EmployeeId from Project p
join Employee em on em.EmployeeId=p.emid
order by emname"></asp:SqlDataSource>
No comments:
Post a Comment