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" })
%>
<%= 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" })
%>