Nov 20, 2012, 3:59 PM
Prevent automatic trim in Grid Cell
I have some record with spaces before data... but when I load de store into the grid this spaces are automatically trimmed.
How can I do to prevent or disable this automatic trim?
It's a sample
- " B" are showed as "B"
- " C" are showed as "C"
- " D " are showed as "D"
- " E F " are showed as "E F"
Thanks in advance!
How can I do to prevent or disable this automatic trim?
It's a sample
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
this.BindData();
}
}
protected void MyData_Refresh(object sender, StoreRefreshDataEventArgs e)
{
this.BindData();
}
private void BindData()
{
this.Store1.DataSource = this.Data;
this.Store1.DataBind();
}
private object[] Data
{
get
{
return new object[]
{
new object[] { "A" },
new object[] { " B" },
new object[] { " C" },
new object[] { " D " },
new object[] { " E F " }
};
}
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Simple Array Grid With Paging and Remote Reloading - Ext.NET Examples</title>
<link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
</script>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:GridPanel
ID="GridPanel1"
runat="server"
StripeRows="true"
Title="Array Grid"
Width="600"
Height="290"
AutoExpandColumn="Company">
<Store>
<ext:Store ID="Store1" runat="server" OnRefreshData="MyData_Refresh">
<Reader>
<ext:ArrayReader>
<Fields>
<ext:RecordField Name="company" Type="String" />
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:RowNumbererColumn />
<ext:Column ColumnID="Company" Header="Company" Width="160" DataIndex="company">
</ext:Column>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
<LoadMask ShowMask="true" />
</ext:GridPanel>
</form>
</body>
</html>
In the Grid "A" is correct, but:- " B" are showed as "B"
- " C" are showed as "C"
- " D " are showed as "D"
- " E F " are showed as "E F"
Thanks in advance!
Last edited by inaltec; Nov 20, 2012 at 5:27 PM.