iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
We use a webgrid of about 2000 rows and it is very slow to use arrow keys to navigate the grid. Please take a look of our layout setting and our client script and see how can we improve the performance.
Thanks,
Luwen
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" OnBatchUpdate="WebGrid1_BatchUpdate"
OnExport="WebGrid1_Export" OnInitializeRow="WebGrid1_InitializeRow" OnInitializeLayout="WebGrid1_InitializeLayout" OnInitializeDataSource="WebGrid1_InitializeDataSource" OnInitializePostBack="WebGrid1_InitializePostBack" > <RootTable DataKeyField="TranSeq" DataMember="TransList" > <ChildTables> <ISWebGrid:WebGridTable Caption="Preparer Notes" ColumnFooters="Yes" DataMember="PrepNotesList" AllowAddNew="Yes"> <Columns> <ISWebGrid:WebGridColumn ColumnType="ButtonImage" Caption=" " Width="25px" Name="Delete" ButtonImage="images/delete.gif" EditType="Custom" HeaderTooltip="Delete Item"> <ButtonStyle CssClass="ButtonStyle" HorizontalAlign="Left"></ButtonStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Transaction Detail" DataMember="TranSeq" Name="TranSeq" Visible="true" > </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Priority" FilterEditType="DropdownList" EditType="DropdownList" Name="NotePriority" DataMember="NotePrty" HiddenDataMember="TranSeq" InputRequired="true" DefaultText="Information" DefaultValue="0" FooterText="Total Rows:" AggregateFunction="Count"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Explanation" DataMember="Explanation" Name="NoteExplanation" AllowMultiLine="false" Width="250px" TextboxMaxlength="180" EditType="ResizableTextbox" FilterEditType="TextBox" > </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Created By" DataMember="AddedIni" Name="CreateBy" EditType="NoEdit" > <CellStyle HorizontalAlign="Center"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Created Date" DataMember="Added_Dt" Name="CreateDate" EditType="NoEdit" > <CellStyle HorizontalAlign="Right"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Updated By" DataMember="ChngIni" Name="UpdatedBy" EditType="NoEdit" > <CellStyle HorizontalAlign="Center"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Updated Date" DataMember="Chng_Dt" Name="UpdateDate" EditType="NoEdit" > <CellStyle HorizontalAlign="Right"> </CellStyle> </ISWebGrid:WebGridColumn> </Columns> </ISWebGrid:WebGridTable> </ChildTables> <Columns> <ISWebGrid:WebGridColumn ColumnType="ButtonImage" Width="25px" Caption=" " Name="Delete" ButtonImage="images/delete.gif" EditType="Custom" HeaderTooltip="Delete Item"> <ButtonStyle CssClass="ButtonStyle" HorizontalAlign="Left"></ButtonStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn AllowGrouping="No" AllowSizing="No" AllowSorting="Yes" ColumnType="CheckBox" FilterEditType="Checkbox" EditType="NoEdit" IsRowChecker="true" IsAutoIncrement="true" Name="RowChecker" ShowInSelectColumns="No" Width="35px" > </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Preparer Note" EditType="NoEdit" Name="PrepCount" Width="65px" DataMember="PrepCount" FilterEditType="TextBox"> <CellStyle HorizontalAlign="Center"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Transaction Detail" Name="TranSeq" EditType="NoEdit" FilterEditType="TextBox" DataMember="TranSeq" ColumnType="HyperLink" HyperlinkFormatString="javascript: opendetails()" HyperlinkTarget="Self" FooterText="Total Rows:" AggregateFunction="Count" > <CellStyle HorizontalAlign="Center"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Tax Code" DataMember="NumTax_Cd" EditType="TextBox" Name="TaxCodeTxt" Width="55px" FilterEditType="TextBox"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Tax Code" DataMember="NumTax_Cd" FilterEditType="DropdownList" EditType="WebComboNET" Name="TaxCode" WebComboID="WebCombo1" Width="350px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Posting Date" Name="PostingDate" DataMember="Posting_Dt" DataFormatString="MM/dd/yyyy" EditType="NoEdit" FilterEditType="CalendarCombo"> <CellStyle HorizontalAlign="Right"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Tax Effective Date" Name="TaxEffDate" DataMember="TaxEff_Dt" EditType="TextBox" DataFormatString="MM/dd/yyyy"> <CellStyle HorizontalAlign="Right"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Asset ID" EditType="TextBox" Name="AssetId" Width="70px" DataMember="AssetId" TextboxMaxlength="12" FilterEditType="TextBox"> <CellStyle HorizontalAlign="Right" CustomRules="text-transform: uppercase"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Asset Name" Name="AssetName" Width="150px" DataMember="AssetName" AllowMultiLine="False" FilterEditType="TextBox"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Explanation" Name="Explanation" Width="300px" DataMember="Explanation" EditType="ResizableTextbox" TextboxMaxlength="1257" AllowMultiLine="False" FilterEditType="TextBox"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Income Cash" EditType="NoEdit" Name="IncCash" Width="70px" DataMember="IncCash" DataFormatString="$##,###.00" FilterEditType="TextBox"> <CellStyle HorizontalAlign="Right"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Principal Cash" EditType="NoEdit" Name="PrinCash" Width="70px" DataMember="PrinCash" DataFormatString="$##,###.00" FilterEditType="TextBox"> <CellStyle HorizontalAlign="Right"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Taxable Amount" EditType="TextBox" Name="TaxableAmt" Width="70px" DataMember="TaxableAmt" DataFormatString="$##,###.00"> <CellStyle HorizontalAlign="Right"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Ex-Dividend Date" Name="ExDivDate" Width="90px" DataMember="ExDiv_Dt" DataFormatString="MM/dd/yyyy" EditType="CalendarCombo"> <CellStyle HorizontalAlign="Right"> </CellStyle> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Tax Code Description" DataMember="NumTax_Cd" EditType="NoEdit" Name="TaxCodeDesc" Width="300px" FilterEditType="TextBox" AllowMultiLine="false"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="TAV Tax Code" EditType="TextBox" Name="TAVTaxCode" Width="70px" DataMember="TAVTax_Cd" DataType="System.Int" FilterEditType="TextBox"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Revised Tran Type" EditType="DropdownList" Name="TranType" Width="190px" DataMember="Tran_Cd" FilterEditType="DropdownList" AllowMultiLine="false"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="HIT Reviewed" EditType="Checkbox" Name="HitReviewed" Width="75px" DataMember="HITReviewed_Cd" ColumnType="CheckBox" FilterEditType="Checkbox"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="HIT Message" EditType="DropdownList" Name="HitMsg" AllowMultiLine="false" Width="350px" DataMember="HIT_Cd" ColumnType="Text" FilterEditType="DropdownList"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> <LayoutSettings AllowColumnSizing="Yes" AllowColumnMove="Yes" PersistRowChecker="true" AllowEdit="Yes" AllowExport="Yes" AllowFilter="Yes" AllowGrouping="Yes" AllowSelectColumns="Yes" AllowSorting="Yes" GridLineColor="#727272" GridLines="Both" GridLineStyle="Solid" PagingMode="ClassicPaging" PagingSize="500" AllowBatchUpdate="true" PagingStyleUI="Slider" AllowMultipleSelection="Yes" GroupByBoxVisible="false" HeaderClickAction="SortMulti" VerboseEditingInformation="true" NewRowLostFocusAction="AlwaysUpdate" FocusNewRowOnLastCell="true" AllowColumnFreezing="No" ApplyFiltersKey="Enter" EditOnClick="True" AutoFilterSuggestion="true" PagingExportMode="ExportAllData" InProgressUIBehavior="ChangeCursorToHourGlass" HeaderWrapDefault="true" PagingDetectPartialGroupRows="True" Hierarchical="true" CellClickAction="CellSelect" ColumnFooters="Yes" ShowFilterStatus="True" ShowColumnAction="true" RowHeightDefault="-1px" ColumnFooterAggregateMode="CalculateAllData" AutoHeight="true" HelpURL="tools.aspx" RestoreRowSelection="All" AutoWidth="true"> <FreezePaneSettings ShowInContextMenu="false" MaxFrozenColumns="6" /> <BatchUpdateSettings AllowReviewChanges="True" HighlightChanges="false" PromptUnsavedChanges="False" AutomaticObjectUpdate="false" /> <ClientSideEvents OnAfterExitEditMode="OnCellValidate" OnEditKeyDown="OnEditKeyDown_Revised" /> <EditFocusCellStyle CssClass="EditFocusCellStyle"> </EditFocusCellStyle> <EditTextboxStyle CssClass="EditTextboxStyle"> </EditTextboxStyle> <FrameStyle CssClass="FrameStyle"> </FrameStyle> <GroupByBox> <Style CssClass="GroupByBoxStyle"> </Style> <LabelStyle CssClass="GroupByBoxLabelStyle" /> </GroupByBox> <GroupRowInfoStyle CssClass="GroupRowInfoStyle"> </GroupRowInfoStyle> <AlternatingRowStyle CssClass="AlternatingRowStyle" Wrap="true"></AlternatingRowStyle> <RowStyle CssClass="RowStyle" Wrap="true"></RowStyle> <SelectedRowStyle CssClass="SelectedRowStyle" /> <HeaderStyle CssClass="HeaderStyle" Wrap="true"></HeaderStyle> <NewRowStyle CssClass="NewRowStyle"> </NewRowStyle> <FooterStyle CssClass="FooterStyle" /> <StatusBarStyle CssClass="StatusBarStyle"> </StatusBarStyle> <StatusBarCommandStyle> <Normal CssClass="StatusBarCommandStyleNormal"> </Normal> <Over CssClass="StatusBarCommandStyleOver"> </Over> <Active CssClass="StatusBarCommandStyleOver"> </Active> </StatusBarCommandStyle> <HyperlinkStyle CssClass="HyperlinkStyle" /> <DeletedRowStyle CssClass="DeletedRowStyle"> </DeletedRowStyle> <AddedRowStyle CssClass="AddedRowStyle"> </AddedRowStyle> <FilterRowStyle CssClass="FilterRowStyle" Wrap="false" /> <RowHeaderStyle CssClass="RowHeaderStyle" /> </LayoutSettings> </ISWebGrid:WebGrid> <ISWebCombo:WebCombo ID="WebCombo1" runat="server" OnInitializeDataSource="WebCombo1_InitializeDataSource" UseDefaultStyle="True" Width="350px" > <LayoutSettings EntryMode="AutoComplete"> </LayoutSettings> </ISWebCombo:WebCombo> <ISWebInput:WebInput ID="WebInputDate" runat="server" Width="140px"> <HighLight IsEnabled="True" Type="Phrase" /> <CultureInfo CultureName="en-US"> </CultureInfo> <EditFormat Format="MM/dd/yyyy" IsEnabled="True"> <MaskInfo MaskExpression="00/00/0000"> </MaskInfo> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </EditFormat> <DateTimeEditor IsEnabled="false"> </DateTimeEditor> </ISWebInput:WebInput> <ISWebInput:WebInput ID="WebInputCurrency" runat="server" Width="140px"> <DisplayFormat Format="c" IsEnabled="True" Type="Number"> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </DisplayFormat> </ISWebInput:WebInput> </form> <script type="text/javascript"> function opendetails() { } function OnCellValidate(controlId, tblName, editObject) { try { var WebGrid1 = ISGetObject(controlId); var rootTable = WebGrid1.RootTable; var name1 = ""; var name2 = ""; var addr1 = ""; var addr2 = ""; var city = ""; var state = ""; var zip = ""; var foreign = ""; if (editObject != null) { var cell = wgGetCellByElement(editObject.cellElement); var cellObject = editObject.ToCellObject(); var selectedObject = WebGrid1.GetSelectedObject(); var selectedRow = selectedObject.ToRowObject(); // return WebGridRow object var cells = selectedRow.GetCells(); // get the WebGridCell collection if (selectedRow.Type != "FilterRow") { var colName = cell.Name; var row = cell.Row; var OrigValue = cell.OldValue; var NewValue = cell.Value; //editObject.element.value; var validTaxCode = false; if (OrigValue != NewValue && selectedRow.Type != "NewRow") { cellObject.CellElement.style.fontWeight = "bold"; selectedRow.SetDataChanged(); WebGrid1.MarkEdit(); window.setTimeout(function () { WebGrid1.ExitEdit(1, 0, 0); }, 10); } } } } catch (err) { } } //use arrow keys to navigate the grid function OnEditKeyDown_Revised(controlId) { try { var grid = ISGetObject(controlId); var selectedObject = grid.GetSelectedObject(); var selectedRow = selectedObject.ToRowObject(); var keyCode = event.keyCode; if (selectedRow.Type == "FilterRow") { return true; } else if (selectedRow.Type == "NewRow" && event.keyCode == 13) { window.setTimeout(function () { grid.ExitEdit(1, 0, 0); }, 10); return true; } else if (selectedRow.Type != "NewRow" && (keyCode == 13 || keyCode == 40 || keyCode == 38 || keyCode == 37 || keyCode == 39)) { var curRow = grid.GetSelectedObject().rowIndex; var curCell = grid.GetActiveEditCell().cellIndex; var ac = grid.GetActiveEditCell(); var tbl = grid.Tables[ac.tblName]; var cellConst = 1; if (grid.RootTable.GetChildTables().length > 0) { cellConst = (tbl.GetChildTables().length > 0) ? 2 : 3; } var cellIdx = curCell - cellConst; var oCell = selectedRow.GetCell(cellIdx); // ResizableTextbox, MultiLineTextBox, WebCombo and dropdown list are exceptions if (oCell != null && oCell.Column.EditType != null) { var editType = oCell.Column.EditType.toUpperCase(); if (editType == "RESIZABLETEXTBOX" || editType == "MULTILINETEXTBOX") return true; if (editType == "DROPDOWNLIST" || editType == "WEBCOMBONET") { if (keyCode == 38 || keyCode == 40) return true; } } window.setTimeout(function () { grid.ExitEdit(1, 0, 0); }, 10); switch (keyCode) { case 38: //up ArrowMove(grid, curRow, -1, curCell, 0); break; case 40: //down case 13: //enter ArrowMove(grid, curRow, 1, curCell, 0); break; case 37: //left ArrowMove(grid, curRow, 0, curCell, -1); break; case 39: //right ArrowMove(grid, curRow, 0, curCell, 1); break; } return false; } return true; } catch (err) { window.setTimeout(function () { grid.ExitEdit(1, 0, 0); }, 20); } } /* Arrow/Value verticalAction horizontalAction * UP : -1 0 * DOWN : 1 0 * LEFT : 0 -1 * RIGHT : 0 1 */ function ArrowMove(grid, curRowIdx, verticalAction, curCellIdx, horizontalAction) { var selectedObject = grid.GetSelectedObject(); var selectedRow = selectedObject.ToRowObject(); var ac = grid.GetActiveEditCell(); var curRow = ac.rowElement; var tblElm = wgGetTable(curRow); var tbl = grid.Tables[ac.tblName]; var isParent = (tbl.GetChildTables().length > 0) ? true : false; var i = (isParent) ? 2 : 1; var rowConst = (verticalAction == 0) ? 0 : (verticalAction > 0) ? i : (-i); var cellConst = 1; if (grid.RootTable.GetChildTables().length > 0) { cellConst = (isParent) ? 2 : 3; } var nextRowIndex = curRowIdx + rowConst; var nextCellIndex = curCellIdx - cellConst + horizontalAction; if (horizontalAction == 0 && nextRowIndex >= 0 && nextRowIndex < tblElm.rows.length) { //different row, same column var destRow = wgGetRowByPosition(tblElm, nextRowIndex); var nextRow = wgGetRowByElement(destRow); var nextCell = nextRow.GetCell(nextCellIndex); if (nextCell != null) { grid.SetFocus(); nextRow.Select(); nextCell.Select(true); } } else if (verticalAction == 0 && nextCellIndex >= 0 && nextCellIndex < tbl.Columns.length) { //same row, different column var nextCell = selectedRow.GetCell(nextCellIndex); if (nextCell != null) { grid.SetFocus(); selectedRow.Select(); nextCell.Select(true); } } } </script>
Hi Luwen,
Actually, I tried to replicate your issue here by implementing your setting in our WebGrid. However, I couldn't replicate the performance issue that happen when you navigate the focus cell by using Arrow Key. Could you explain me more detail about problem that you faced when using this WebGrid? If this problem happen because large data transfer, you can use our custom paging. But it will be better if you have any simple sample so I can trace where the problem comes from. Looking forward to hear any feedback from you so I can help you further. Hope this helps.
Regards,Bernard
Hi Bernard,
The issue is it is very slow to use arrow keys to navigate the grid. We want a way to make it response faster.
1. Click any cell and use arrow keys to move the cursor. It takes long for the cursor to move to next cell.
2. Edit any cell and use arrow keys to exit the edit and move to next cell. It takes long for the cursor to move to next cell.
I could not upload my code. Your "Attach file" button does not work. I copy the aspx.cs code here. you can find the aspx code in previous page.
public partial class testb : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //if (!IsPostBack) EncryptGridCols(MRUTrust); } protected void WebGrid1_BatchUpdate(object sender, BatchUpdateEventArgs e) { } protected void WebGrid1_Export(object sender, ISNet.WebUI.WebGrid.ExportEventArgs e) { } protected void WebGrid1_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e) { DataTable dt = new DataTable(); dt.TableName = "TransList"; //dt.Columns.Add(new DataColumn("Key", Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("PrepCount", Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("TranSeq", Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("TaxCodeTxt", Type.GetType("System.String"))); dt.Columns.Add(new DataColumn("NumTax_Cd", Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("Posting_Dt", Type.GetType("System.DateTime"))); dt.Columns.Add(new DataColumn("TaxEff_Dt", Type.GetType("System.DateTime"))); dt.Columns.Add(new DataColumn("AssetId", Type.GetType("System.String"))); dt.Columns.Add(new DataColumn("AssetName", Type.GetType("System.String"))); dt.Columns.Add(new DataColumn("Explanation", Type.GetType("System.String"))); dt.Columns.Add(new DataColumn("IncCash", Type.GetType("System.Double"))); dt.Columns.Add(new DataColumn("PrinCash", Type.GetType("System.Double"))); dt.Columns.Add(new DataColumn("TaxableAmt", Type.GetType("System.Double"))); dt.Columns.Add(new DataColumn("ExDiv_Dt", Type.GetType("System.DateTime"))); dt.Columns.Add(new DataColumn("TAVTax_Cd", Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("Tran_Cd", Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("HITReviewed_Cd", Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("HIT_Cd", Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("RecipNo", Type.GetType("System.Int32"))); for (int i = 0; i < 2000; i++) { DataRow dr = dt.NewRow(); dr["PrepCount"] = i; dr["TranSeq"] = i; dr["TaxCodeTxt"] = "TaxCodeTxt " + i.ToString(); dr["NumTax_Cd"] = i % 400; dr["Posting_Dt"] = DateTime.Now; dr["TaxEff_Dt"] = DateTime.Now; dr["AssetId"] = "AssetId " + i.ToString(); dr["AssetName"] = "AssetName " + i.ToString(); dr["Explanation"] = "Explanation " + i.ToString(); dr["IncCash"] = i; dr["PrinCash"] = i; dr["TaxableAmt"] = i; dr["TaxEff_Dt"] = DateTime.Now; dr["TAVTax_Cd"] = i % 20; dr["Tran_Cd"] = i % 20; dr["HITReviewed_Cd"] = i % 20; dr["HIT_Cd"] = i % 20; dr["RecipNo"] = i % 20; dt.Rows.Add(dr); } DataTable dtt = new DataTable(); dtt.TableName = "PrepNotesList"; dtt.Columns.Add(new DataColumn("TranSeq", Type.GetType("System.Int32"))); dtt.Columns.Add(new DataColumn("NotePrty", Type.GetType("System.Int32"))); dtt.Columns.Add(new DataColumn("Explanation", Type.GetType("System.String"))); dtt.Columns.Add(new DataColumn("Added_Dt", Type.GetType("System.DateTime"))); dtt.Columns.Add(new DataColumn("AddedIni", Type.GetType("System.String"))); dtt.Columns.Add(new DataColumn("ChngIni", Type.GetType("System.String"))); dtt.Columns.Add(new DataColumn("Chng_Dt", Type.GetType("System.DateTime"))); DataSet dsParentChild = new DataSet(); dsParentChild.Tables.Add(dt); dsParentChild.Tables.Add(dtt); DataRelation rel; rel = new DataRelation("relAppProps", dsParentChild.Tables["TransList"].Columns["TranSeq"], dsParentChild.Tables["PrepNotesList"].Columns["TranSeq"]); dsParentChild.Relations.Add(rel); e.DataSource = dsParentChild; } private DataTable GetDDL(int count, string content) { DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("Key", Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("Value", Type.GetType("System.String"))); for (int i = 0; i < count; i++) { DataRow dr = dt.NewRow(); dr["Key"] = i; dr["Value"] = content + " " + i.ToString(); dt.Rows.Add(dr); } return dt; } protected void WebGrid1_InitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e) { try { WebValueList TaxCodeDesc = WebGrid1.RootTable.Columns.GetNamedItem("TaxCodeDesc").ValueList; TaxCodeDesc.DataSource = GetDDL(400, "TaxCode"); TaxCodeDesc.DataValueField = "Key"; TaxCodeDesc.DataTextField = "Value"; WebValueList HitMsg = WebGrid1.RootTable.Columns.GetNamedItem("HitMsg").ValueList; DataTable dtHitMsg = (DataTable)HitMsg.GetCachedDataSource(); if (dtHitMsg == null) { dtHitMsg = GetDDL(20, "HitCd"); } HitMsg.DataSource = dtHitMsg.Copy(); HitMsg.DataValueField = "Key"; HitMsg.DataTextField = "Value"; WebValueList RevTranCd = WebGrid1.RootTable.Columns.GetNamedItem("TranType").ValueList; DataTable dtRevTranCd = (DataTable)RevTranCd.GetCachedDataSource(); if (dtRevTranCd == null) { dtRevTranCd = GetDDL(30, "TranType"); } RevTranCd.DataSource = dtRevTranCd.Copy(); RevTranCd.DataValueField = "Key"; RevTranCd.DataTextField = "Value"; WebValueList NotePrty = WebGrid1.RootTable.ChildTables[0].Columns.GetNamedItem("NotePriority").ValueList; DataTable dtNotePrty = (DataTable)NotePrty.GetCachedDataSource(); if (dtNotePrty == null) { dtNotePrty = GetDDL(10, "NotePriority"); } NotePrty.DataSource = dtNotePrty.Copy(); NotePrty.DataValueField = "Key"; NotePrty.DataTextField = "Value"; } catch (Exception ex) { } } protected void WebGrid1_InitializePostBack(object sender, PostbackEventArgs e) { } protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { } protected void WebCombo1_InitializeDataSource(object sender, ISNet.WebUI.WebCombo.DataSourceEventArgs e) { // Set the valueList for the Tax Code WebValueList TaxCode = WebGrid1.RootTable.Columns.GetNamedItem("TaxCode").ValueList; DataTable dtTaxCode = (DataTable)TaxCode.GetCachedDataSource(); if (dtTaxCode == null) { dtTaxCode = GetDDL(400, "TaxCode"); } e.DataSource = dtTaxCode.Copy(); WebCombo1.DataValueField = "Key"; WebCombo1.DataTextField = "Value"; } }
I tried to replicate your issue here. However, I couldn't replicate your issue by using your code above. When I enter edit mode on WebGrid and type the arrow key, it will immediately move to the next column or row. Although, it also depend from its editing control but it won't take much time to move to next column or next row. You can see the WebGrid performance video here. In my sample, I'm using default style because I don't have any of your defined styles. Also, could you let me know the version of WebGrid and browser that you're using to replicate this problem? Look forward to hear any feedback from you so I can help you further.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname