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
I have a WebGrid that uses an ASP DataSource to insert/update/delete data. This gets triggered if I delete a row or insert/update data and leave the row to another row. It will also trigger if I click on a button that loses focus on the grid. However, I have this page in a WinForms application using a WebBrowser object. The WinForm object has UI that brings the user from different pages but this doesn't trigger the WebGrid to update if they click on the "Add new row" and enter some default data and then immediately click on the WinForm's node to leave. Is there a way in javaScript to trigger this update?
<div class="ContentTemplateGridContent"> <CommonCtrl:EnduranceWebGrid ID="grdFTPInformation" runat="server" UseDefaultStyle="True" Width="100%" Height="100%" DefaultStyleMode="Elegant" DataSourceID="odsFTPInformation" onpreparedatabinding="grdFTPInformation_PrepareDataBinding" OnInitializePostBack="grdFTPInformation_InitializePostBack"> <LayoutSettings AllowEdit="Yes" AllowAddNew="Yes" AllowColumnSizing="No" AllowDelete="Yes" RowHeightDefault="22px" AllowFilter="No" AllowSelectColumns="Yes" AllowSorting="Yes" HideColumnsWhenGrouped="Default" NewRowLostFocusAction="AlwaysPrompt" AllowExport="Yes" ResetNewRowValuesOnError="False" InProgressUIBehavior="ChangeCursorToHourGlass" TreeLines="False" ApplyFiltersKey="Enter" AllowColumnFreezing="Yes" ShowFilterStatus="True" PagingMode="ClassicPaging" EditOnClick="True" VerboseEditingInformation="True" FilterBarVisible="True" PagingSize="50" PagingExportMode="ExportAllData" PromptBeforeDelete="true" virtualloadmode="LargeData" CellPaddingDefault="0"> <FrameStyle CssClass="WebGridFrameStyle"></FrameStyle> <HeaderStyle CssClass="WebGridHeaderStyle" /> <StatusBarStyle CssClass="WebGridStatusBarStyle" /> <StatusBarCommandStyle Active-CssClass="WebGridStatusBarCommandStyleActive" Normal-CssClass="WebGridStatusBarCommandStyleNormal" Over-CssClass="WebGridStatusBarCommandStyleOver" /> <FilterRowStyle CssClass="WebGridFilterRowStyle" /> <PreviewRowStyle CssClass="WebGridRowStyle" /> <RowStyle CssClass="WebGridRowStyle" /> <QuickFilterBarStyle CssClass="WebGridRowStyle" /> <RowHeaderStyle CssClass="WebGridRowHeaderStyle" /> <SelectedRowStyle CssClass="WebGridSelectedRowStyle" /> <EditFocusCellStyle CssClass="WebGridRowStyle" /> <FocusCellStyle CssClass="WebGridRowStyle" /> <LostFocusRowStyle CssClass="WebGridRowStyle" /> <NewRowStyle CssClass="WebGridRowStyle" /> <SortedColumnStyle CssClass="WebGridSortedColumnStyle" /> <AlternatingRowStyle CssClass="WebGridAlternatingRowStyle" /> <FreezePaneSettings AbsoluteScrolling="True" ActiveFrozenColumns="1" ShowInContextMenu="False" ShowSplitterLine="False" MaxFrozenColumns="1" SplitterLineColor="ActiveBorder" SplitterLineWidth="1" /> </LayoutSettings> <RootTable DataKeyField="FtpID"> <Columns> <ISWebGrid:WebGridColumn Name="FtpID" DataMember="FtpID" Caption=" " Visible="false" DataType="System.Int32"/> <ISWebGrid:WebGridColumn Name="ProgramID" DataMember="ProgramID" Caption=" " Visible="false" DataType="System.Int32"/> <ISWebGrid:WebGridColumn Name="FtpUrl" DataMember="FtpUrl" Caption="URL" DataType="System.String" Width="300px" EditType="TextBox" EditInfoText="Enter FTP Url" InputRequired="true" InputRequiredErrorText="FTP URL is required" ColumnType="HyperLink"/> <ISWebGrid:WebGridColumn Name="FtpUserName" DataMember="FtpUserName" Caption="Username" DataType="System.String" Width="100px" EditType="TextBox" EditInfoText="Enter FTP Username" /> <ISWebGrid:WebGridColumn Name="FtpPassword" DataMember="FtpPassword" Caption="Password" DataType="System.String" Width="100px" EditType="TextBox" EditInfoText="Enter FTP Password" /> <ISWebGrid:WebGridColumn Name="FtpComments" DataMember="FtpComments" Caption="Comments" DataType="System.String" EditType="TextBox" Visible="true" IsAutoWidth="true" Width="100%" /> <ISWebGrid:WebGridColumn Name="ModifiedBy" DataMember="ModifiedBy" Caption=" " DataType="System.String" Visible="false" /> </Columns> </RootTable> </CommonCtrl:EnduranceWebGrid> </div> <asp:ObjectDataSource ID="odsFTPInformation" runat="server" DataObjectTypeName="Endurance.Re.AWB.Data.FTPInformation" OldValuesParameterFormatString="original_{0}" SelectMethod="GetFTPInformationList" TypeName="Endurance.Re.AWB.Web.Controllers.ProgramController" DeleteMethod="DeleteFTPInformatin" InsertMethod="UpdateFTPInformation" UpdateMethod="UpdateFTPInformation"> <SelectParameters> <asp:ControlParameter ControlID="hidProgramID" Name="programID" PropertyName="Value" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource>
You could check the Client_ProgrammaticEdit.aspx provided WebGrid sample for implementation of WebGrid editing client side API. In short, you will need to be able to retrieve the new row object and invoke the update function. Here is the snippet assuming the new row is the selected row:var grid = ISGetObject("WebGrid1");grid.GetSelectedObject().ToRowObject().Update();
You could check the Client_ProgrammaticEdit.aspx provided WebGrid sample for implementation of WebGrid editing client side API. In short, you will need to be able to retrieve the new row object and invoke the update function. Here is the snippet assuming the new row is the selected row:
var grid = ISGetObject("WebGrid1");grid.GetSelectedObject().ToRowObject().Update();
You don't understand my problem. The WebGrid will postback and update the data as focus is lost from the WebGrid. For instance, a user enters data in a new row and then clicks on a button. In my scenario, I have a WinForms application that uses a WebBrowser object to display a web page. This application has nodes that transports the user from web page to web page. In this case, the WebGrid doesn't detect focus lost so the update does not occur.
To fix, the WinForms calls a method on the web page that just calls window.focus() which triggers the update.
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