Hello, Daniel,
The cells' width depends on the column's width. Note that
RadGridView supports two ways to
auto size the columns:
-
AutoSizeColumnsMode: columns can automatically fill the entire width of the grid. Just set the
AutoSizeColumnsMode property of the desired template to GridViewAutoSizeColumnsMode.
Fill.
- Best fit: the column widths can be set to fit its content by using the GridViewTemplate.
BestFitColumns or GridViewDataColumn.
BestFit methods. This mode distributes algorithm that attempts to fit in the header text and column data for all visible rows.
Mixing the two ways is not possible. However, you can best fit the columns and manually adjust the last (or any other) column's width according to the remaining space. You can subscribe to the RadGridView.
SizeChanged event and recalculate the last (or any other) column's width.
If you have hierarchy, it is necessary to access the Columns from the respective
GridViewTemplate that you want to manage (e.g. MasterTemplate.
Templates[0]). In case you are experiencing any further difficulties, it would be greatly appreciated if you can provide a sample project demonstrating the undesired behavior. Thus, we would be able to investigate the precise case and assist you further. Thank you in advance.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get
quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.
Learn More.