Setting width of column in radgridview does not work.

1 Answer 139 Views
Miscellaneous
Piyush
Top achievements
Rank 1
Piyush asked on 09 Aug 2021, 06:23 AM

GridViewDataColumn col = new GridViewDataColumn();

                col.Header = "Order Number";
            col.UniqueName = "TRP";
           
            col.Width = 20;

OpenProcsGridView.Columns.Add(col);

it does not set the col width to 20 and automatically open the radgridview with default size/header text size\proportiaonally to grid size.

Can you please help that how to set a column width in a customeized way.


            
Dess | Tech Support Engineer, Principal
Telerik team
commented on 09 Aug 2021, 06:50 AM

Hello, Piyush,

It seems that you missed to specify the product when submitting this forum post. Could you please share with us what is the exact Telerik product that you are currently using? Thus, we will update the correct product in this forum and the appropriate community would gladly assist you. 

Thank you in advance for your understanding and cooperation. I am looking forward to your reply.

Piyush
Top achievements
Rank 1
commented on 09 Aug 2021, 07:31 AM

Hello 
i am using radgridview in telerik in wpf application.

Pls let me know if it answers your question

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 11 Aug 2021, 10:44 AM
Hello Piyush,

I have created a sample project implementing the code snippet that was provided, but I could not reproduce the mentioned behavior. As the code works correctly on my end.

Furthermore, I am attaching the project for you to test out, and also, feel free to edit it, so it can reproduce the issue that you are experiencing.

Regards,
Stenly
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Miscellaneous
Asked by
Piyush
Top achievements
Rank 1
Answers by
Stenly
Telerik team
Share this question
or