Click here to Skip to main content
16,016,168 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello all,
Is it possible to resize a column in client code for the Telerik MVC Grid? I am trying to resize a column on the grid in the onLoad event from JavaScript. If you can provide an example that would be great. I have tried this and it failed.

JavaScript
grid.resizeColumn(this.PreferenceValue, grid.columnFromTitle(columnTitle);
Posted
Updated 13-Nov-16 23:12pm
v3

 
Share this answer
 
Comments
GateKeeper22 17-Nov-11 8:01am    
I am using the MVC extension Grid not the AJAX grid. Looked at the javascript and can't really see how they are resizing the columns in that.
Found out that this isn't possible out of the box. Had to write my own javascript function to handle it. Can't post the code because it is owned by the company that I work for. Figured I would post that so that any one that finds this questions knows the answer.
 
Share this answer
 
Hi,

Am trying to resize column on mvcgrid:

Heres mycode used:Still it does not want to resize





@Html.Grid(Model).Named("GridResizing").Columns(columns =>
{
columns.Add(c => c.DogName).Titled("Dog Name").SanitizeEnabled.ToString();
columns.Add(c => c.BreedName).Titled("Breed");
columns.Add(c => c.DogAge).Titled("Age");
columns.Add(c => c.DogOwner).Titled("Owner Name");
columns.Add(c => c.DogSurname).Titled("Surname");
columns.Add(c => c.DogColour).Titled("Coulour");
columns.Add(c => c.DogAddress).Titled("Address");

}).WithPaging(10).Sortable(true);







Thanks
 
Share this answer
 
Comments
Richard Deeming 14-Nov-16 12:12pm    
If you want to ask a question, then ASK A QUESTION[^].

DO NOT post your question as a "solution" to someone else's question - especially not one that was asked, answered, and solved FIVE YEARS AGO!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900