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
Hello Gabriel,
Try setting the WebDialogWindow ContentPane property EnableRelativeLayout to true and setting the UltraWebGrid's Height and Width to 100%. This should provide the functionality you require.
Please let me know of your results.
Sincerely,
Mike D.Developer Support EngineerInfragistics, Inc.
Thanks you for the quick reply, but your code to set up the width and the height of the ultraWebGrid doesn't work.
ultrawebgrid.width = 100%; //naturally, doesnt' work
ultrawebgrid.width = "100%" //doesn't work
thank you
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.
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 ?