Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 07, 2012 03:07 PM by UjjwalMeshram
Member
26 Points
187 Posts
May 07, 2012 12:06 PM|LINK
i bind airline and price values in grid view. And now i want to perform filter operation on grid view using ajax multi slider extender.
ex:
airlie: price
aa 5000
bb 10000
cc 2000
(Fliter using ajax multislider Extednder)
how to do that? i am in need now.. thanks in advance..
Contributor
2412 Points
415 Posts
May 07, 2012 01:51 PM|LINK
I started with this.
http://www.asp.net/web-forms/tutorials/ajax-control-toolkit/slider/using-the-slider-control-with-auto-postback-cs
And built this real quick. It uses a table that has two fields, a string field (aaa, bbb, ccc) and a value field (123.50, 440.10, 225.50).
This is hardly an ideal solution but should get you where you need to go.
<div> <asp:ScriptManager ID="s1" runat="server" /> <asp:TextBox ID="txtValueFilter" runat="server" AutoPostBack="true" /> <asp:TextBox ID="sliderValue" runat="server" AutoPostBack="true" /> <ajaxToolkit:SliderExtender ID="se1" runat="server" TargetControlID="sliderValue" BoundControlID="txtValueFilter" Minimum="0" Maximum="1000" /> <br /> <asp:UpdatePanel ID="upd1" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="False" DataKeyNames="id" Width="313px"> <Columns> <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" /> <asp:BoundField DataField="value" HeaderText="value" SortExpression="value" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnectionString %>" SelectCommand="SELECT [id], [name], [value] FROM [Values] WHERE ([value] > @value)"> <SelectParameters> <asp:ControlParameter ControlID="txtValueFilter" DefaultValue="0" Name="value" PropertyName="Text" Type="Double" /> </SelectParameters> </asp:SqlDataSource> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="s1" EventName="Load" /> </Triggers> </asp:UpdatePanel> </div>
All-Star
95393 Points
14096 Posts
May 07, 2012 02:51 PM|LINK
Filter Gridview using AJAX slider - http://www.dotnetfunda.com/articles/article818-filter-gridview-records-using-ajax-slider-control.aspx
Thanks,
Participant
1179 Points
293 Posts
May 07, 2012 03:07 PM|LINK
hi
you can try Jquery UI slider to enjoy real time filter. I have also used this and its working great.
http://jqueryui.com/demos/slider/#range
Thanks
Thirisangu
Member
26 Points
187 Posts
how to perform filter operation in grid view values using ajax multislider extender?
May 07, 2012 12:06 PM|LINK
i bind airline and price values in grid view. And now i want to perform filter operation on grid view using ajax multi slider extender.
ex:
airlie: price
aa 5000
bb 10000
cc 2000
(Fliter using ajax multislider Extednder)
how to do that? i am in need now.. thanks in advance..
texx
Contributor
2412 Points
415 Posts
Re: how to perform filter operation in grid view values using ajax multislider extender?
May 07, 2012 01:51 PM|LINK
I started with this.
http://www.asp.net/web-forms/tutorials/ajax-control-toolkit/slider/using-the-slider-control-with-auto-postback-cs
And built this real quick. It uses a table that has two fields, a string field (aaa, bbb, ccc) and a value field (123.50, 440.10, 225.50).
This is hardly an ideal solution but should get you where you need to go.
<div> <asp:ScriptManager ID="s1" runat="server" /> <asp:TextBox ID="txtValueFilter" runat="server" AutoPostBack="true" /> <asp:TextBox ID="sliderValue" runat="server" AutoPostBack="true" /> <ajaxToolkit:SliderExtender ID="se1" runat="server" TargetControlID="sliderValue" BoundControlID="txtValueFilter" Minimum="0" Maximum="1000" /> <br /> <asp:UpdatePanel ID="upd1" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="False" DataKeyNames="id" Width="313px"> <Columns> <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" /> <asp:BoundField DataField="value" HeaderText="value" SortExpression="value" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnectionString %>" SelectCommand="SELECT [id], [name], [value] FROM [Values] WHERE ([value] > @value)"> <SelectParameters> <asp:ControlParameter ControlID="txtValueFilter" DefaultValue="0" Name="value" PropertyName="Text" Type="Double" /> </SelectParameters> </asp:SqlDataSource> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="s1" EventName="Load" /> </Triggers> </asp:UpdatePanel> </div>ramiramilu
All-Star
95393 Points
14096 Posts
Re: how to perform filter operation in grid view values using ajax multislider extender?
May 07, 2012 02:51 PM|LINK
Filter Gridview using AJAX slider - http://www.dotnetfunda.com/articles/article818-filter-gridview-records-using-ajax-slider-control.aspx
Thanks,
JumpStart
UjjwalMeshra...
Participant
1179 Points
293 Posts
Re: how to perform filter operation in grid view values using ajax multislider extender?
May 07, 2012 03:07 PM|LINK
hi
you can try Jquery UI slider to enjoy real time filter. I have also used this and its working great.
http://jqueryui.com/demos/slider/#range
Thanks
Regards