PDA

View Full Version : [CLOSED] GridPanel delete icon display problem on TabPanel



Tactem
May 02, 2013, 11:30 AM
Hi guys,
I have a problem of delete icon display of the GridPanel.
I have a TabPanel wich contains panels. One of this panel contains a Gridpanel.
On the image below, I have a grid on the left (1) and when I change row the tabPanel (2) is updated. Like you see TabPanel contains "Organisations access rights" panel which contains again GriPanel (Associations).
6138

So when the "Organisations access rights" panel is activated and I change row (1) I see delete icon. But when I activate "Modul access rights" or "Telecom category access rights" and I change the row (1) and when I re activate "Organisations access rights" panel I don't see delete icon.
61406141

In conclusion when I update the content of the TabPanel and if the tab which contains gridpanel is not activated I don't see delete icon.

The application is in webform. Can you please help me ?

Daniil
May 02, 2013, 12:06 PM
Hi @Tactem,

What Ext.NET version are you testing with?

Tactem
May 02, 2013, 12:37 PM
Hi Daniil I'm testing with the version 2.1.20440.


Hi @Tactem,

What Ext.NET version are you testing with?

Daniil
May 02, 2013, 12:44 PM
Sorry, I am not sure what this version is. Where did you get it from?

Tactem
May 02, 2013, 1:04 PM
It was the last version of the svn 2.1
I also have the 2.2 version of webform.

Tactem
May 02, 2013, 1:26 PM
I replaced the 2.1 version by the svn 2.2.0.23567 version but I have the same problem.

Daniil
May 02, 2013, 2:57 PM
I can't reproduce.

Please provide a test case.

Tactem
May 02, 2013, 4:25 PM
Daniil,

I added a example. In my second arry grid the company name doesn't display I don't know why but you can see my problem with delete icon.

61496150

Tactem
May 02, 2013, 4:29 PM
When I change array grid selection and if not "Organisation access rights" is not activated first, then when I activate it after selection change the icon disappears.

Please tell me if you can reproduce it.


Daniil,

I added a example. In my second arry grid the company name doesn't display I don't know why but you can see my problem with delete icon.

61496150

Daniil
May 02, 2013, 5:18 PM
Please post a sample direct here wrapping in code tags.

Please put the code behind direct to the ASPX page, see Example (Very Helpful) here.
Forum Guidelines For Posting New Topics (http://forums.ext.net/showthread.php?3440)

Tactem
May 03, 2013, 9:10 AM
All right Daniil,
here is the code example :



<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="TIOWTS.test.Test" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack && !X.IsAjaxRequest)
{
this.Store1.DataSource = this.Data;
this.Store1.DataBind();
}

}

private object[] Data
{
get
{
return new object[]
{
new object[] { "3m Co", 71.72, 0.02, 0.03, "9/1 12:00am" },
new object[] { "Alcoa Inc", 29.01, 0.42, 1.47, "9/1 12:00am" },
new object[] { "Altria Group Inc", 83.81, 0.28, 0.34, "9/1 12:00am" },
new object[] { "American Express Company", 52.55, 0.01, 0.02, "9/1 12:00am" },
new object[] { "American International Group, Inc.", 64.13, 0.31, 0.49, "9/1 12:00am" },
new object[] { "AT&T Inc.", 31.61, -0.48, -1.54, "9/1 12:00am" },
new object[] { "Boeing Co.", 75.43, 0.53, 0.71, "9/1 12:00am" },
new object[] { "Caterpillar Inc.", 67.27, 0.92, 1.39, "9/1 12:00am" },
new object[] { "Citigroup, Inc.", 49.37, 0.02, 0.04, "9/1 12:00am" },
new object[] { "E.I. du Pont de Nemours and Company", 40.48, 0.51, 1.28, "9/1 12:00am" },
new object[] { "Exxon Mobil Corp", 68.1, -0.43, -0.64, "9/1 12:00am" },
new object[] { "General Electric Company", 34.14, -0.08, -0.23, "9/1 12:00am" },
new object[] { "General Motors Corporation", 30.27, 1.09, 3.74, "9/1 12:00am" },
new object[] { "Hewlett-Packard Co.", 36.53, -0.03, -0.08, "9/1 12:00am" },
new object[] { "Honeywell Intl Inc", 38.77, 0.05, 0.13, "9/1 12:00am" },
new object[] { "Intel Corporation", 19.88, 0.31, 1.58, "9/1 12:00am" },
new object[] { "International Business Machines", 81.41, 0.44, 0.54, "9/1 12:00am" },
new object[] { "Johnson & Johnson", 64.72, 0.06, 0.09, "9/1 12:00am" },
new object[] { "JP Morgan & Chase & Co", 45.73, 0.07, 0.15, "9/1 12:00am" },
new object[] { "McDonald\"s Corporation", 36.76, 0.86, 2.40, "9/1 12:00am" },
new object[] { "Merck & Co., Inc.", 40.96, 0.41, 1.01, "9/1 12:00am" },
new object[] { "Microsoft Corporation", 25.84, 0.14, 0.54, "9/1 12:00am" },
new object[] { "Pfizer Inc", 27.96, 0.4, 1.45, "9/1 12:00am" },
new object[] { "The Coca-Cola Company", 45.07, 0.26, 0.58, "9/1 12:00am" },
new object[] { "The Home Depot, Inc.", 34.64, 0.35, 1.02, "9/1 12:00am" },
new object[] { "The Procter & Gamble Company", 61.91, 0.01, 0.02, "9/1 12:00am" },
new object[] { "United Technologies Corporation", 63.26, 0.55, 0.88, "9/1 12:00am" },
new object[] { "Verizon Communications", 35.57, 0.39, 1.11, "9/1 12:00am" },
new object[] { "Wal-Mart Stores, Inc.", 45.45, 0.73, 1.63, "9/1 12:00am" }
};
}
}

