HELP! - Radgridview filter dialog

10 posts, 0 answers
  1. J
    J avatar
    9 posts
    Member since:
    Jan 2015

    Posted 29 Jan 2015 Link to this post


    Hello All

    I desperately need your help on this most urgently.

    Using VB.Net - Windows Form - VS2012

    What I am trying to achieve on the attached screenshot2 - I want hide the following:

    1. Groupbox 'Not' checkbox
    2. Hide the dropdown list that shows 'Greater than' etc
    3. Hide the dropdown list that shows 'less than' etc
    4. Hide the radio buttons i.e. And, Or
    5. Shift the two date picker controls to the center with labels [From] and [To]

    So far I have managed to hide the Available Filter options to show only [Between] option - see screenshot1

    Please, Please, can you provide a VB.Net coding on how to do this
    :

    Private Sub rgvProblems_FilterPopupInitialized(sender As System.Object, e As Telerik.WinControls.UI.FilterPopupInitializedEventArgs) Handles rgvProblems.FilterPopupInitialized

    If (e.Column.Name = "Raised")  Then

    Dim filterPopup As RadDateFilterPopup = DirectCast(e.FilterPopup, RadDateFilterPopup)
    Dim item As RadMenuItem = DirectCast(filterPopup.Items(1), RadMenuItem)

    If (item IsNot Nothing) Then
    'Only BETWEEN operator is visible
    item.Items(0).Visibility = ElementVisibility.Collapsed
    item.Items(1).Visibility = ElementVisibility.Collapsed
    item.Items(2).Visibility = ElementVisibility.Collapsed
    item.Items(3).Visibility = ElementVisibility.Collapsed
    item.Items(4).Visibility = ElementVisibility.Collapsed
    item.Items(5).Visibility = ElementVisibility.Collapsed
    item.Items(6).Visibility = ElementVisibility.Collapsed
    item.Items(7).Visibility = ElementVisibility.Collapsed
    item.Items(9).Visibility = ElementVisibility.Collapsed

    End If


    Many thanks who can help me out on this.
  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 03 Feb 2015 Link to this post

    Hello,

    Thank you for contacting us.

    Please refer to the GridView >> Excel-like filtering help article >> Customizing composite filter dialog section. You can subscribe to the CreateCompositeFilterDialog event and customize the desired controls contained in the CompositeFilterForm.Controls collection.

    P.S. The other duplicate forum thread that you have opened on the same topic has been remove. We kindly ask you to use just one thread for a specific problem. 

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Dess
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. J
    J avatar
    9 posts
    Member since:
    Jan 2015

    Posted 04 Feb 2015 in reply to Dess Link to this post

    Hi Dess

    Thank you for your reply on this issue.

    I did spot this article and cannot find any intellisense on this method CreateCompositeFilterDialog event.

    Please can you advise on how to do this on vb.net coding - can you please provide a working sample on this.

    I am struggling to work out how to make the visibility hidden for the checkbox, dropdownlists etc per my first post.

    Please can you help me on this.

    Many thanks to you
  5. J
    J avatar
    9 posts
    Member since:
    Jan 2015

    Posted 04 Feb 2015 in reply to Dess Link to this post

    Hi Dess

    I tried to find where the  CreateCompositeFilterDialog event within the radgridview or even through the intellisense, but I cannot simply find it at all.

    I can see there is a way to do:

     Dim itemBetween As RadFilterComposeMenuItem = DirectCast(item.Items(8), RadFilterComposeMenuItem)
     Dim filterForm As CompositeFilterForm = New CompositeFilterForm()
     filterForm.Initialize(e.Column, itemBetween.FilterDescriptor, True)


    But I can't get beyond that in how to customize it i.e. hiding the controls on the filter dialog

    Please advise/help with sample coding

    Many thanks
  6. J
    J avatar
    9 posts
    Member since:
    Jan 2015

    Posted 06 Feb 2015 in reply to J Link to this post

    Hello

    Is anyone out there able to help out on this filter dialog issue please?

    Thank You!
  7. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 09 Feb 2015 Link to this post

    Hello,

    Thank you for writing back.

    Please find attached a sample project demonstrating how to hide a specific control by using the CreateCompositeFilterDialog event. Note that this event was introduced in Q3 2014 SP1 (version 2014.3.1202). For versions, prior than Q3 2014 SP1, you can refer to this forum thread where it is explained how you can customize the dialog.

    I hope this information helps. If you have any additional questions, please let me know.
     
    Regards,
    Dess
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. J
    J avatar
    9 posts
    Member since:
    Jan 2015

    Posted 09 Feb 2015 in reply to Dess Link to this post

    Hi Dess

    Thank you for coming back to this post.

    I can confirm we are using Winform Q2 2013 controls versions.

    In fact, as you suggested to refer to this link: http://www.telerik.com/forums/hide-available-filters-drop-down

    I did use the exact coding and in the for loop of controls under ChangeFont method; I tried to make the [Not] checkbox visible to false - it wasn't possible. Then I struggled even to make the filters dropdowns (2 of them)  visibility to false.

    It was not doing anything at all.

    This is where I need your expertise to help me understand where or why it is not working; can you please provide for this version and methods as shown in the link to be workable - a sample coding in VB.Net

    I would be extremely grateful if you can assist me on this.

    Many thanks
  9. J
    J avatar
    9 posts
    Member since:
    Jan 2015

    Posted 09 Feb 2015 in reply to Dess Link to this post

    Hi Dess

    Based on the link you have provided for prior versions of 2013 and 2012, I tried this following code and surprisingly the groupbox is still visible which shouldn't be the case:

     'Hide the specified radcontrols within Between Filter Menu option
      Dim itemBetween As RadFilterComposeMenuItem = DirectCast(item.Items(8), RadFilterComposeMenuItem)
      Dim filterForm As CompositeFilterForm = New CompositeFilterForm()
      filterForm.Initialize(e.Column, itemBetween.FilterDescriptor, True)

      For Each c As RadControl In filterForm.Controls
             Dim groupBox As RadGroupBox = TryCast(c, RadGroupBox)
                    If groupBox IsNot Nothing Then
                            groupBox.Controls(0).Visible = False
                    End If
       Next

    So for some reason it is not taking the visibility into any account.

    Please advise/assist with a sample coding (VB.Net)

    Many Thanks













  10. J
    J avatar
    9 posts
    Member since:
    Jan 2015

    Posted 11 Feb 2015 in reply to Dess Link to this post

    Hello

    Is anyone out there able to help out on this filter dialog issue please?

    Thank You!
  11. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 11 Feb 2015 Link to this post

    Hello,

    Thank you for writing back.

    Following the introduced approach in the referred forum post, I have prepared a sample project where the first control in the RadGroupBox is hidden and the font is successfully changed. Please have a look at the attached zip file.

    I would add that the usual response time for forums is 72 hours (business days only). More information about the support plans is available here: http://www.telerik.com/purchase/support-plans.aspx.

    I hope this information helps. If you have any additional questions, please let me know.

    Regards,
    Dess
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready