Jul 02, 2011, 4:49 PM
How to display empty number field in the gridpanel
Hi friends,
I am new to ext.net. i am exploring ext.net examples. I have one problem.
In my DataBase i have a table, in wchich a column has all integers and some NULL values. I get the data from this table and bind it to the gridpanel using store.
But in my gridpanel it is showing '0' instead of empty value. Please help me where i am doing wrong.
I am new to ext.net. i am exploring ext.net examples. I have one problem.
In my DataBase i have a table, in wchich a column has all integers and some NULL values. I get the data from this table and bind it to the gridpanel using store.
But in my gridpanel it is showing '0' instead of empty value. Please help me where i am doing wrong.
<ext:Store ID="testStore" runat="server" PruneModifiedRecords="true">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="VacationHours" Type="Int">
</ext:RecordField>
/*other fields here*/
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:GridPanel ID="GridPanel2" runat="server" StoreID="testStore" Height="600" Width="900"
Title="Test Grid">
<ColumnModel>
<Columns>
<ext:Column DataIndex="VacationHours" Header="VacationHours" Width="100">
<Editor>
<ext:NumberField ID="NumberField1" runat="server"
EmptyText="testing Text" SelectOnFocus="true" MaxLength="4">
</ext:NumberField>
</Editor>
</ext:Column>
/*other columns*/
<ext:CommandColumn Width="110">
<Commands>
<ext:GridCommand Icon="Delete" CommandName="CommandName" Text="Delete" Disabled="false" />
<ext:GridCommand Icon="NoteEdit" CommandName="Edit" Text="Edit" />
</Commands>
</ext:CommandColumn>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel runat="server" ID="rowSelectionModel"></ext:RowSelectionModel>
</SelectionModel>
<Listeners>
<Command Handler="Ext.Msg.alert(command,record.data.Gender)" />
</Listeners>
</ext:GridPanel>
Please see the below images i attached to know the original datatable and how it is appearing in the gridpanel.