Tnx Daniil,
here, the code for simulate my scenario:
======================================
Test.aspx
<%@ Page Language="vb" %>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim MenuItemPage As New Ext.Net.MenuItem("Page")
AddHandler MenuItemPage.DirectEvents.Click.Event, AddressOf MenuItem_Click
Dim Menu As New Ext.Net.Menu
Menu.Items.Add(MenuItemPage)
Dim ButtonMenu As New Ext.Net.Button
ButtonMenu.PaddingSpec = "0 0 0 0"
ButtonMenu.MenuArrow = False
ButtonMenu.Text = "<table cellpadding='0' cellspacing='0' style='width:100%'><tr><td align='center' valign='top'><img alt='' src='Menu.png' /></td></tr><tr><td align='center'>Menu</td></tr></table>"
ButtonMenu.Width = Unit.Pixel(60)
ButtonMenu.Height = Unit.Pixel(60)
ButtonMenu.Menu.Add(Menu)
ToolbarControl.Items.Add(ButtonMenu)
End Sub
Public Sub MenuItem_Click(sender As Object, e As Ext.Net.DirectEventArgs)
Dim MenuItem As Ext.Net.MenuItem = CType(sender, Ext.Net.MenuItem)
Dim UserControl As New Ext.Net.UserControlLoader
Select Case MenuItem.Text
Case "Page" : UserControl.Path = "Page.ascx"
End Select
PanelApplication.ContentControls.Add(UserControl)
PanelApplication.UpdateContent()
End Sub
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" />
<ext:Viewport runat="server">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Center" />
</LayoutConfig>
<Items>
<ext:Panel ID="PanelBanner" runat="server" Width="1000" Height="100" PaddingSpec="5 0 0 0">
<Items>
<ext:Image ID="ImageBanner" runat="server" />
</Items>
</ext:Panel>
</Items>
<Items>
<ext:Panel ID="PanelControl" runat="server" Width="1000" Height="70" PaddingSpec="5 0 0 0">
<Items>
<ext:Toolbar ID="ToolbarControl" runat="server" Border="false" />
</Items>
</ext:Panel>
</Items>
<Items>
<ext:Panel ID="PanelApplication" runat="server" Flex="1" Width="1000" Border="true" PaddingSpec="5 0 5 0" />
</Items>
</ext:Viewport>
</form>
</body>
</html>
NOTE: The Image "Menu.png" is attached.
======================================
Page.ascx
<%@ Control Language="vb" %>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not Ext.Net.X.IsAjaxRequest) Then
'StoreData.DataSource = DataManager.GetArticoli '---> Return System.Data.DataTable
'StoreData.DataBind()
End If
End Sub
</script>
<ext:Panel runat="server" Border="false">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:Panel runat="server" ID="PanelSearch" Height="120" Width="1000" Layout="card" ActiveIndex="0" DefaultBorder="true">
</ext:Panel>
<ext:GridPanel runat="server" StateID="GridData">
<Store>
<ext:Store runat="server" ID="StoreData">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="Field1" Type="String" />
<ext:ModelField Name="Field2" Type="String" />
<ext:ModelField Name="Field2" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="Text Field 1" DataIndex="Field1" />
<ext:Column runat="server" Text="Text Field 2" DataIndex="Field2" />
<ext:Column runat="server" Text="Text Field 3" DataIndex="Field3" />
</Columns>
</ColumnModel>
</ext:GridPanel>
</Items>
</ext:Panel>
======================================
The questions:
1) If you try to start the Page.aspx on Google Chrome you'll see that the button in the Toolbar renders bad the bitmap "Menu.png". In fact, the bitmap is displayed at the bottom and the text of the button "Menu" is not displayed well.
However, if you try to press F12 (development tools) you'll see that the bitmap is displayed correctly!
On Internet Explorer 11 this problem is not there.
How can I solve this problem?
To achieve the same result, instead of using HTML in button text, can I use a better method?
2) Page.aspx must show 3 areas.
- PanelBanner, 100 pixels high.
- PanelControl, 70 pixels high.
- PanelApplication. you must take all the vertical space available.
To do this the "GridPanel" contained in "Page.ascx" must be stretched?
How can I do?
3) The GridPanel must contain the returned data in a DataTable populated by a SQL call.
How can I do it?
Thank you very much !!