6 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 18 Jul 2012, 01:27 PM
Hi Mirang,
You can use the client event OnColumnResizing in javascript for catching resizing of columns.
aspx:
JS:
Thanks,
Shinu.
You can use the client event OnColumnResizing in javascript for catching resizing of columns.
aspx:
<
telerik:RadGrid
runat
=
"server"
>
<
ClientSettings
>
<
ClientEvents
OnColumnResizing
=
"OnColumnResizing"
/>
<
Resizing
AllowColumnResize
=
"True"
AllowRowResize
=
"false"
ResizeGridOnColumnResize
=
"false"
ClipCellContentOnResize
=
"true"
EnableRealTimeResize
=
"false"
AllowResizeToFit
=
"true"
/>
</
ClientSettings
>
...
</
telerik:RadGrid
>
JS:
function
OnColumnResizing(sender,args) {
alert("fired");
}
Thanks,
Shinu.
0

Mirang
Top achievements
Rank 1
answered on 18 Jul 2012, 01:29 PM
I wanted to resize the columns from the javascript code. I just got across this link
http://www.telerik.com/community/forums/aspnet-ajax/grid/get-set-column-width-from-client-side.aspx
Is it useful ?
http://www.telerik.com/community/forums/aspnet-ajax/grid/get-set-column-width-from-client-side.aspx
Is it useful ?
0
Hi Mirang,
You could achieve your scenario by using the RadGrid client-side API which provides way to resize table view columns. Every GridTableView client-side object includes resizeColumn function which usage is described in the help article below.
Additionally, the example below shows how to use the resizeColumn method specifying the column index as first parameter and its width for seconds parameter.
Greetings,
Antonio Stoilkov
the Telerik team
You could achieve your scenario by using the RadGrid client-side API which provides way to resize table view columns. Every GridTableView client-side object includes resizeColumn function which usage is described in the help article below.
Additionally, the example below shows how to use the resizeColumn method specifying the column index as first parameter and its width for seconds parameter.
$find(
"RadGrid1"
).get_masterTableView().resizeColumn(1, 120)
Greetings,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Teju
Top achievements
Rank 1
answered on 10 Sep 2015, 06:44 AM
How to set AllowColumnResize=true at client side using javascript in master pages using the CSS selector , so that it would apply to all the grid specified.
0

Teju
Top achievements
Rank 1
answered on 10 Sep 2015, 07:46 AM
After a long debugger mode searching , finally my friend found the property -
grid.get_masterTableView()._owner.ClientSettings.Resizing.AllowColumnResize=true;
0
Hello Teju,
You can even shorten it as follows:
grid.ClientSettings.Resizing.AllowColumnResize=true;
Hope this helps.
Regards,
Eyup
Telerik
You can even shorten it as follows:
grid.ClientSettings.Resizing.AllowColumnResize=true;
Hope this helps.
Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items