private object[] Data1
{
get
{
return new object[]
{
new object[] { "3m Co" },
new object[] { "Alcoa Inc" },
new object[] { "Altria Group Inc" },
new object[] { "American Express Company" },
new object[] { "Wal-Mart Stores, Inc." }
};
}
}

[DirectMethod]
public void LoadSecondGridData()
{
this.Store2.DataSource = this.Data1;
this.Store2.DataBind();
}
</script>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script>
var template = '<span style="color:{0};">{1}</span>';

var change = function (value) {
return Ext.String.format(template, (value > 0) ? "green" : "red", value);
};

var pctChange = function (value) {
return Ext.String.format(template, (value > 0) ? "green" : "red", value + "%");
};

var groupChange = function (record) {
App.direct.LoadSecondGridData();
};
</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout" MinHeight="400">
<Items>
<ext:Panel ID="PanelMainGroupRight" runat="server" Layout="BorderLayout" Border="false">
<Items>
<ext:Panel ID="PanelListGroup" runat="server" Region="West" MinWidth="300" Width="300" Layout="FitLayout"
Split="true">
<Items>
<ext:GridPanel
ID="GridPanel1"
runat="server"
Title="Array Grid"
Width="600"
Height="350">
<Store>
<ext:Store ID="Store1" runat="server">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="company" />
<%--<ext:ModelField Name="price" Type="Float" />
<ext:ModelField Name="change" Type="Float" />
<ext:ModelField Name="pctChange" Type="Float" />
<ext:ModelField Name="lastChange" Type="Date" DateFormat="M/d hh:mmtt" />--%>
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="Column1" runat="server" Text="Company" DataIndex="company" Flex="1" />
<%--<ext:Column ID="Column2" runat="server" Text="Price" DataIndex="price">
<Renderer Format="UsMoney" />
</ext:Column>
<ext:Column ID="Column4" runat="server" Text="Change" DataIndex="change">
<Renderer Fn="change" />
</ext:Column>
<ext:Column ID="Column5" runat="server" Text="Change" DataIndex="pctChange">
<Renderer Fn="pctChange" />
</ext:Column>
<ext:DateColumn ID="DateColumn1" runat="server" Text="Last Updated" DataIndex="lastChange" />--%>
</Columns>
</ColumnModel>
<Listeners>
<SelectionChange Handler="groupChange(selected[0]);" />
</Listeners>

</ext:GridPanel>
</Items>
</ext:Panel>
<ext:Panel ID="PanelInformation" runat="server" Region="Center" Layout="BorderLayout"
TitleAlign="Center" Title="Mask Detail"
MinWidth="300" Split="true" ButtonAlign="Center">
<Items>
<ext:Panel ID="PanelNoeud" runat="server" Region="Center" Split="true" Layout="FitLayout">
<Items>
<ext:TabPanel ID="TabAdmin" runat="server" Layout="FitLayout">
<Items>
<ext:Panel ID="PanelAccess" runat="server" Title="Modul access rights"
Layout="BorderLayout">
<Items>
<ext:Panel ID="PanelRights" runat="server" Region="Center" MinWidth="600" AutoScroll="true">
<Items>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
<ext:Panel ID="PanelBuisGeo" runat="server" Title="Organisation access rights"
Layout="HBoxLayout">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:GridPanel
ID="GridPanel2"
runat="server"
Title="Second Array Grid"
Width="600"
Height="350">
<Store>
<ext:Store ID="Store2" runat="server">
<Model>
<ext:Model ID="Model2" runat="server">
<Fields>
<ext:ModelField Name="company1" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="Company" DataIndex="company" Flex="1" />
<ext:CommandColumn runat="server" Width="25">
<Commands>
<ext:GridCommand Icon="Delete" CommandName="Delete">
<ToolTip Text="Delete" />
</ext:GridCommand>
</Commands>
<Listeners>
<Command Handler="Ext.Msg.alert(command, record.data.company);" />
</Listeners>
</ext:CommandColumn>

</Columns>
</ColumnModel>
</ext:GridPanel>
</Items>
</ext:Panel>
<ext:Panel ID="PanelTelCat" runat="server" Title="Telecom category access rights"
Layout="FitLayout">
<Items>
</Items>
</ext:Panel>
</Items>
</ext:TabPanel>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
</ext:Panel>

</Items>
</ext:Viewport>

</body>
</html>

Daniil
May 03, 2013, 10:08 AM
Thank you. I have reproduced. We are investigating.

Daniil
May 03, 2013, 11:35 AM
Please set up HideMode="Offsets" for the PanelBuisGeo.

Tactem
May 03, 2013, 1:41 PM
It works great Daniil, thank you very much.


Please set up HideMode="Offsets" for the PanelBuisGeo.