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

RadSlider Text Filter

1 Answer 66 Views
Slider
This is a migrated thread and some comments may be shown as answers.
omer
Top achievements
Rank 1
omer asked on 06 Nov 2010, 10:46 PM
Hi All,

How can i get filtering my RadGrid with text? For Example in the slider 7 different Colour.
a  b  c  d  e  f  g 
and in the default view table will show products all of this colours
when user draging slider from a to b
i want to showing products which coloured b c d e f g in my RadGrid

When it is all numbers in DB it is ok. No Problem but when i wanted filtering with text really confused.

Hope to hear you soon.
Regards
.

<

 

 

telerik:RadSlider runat="server" ID="RadSlider1" IsSelectionRangeEnabled="true"

 

 

 

MinimumValue="0" MaximumValue="300" SmallChange="1" SelectionStart="0" SelectionEnd="300"

 

 

 

OnClientValueChanging="OnClientValueChanging" OnValueChanged="RadSlider1_ValueChanged"

 

 

 

OnClientSlideStart="OnClientSlideStart" OnClientSlideEnd="OnClientSlideEnd" AutoPostBack="true"

 

 

 

ShowDecreaseHandle="false" ShowIncreaseHandle="false" />

 

SelectionStart: $

 

<asp:Label ID="lblSelectionStart" runat="server" Text="0"></asp:Label><br />

 

SelectionEnd: $

 

<asp:Label ID="lblSelectionEnd" runat="server" Text="300"></asp:Label>

 



 

 

Protected Sub RadSlider1_ValueChanged(ByVal sender As Object, ByVal e As EventArgs)

 

lblSelectionStart.Text = RadSlider1.SelectionStart.ToString()

lblSelectionEnd.Text = RadSlider1.SelectionEnd.ToString()

RadGrid1.Rebind()

 

 

End Sub


 

SelectCommand

 

 

="SELECT * FROM [Products] INNER JOIN [Suppliers] ON Products.SupplierID=Suppliers.SupplierID WHERE (UnitPrice &gt; @MinimumPrice) AND (UnitPrice &lt; @MaximumPrice) AND (UnitsInStock &gt; @MinimumStock) AND (UnitsInStock &lt; @MaximumStock) AND (CategoryID &gt; @MinimumCategory) AND (CategoryID &lt; @MaximumCategory)">

 

 

 

 

 

 

 

<asp:ControlParameter ControlID="RadSlider1" PropertyName="SelectionStart" Name="MinimumPrice" />

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Tsvetie
Telerik team
answered on 10 Nov 2010, 04:46 PM
Hi Omer,
I am not quite sure I understand you question correctly. In case you are not sure how to construct your select statement using a parameter with text value, I believe the following MSDN article will help you get started - http://msdn.microsoft.com/en-us/library/z72eefad.aspx.

On the other hand, in case you are not sure how to display text with RadSlider, please refer to our online demos - http://demos.telerik.com/aspnet-ajax/slider/examples/slideritems/defaultcs.aspx. Please note that in this case you will not be able to use a control parameter because the Value and Text properties of the selected items are not exposed as properties of the slider control. You can use the base parameter class instead and set its DefaultValue property dynamically. You can use the SelectedItems property of the slider to access the selected items and their Values.

Best wishes,
Tsvetie
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Slider
Asked by
omer
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or