Hi all,
I have a webgrid in a webDialogWindow, but I want the width of the webgrid as the same of the webDialogWindow. Even when the resizer of the webDialogWindow is set to true.
thx
Gabriel Deschênes
Hey Mike,
I tried your code and this is how it looks by me. Do you have any suggestions?
Regards,
Ed Lehman
I do it for mine in the initialize layout event. I am sure you could do it in another event, as well. I made the text bold on the line that I think will help you.
protected void uwgTotals_InitializeLayout(object sender, LayoutEventArgs e) { UltraGridColumn col; foreach (UltraGridColumn col0 in e.Layout.Bands[0].Columns) { col0.Header.Style.HorizontalAlign = HorizontalAlign.Center; col0.CellStyle.HorizontalAlign = HorizontalAlign.Center; //col0.Width = 80; col0.AllowUpdate = AllowUpdate.No; col0.Width = Unit.Percentage(14.28); }
}
I cant set the witdh of my webGrid in my aspx page cause i create it dynamically in code behind.
So.... what can i do ?
Hello Gabriel,
The following code snippet demonstrates how to set this functionality in the Markup Code:
<ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height ="469px" Modal="True" Width="827px" WindowState="Normal" Resizer-Enabled="true" InitialLocation="Centered"> <ContentPane EnableRelativeLayout="true"> <Template> <igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server" Height="100%" Width="100%"> <......... > </igtbl:UltraWebGrid> </Template> </ContentPane></ig:WebDialogWindow>
Please let me know if this helps.
Sincerely,Mike D.
set the grid width in the aspx page.