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

HELP! - Radgridview filter dialog

9 Answers 203 Views
Menu
This is a migrated thread and some comments may be shown as answers.
J
Top achievements
Rank 1
J asked on 29 Jan 2015, 04:46 PM

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.

9 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 03 Feb 2015, 10:02 AM
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.

 
0
J
Top achievements
Rank 1
answered on 04 Feb 2015, 09:57 AM
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
0
J
Top achievements
Rank 1
answered on 04 Feb 2015, 04:04 PM
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
0
J
Top achievements
Rank 1
answered on 06 Feb 2015, 04:57 PM
Hello

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

Thank You!
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Feb 2015, 07:06 AM
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.

 
0
J
Top achievements
Rank 1
answered on 09 Feb 2015, 09:01 AM
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
0
J
Top achievements
Rank 1
answered on 09 Feb 2015, 03:54 PM
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













0
J
Top achievements
Rank 1
answered on 11 Feb 2015, 12:32 PM
Hello

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

Thank You!
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Feb 2015, 04:44 PM
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.

 
Tags
Menu
Asked by
J
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
J
Top achievements
Rank 1
Share this question
or