RadSlider Text Filter

2 posts, 1 answers
  1. omer
    omer avatar
    65 posts
    Member since:
    Nov 2010

    Posted 06 Nov 2010 Link to this post

    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.




    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()




    End Sub





    ="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" />


  2. Answer
    Tsvetie avatar
    1517 posts

    Posted 10 Nov 2010 Link to this post

    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,
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top