Grid is not resizing to minimum and Drag column here.... text is not wrapping

2 Answers 84 Views
GridView
Sitaram
Top achievements
Rank 1
Sitaram asked on 15 Nov 2023, 06:58 AM

Hi Team, 

When grouping is enabled , the grid size is not resizing to the size of the column and drag column here text is not wrapping, tried to use the minimum size property of radgridview but not able to solve the problem. Kindly suggest in this issue, attached screenshot related to the issue.

Thanks,

Sitaram

2 Answers, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 15 Nov 2023, 12:12 PM

Hello, Sitaram,

You can control the size of RadGridView control by setting its Size property. By default, columns in grid are created with width = 50. It is not recommended for the grid to have very small size since by default it is intended to show some useful data. However, I am not familiar with the exact setup that you have on your side. Is the grid docked in some container or not? 

If you want to make the text wrap in the GroupPanelElement you can use the TextWrap property. In addition to this, you can adjust the group panel's height:

this.radGridView1.GridViewElement.GroupPanelElement.TextWrap = true;
this.radGridView1.GridViewElement.GroupPanelElement.MinSize = new Size(0, 30);

If you have any further questions, it would be greatly appreciated if you can provide more information about how your grid setup is and what exactly you are trying to achieve.

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.

Sitaram
Top achievements
Rank 1
commented on 20 Nov 2023, 01:37 PM

Hi Nadya, 

Thank you so much for the support,

We have one parent panel which is from windows form FlowLayoutPanel, the panel is docked.

In that panel we have two controls which are telerik grids, one for search and one for retrieving data , we have defined sizes for search and data grids, I have tried the solution mentioned above, but not able to get the result, In the following command

this.radGridView1.GridViewElement.GroupPanelElement.MinSize = new Size(0, 50);

When I change the height in above statement, its reflected in the grid, but the text wrapping is not getting reflected when minimising the width of the column, Adding screenshot for your reference.

 

 

Thanks & Regards,

Sitaram

0
Nadya | Tech Support Engineer
Telerik team
answered on 22 Nov 2023, 12:32 PM

Hello, Sitaram,

Following the provided additional information, I added a FlowLayoutPanel and place the RadGridView inside it. However, the panel is not supposed to affect the text wrapping in group panel. TextWrap works fine on my side. I am providing my sample project for your reference. Can you give it a try and let me know how it differs from your setup? Below you can see the result on my end:

Please let me know if I can assist you further.

Regards,
Nadya | Tech Support Engineer
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
Sitaram
Top achievements
Rank 1
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or