Apr 24, 2014, 3:03 AM
(IE10, Compatibility View)How to optimize column(ImageCommand) width of GridPanel
Hi Ext.Net term,
I want to set column width(ImageCommand) in grid(IE10, Compatibility View).
If column width is equal to 33px, it looks good, but there're will be some extra space in front of the picture
If column width is less than 33px, it looks not good, like attachment.
Any advice?
Thanks
I want to set column width(ImageCommand) in grid(IE10, Compatibility View).
If column width is equal to 33px, it looks good, but there're will be some extra space in front of the picture
If column width is less than 33px, it looks not good, like attachment.
Any advice?
Thanks
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
this.Store1.DataSource = new object[]
{
new object[] { 1, 1, "Text 1", DateTime.Now.Date },
new object[] { 2, 2, "Text 2", DateTime.Now.Date },
new object[] { 3, 3, "Text 3", DateTime.Now.Date },
new object[] { 4, 4, "Text 4", DateTime.Now.Date },
new object[] { 5, 5, "Text 5", DateTime.Now.Date },
new object[] { 6, 6, "Text 6", DateTime.Now.Date },
new object[] { 7, 7, "Text 7", DateTime.Now.Date },
new object[] { 8, 8, "Text 8", DateTime.Now.Date },
new object[] { 9, 9, "Text 9", DateTime.Now.Date }
};
this.Store1.DataBind();
}
}
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Column Width - Ext.NET Examples</title>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:GridPanel ID="GridPanel1"
runat="server"
Title="Column Width Sample"
Width="1000"
Height="300">
<Store>
<ext:Store ID="Store1" runat="server">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="IntField" Type="Int" />
<ext:ModelField Name="ComboField" Type="Int" />
<ext:ModelField Name="TextField" Type="String" />
<ext:ModelField Name="DateField" Type="Date" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column runat="server" DataIndex="TextField" />
<ext:Column runat="server" ID="colImageCommand" Text="" Width="33" Align="Left">
<Commands>
<ext:ImageCommand HideMode="Display" CommandName="EditRow" Icon="ApplicationEdit"/>
</Commands>
</ext:Column>
</Columns>
</ColumnModel>
<View>
<ext:GridView MarkDirty="false" />
</View>
</ext:GridPanel>
</form>
</body>
</html>