Hi, I tried below code and it works fine.
ASP
<telerik:RadGrid id="RadGrid1" runat="server">
<ClientSettings>
<Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />
</ClientSettings>
</telerik:RadGrid>
Javascript:
<script type="text/javascript">
function pageLoad() {
var grid = $find("<%= RadGrid1.ClientID %>");
var columns = grid.get_masterTableView().get_columns();
for (var i = 0; i < columns.length; i++) {
columns[i].resizeToFit();
}
}
</script>
The problem is, when you have multiple RadGrid in RadTabStrip, it only works on the RadGrid in the first selected tab/pageview.
Hoy to autofit the RadGrid that sits in the other tab/page view?
Anyone can help?