This is a migrated thread and some comments may be shown as answers.

Grid Column Width not displaying at set width

1 Answer 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris Holmes
Top achievements
Rank 1
Chris Holmes asked on 31 Oct 2014, 03:40 PM
I have a grid(see below) with specified widths for the columns.  Once the page starts to render the widths are correct; as soon as the grid is databound it auto generates widths for the columns.  The issue is that these new widths are nothing like what I have specified.  Any ideas?

 <%= Html.Telerik().Grid<WebUI.Models.UserMaintenance>()    
    .Name("CheckedUsers")
    .DataKeys(keys => 
    { 
        keys.Add(u => u.Id); 
    })      
    .Columns(columns =>        
    {
        //columns.Bound(u => u.Id).Hidden(true);
        //columns.Bound(u => u.Name).Width(350);
        columns.Bound(item => item.UserId).Title("User Id").Width(5);
        columns.Bound(item => item.FirstName).Title("First Name").Width(15);
        columns.Bound(item => item.LastName).Title("Last Name").Width(15);
        columns.Bound(item => item.OrgName).Title("Org Name").Width(25);
        columns.Bound(item => item.Email).Title("Email Address").Width(20);
        columns.Bound(item => item.Language).Title("Language").ReadOnly().Width(10);
        columns.Bound(item => item.ApplicationAssigned).Title("Applications").ReadOnly().Width(15);
        columns.Bound(item => item.ComplianceAssigned).Title("Compliance").ReadOnly().Width(51);
        columns.Bound(item => item.UserType).Title("User Type").ReadOnly().Width(15);
        columns.Bound(item => item.LastActivityDate).Title("Last Sign In").ReadOnly().Width(15);
        columns.Bound(item => item.LockedOut).Title("Locked Out").ReadOnly().Width(5);
        columns.Command(commands =>
            {
                commands.Custom("unlock").Text("Unlock").Ajax(true);
            }
            ).Title("Unlock User").Width(5);
        columns.Command(commands =>
        {
            commands.Edit().ButtonType(GridButtonType.Image);
            commands.Delete().ButtonType(GridButtonType.Image);
        }).Width(5);
       
    })
    .Editable(editing => editing.Mode(GridEditMode.InLine))
    .Filterable()
    .Sortable()
           //.ClientEvents(clientEvents => clientEvents.OnDataBinding("onDataBinding").OnDelete("onCheckedUsersDelete").OnError("onCheckedUsersError"))
    .ClientEvents(clientEvents => clientEvents.OnDelete("onCheckedUsersDelete").OnError("onCheckedUsersError").OnSave("onCheckedUsersSave").OnCommand("onCheckedUsersCommand"))
    .DataBinding(dataBinding => dataBinding.Ajax().Select("_GetAllMembershipUser", "Survey")
                                                    .Delete("_DeleteMembershipAssigned", "Survey")
                                                    .Update("_EditMembershipUser","Survey"))
    .HtmlAttributes(new { style = "min-width:1500px" })

    %>

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 04 Nov 2014, 11:57 AM
Hi Chris,


We cannot provide assistance for the Telerik MVC Extensions Grid, as this product was discontinued in mid 2013. We strongly recommend using UI for ASP.NET MVC instead.

Regards,
Dimiter Madjarov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Chris Holmes
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or