4 Answers, 1 is accepted
You can set the widths for the individual columns (ItemStyle/HeaderStyle tags), declaratively in the .aspx code, from the code-behind or on the client. If the columns are autogenerated you can also use the columnCreated event handler, or alternatively use the PreRender event handler, and iterate through all the rendered columns (RadGrid1.MasterTableView.RenderColumns).
All the best,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
What I mean by this is when the user clicks the edit button the grid brings up the edit form showing the columns which can have their contents edited. By default it puts all these controls into one long column list (I know how to add extra columns if needed) but only give the columns a fixed width. I would like the edit column to take up 100% of the available width....
Thanks,
Marc
In this case, you may consider using a form template edit form, which would give you more flexibility over the visual layout of the control's edit form.
I hope this is a suitable option for you.
Sincerely yours,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
It would be nice if we could just make a single setting to change the width of he Autogenerated Form instead of have to dig quite this deep...
Private Sub gridPayments_CreateColumnEditor(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCreateColumnEditorEventArgs) Handles gridPayments.CreateColumnEditor
If e.Column.UniqueName = "comments" Then
If TypeOf e.ColumnEditor Is GridTextBoxColumnEditor Then
Dim tb = DirectCast(e.ColumnEditor, GridTextBoxColumnEditor)
With tb.TextBoxControl
.TextMode = TextBoxMode.MultiLine
.Rows = 5
.Width = Unit.Pixel(600)
End With
End If
End If
End Sub
I would still rather set it as a percentage, but doing so will only fill to the table and I could not dig around long enough to find out how to reference it. Setting it to a Pixel Unit will expand the table so I suppose one way around this is to set any control to a fixed size and the rest to a percentage... I will dig around more on this later.