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

Radgrid Filter popup width

8 Answers 528 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Razeen
Top achievements
Rank 1
Razeen asked on 04 Aug 2012, 07:57 PM
Hi,

Is there any way to best fit the Radgrids filter popup width? Now when i click filter button , filter popups with available values..If value is long i have to do horizontal scrolling to read the value.I dont want to that..

Thanks

8 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 09 Aug 2012, 06:15 AM
Hello Razeen,

Thank you for writing.

You can set the size of the filter popup to whatever you need in the FilterPopupInitialized event:
void radGridView1_FilterPopupInitialized(object sender, FilterPopupInitializedEventArgs e)
{
    ((BaseFilterPopup)e.FilterPopup).MinimumSize = new System.Drawing.Size(400, 400);
}

I hope that you find this information useful.
 
Regards,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Steve
Top achievements
Rank 1
answered on 21 Jun 2016, 02:45 PM

Hi, I know this is an old post, but I am trying to accomplish the same in my GridView w/o success.  Mine is a vb.net winforms app.

I tried both the FilterPopupInitialized event:

Private Sub RadGridView1_FilterPopupInitialized(sender As Object, e As FilterPopupInitializedEventArgs) Handles RadGridView1.FilterPopupInitialized

        DirectCast(e.FilterPopup, BaseFilterPopup).MinimumSize = New System.Drawing.Size(400, 400)
    End Sub

 

And the FilterPopupRequired event:

  Private Sub RadGridView1_FilterPopupRequired(sender As Object, e As FilterPopupRequiredEventArgs) Handles RadGridView1.FilterPopupRequired
        MessageBox.Show("Hello World")
    End Sub

 

Neither event fires, I added breakpoints and never hit them.

I'm probably missing something simple, I would be grateful for any help.

 

Thanks,

-Steve

0
Hristo
Telerik team
answered on 22 Jun 2016, 08:46 AM
Hello Steve,

Thank you for writing.

On my end, the event fires successfully. The question my colleague answered refers to the filter popup when excel-like filtering is enabled.

In case you refer to the context menu of the grid filter cells, you would need to handle the ContextMenuOpening event. I am sending you attached my test project.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms. For more information check out this blog post and share your thoughts.
0
Steve
Top achievements
Rank 1
answered on 22 Jun 2016, 03:15 PM

Hristo,

Thanks for sending the example.  It appears that we are not trying to accomplish the same thing.

 

I've included a picture of my RadGrid.  You will note that the column width for column "Home Dept" is proper to display the data.  However, when the user clicks the dropdown list to select valid Home Departments for filtering he cannot read the options as the dropdown is too narrow.

I could solve this by changing the width of the column so that it is wide enough to display the dropdown, but of course that results in much wasted space on the grid.

Is there any way to allow the dropdown selections to be wide while retaining the current column width ?

Thanks,

-Steve

0
Hristo
Telerik team
answered on 22 Jun 2016, 03:39 PM
Hi Steve,

Thank you for writing back.

The screenshot indicates that you are using a GridViewComboBoxColumn . If that is really the case you would need to handle the CellEditorInitialized event and resize the popup. Please check my code snippet below: 
private void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    if (e.Column is GridViewComboBoxColumn)
    {
        RadDropDownListEditor editor = (RadDropDownListEditor)this.radGridView1.ActiveEditor;
        RadDropDownListEditorElement editorElement = (RadDropDownListEditorElement)editor.EditorElement;
 
        editorElement.Popup.MinimumSize = new System.Drawing.Size(200, 0);
    }
}

I am also sending you a gif file showing the result on my end.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
Steve
Top achievements
Rank 1
answered on 22 Jun 2016, 03:51 PM

Perfect !!!

That is exactly what I was looking for.  

Thank you for your help,

-Steve

Reddy
Top achievements
Rank 1
commented on 06 Oct 2023, 02:42 PM

hi  i am required to resize the popup dynamically from ui,  may i know is there any property to make the filter popup resizable dynamically.
0
Nadya | Tech Support Engineer
Telerik team
answered on 11 Oct 2023, 10:37 AM

Hello, Reddy,

If I understand you correctly, you would like to be able to resize the popup of a GridViewComboBoxColumn. To achieve this you can handle the CellEditorInitialized event and set the DropDownSizingMode of RadDropDownListEditor. The sizing mode offers an enumeration of several options.

private void RadGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    if (e.Column is GridViewComboBoxColumn)
    {
        RadDropDownListEditor editor = (RadDropDownListEditor)this.radGridView1.ActiveEditor;
        editor.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
    }
}

I hope this helps. Should you have any other questions do not hesitate to contact us.

Regards,
Nadya
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Reddy
Top achievements
Rank 1
commented on 11 Oct 2023, 01:04 PM

Hi,

Not the coboboxcolumn popup.

I need  to resize the FilteringControl popup. While clicking any column filter Icon, popup is loaded right to filter the data.

 That popup I need to resize. Please provide the suggestions.

Thanks,

 

0
Nadya | Tech Support Engineer
Telerik team
answered on 12 Oct 2023, 09:13 AM

Hello, Reddy,

It is not clear which filtering mechanism you use: basic filtering or Excel-like filtering. Can you please clarify this?

In Excel-like filtering the filtering menu items are displayed in a custom filter form which is resizable out-of-the-box. See the attached gif file. However, if you are using basic filtering it displays a simple RadDropDownMenu and it is not resizable.

I hope this information helps. Please let me know if I can assist you further.

Regards,
Nadya
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridView
Asked by
Razeen
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Steve
Top achievements
Rank 1
Hristo
Telerik team
Nadya | Tech Support Engineer
Telerik team
Share this question
or