Dec 23, 2011, 8:38 AM
[CLOSED] Editable Grid Tab Navigation Issues
Hi,
I have a gridpanel with editors, attached below is the code, There are two problems,
1.When I press the tab key faster when the grid is in edit mode, The focus gets navigated to the controls outside the grid
2. When the datefield gets edited it does not show the value present in cell, hence after it leaves the cell it becomes empty
Kindly help me out asap.
I have a gridpanel with editors, attached below is the code, There are two problems,
1.When I press the tab key faster when the grid is in edit mode, The focus gets navigated to the controls outside the grid
2. When the datefield gets edited it does not show the value present in cell, hence after it leaves the cell it becomes empty
Kindly help me out asap.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ 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.Reader[0].Fields.Add(new RecordField() { Name = "tstring" });
this.Store1.Reader[0].Fields.Add(new RecordField() { Name = "tint" });
this.Store1.Reader[0].Fields.Add(new RecordField() { Name = "tdatetime" });
this.Store1.DataSource = Enumerable.Range(1, 100).Select(m => new DataSource
{
tstring = "Record" + m.ToString(),
tint = m,
tdatetime = DateTime.Now.AddDays(m)
}).ToList();
this.Store1.DataBind();
}
}
public class DataSource
{
public string tstring { get; set; }
public int tint { get; set; }
public DateTime tdatetime { get; set; }
}
</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>Ext.Net Example</title>
<script type="text/javascript">
function MaskAndCalculate() {
Ext.getBody().mask('Please wait....', "x-mask-loading");
var tout = setTimeout(function () {
Ext.getBody().unmask();
return true;
}, 1000);
}
</script>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Panel ID="proot" runat="server">
<Content>
<ext:TextField ID="txtFld" runat="server">
<Listeners>
<Blur Handler="MaskAndCalculate()" />
</Listeners>
</ext:TextField>
<ext:Container ID="Container1" runat="server">
<Items>
<ext:GridPanel ID="GridPanel1" runat="server" AutoHeight="true">
<Store>
<ext:Store ID="Store1" runat="server">
<Reader>
<ext:JsonReader>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column DataIndex="tint" Header="tint">
<Editor>
<ext:TextField ID="txtTint" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="tstring" Header="tstring">
<Editor>
<ext:TextField ID="txtString" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="tdatetime" Header="tdatetime">
<Editor>
<ext:DateField ID="dtDateTime" runat="server" />
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:CheckboxSelectionModel ID="rsmPI" SingleSelect="false" runat="server">
</ext:CheckboxSelectionModel>
</SelectionModel>
<Plugins>
<ext:GridPanelMaintainScrollPositionOnRefresh ID="GridPanelMaintainScrollPositionOnRefresh1"
runat="server">
</ext:GridPanelMaintainScrollPositionOnRefresh>
<ext:GridFilters ID="GridFilters1" runat="server">
<Filters>
<ext:StringFilter DataIndex="tint" />
<ext:NumericFilter DataIndex="tstring" />
<ext:DateFilter DataIndex="tdatetime" />
</Filters>
</ext:GridFilters>
</Plugins>
</ext:GridPanel>
</Items>
</ext:Container>
</Content>
</ext:Panel>
</form>
</body>
</html>
Last edited by Daniil; Jan 02, 2012 at 8:21 AM.
Reason: [CLOSED]