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
And this is different case with the same error:
--------------
Select function:
---------------
[WebMethod] public object GetMembershipCheques(DataSourceSelectArguments selectArguments) { MembershipDataContext context = new MembershipDataContext(); context.DeferredLoadingEnabled = false; WebGridDataProvider<MembershipCheque> provider = new WebGridDataProvider<MembershipCheque>(context.MembershipCheques.AsQueryable()); object data = provider.Select(selectArguments); if (data != null) return data; throw new InvalidOperationException("Unsupported operation type!"); }
------------------------
Table code:
-------------------------
[Table(Name="dbo.MembershipCheque")] public partial class MembershipCheque : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private int _MembershipChequeID; private System.Nullable<int> _MembershipID; private System.Nullable<System.DateTime> _ChequeDate; private System.Nullable<System.DateTime> _DueDate; private System.Nullable<System.DateTime> _DepositDate; private string _ChequeNo; private string _BatchNo; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnMembershipChequeIDChanging(int value); partial void OnMembershipChequeIDChanged(); partial void OnMembershipIDChanging(System.Nullable<int> value); partial void OnMembershipIDChanged(); partial void OnChequeDateChanging(System.Nullable<System.DateTime> value); partial void OnChequeDateChanged(); partial void OnDueDateChanging(System.Nullable<System.DateTime> value); partial void OnDueDateChanged(); partial void OnDepositDateChanging(System.Nullable<System.DateTime> value); partial void OnDepositDateChanged(); partial void OnChequeNoChanging(string value); partial void OnChequeNoChanged(); partial void OnBatchNoChanging(string value); partial void OnBatchNoChanged(); #endregion public MembershipCheque() { OnCreated(); } [Column(Storage="_MembershipChequeID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public int MembershipChequeID { get { return this._MembershipChequeID; } set { if ((this._MembershipChequeID != value)) { this.OnMembershipChequeIDChanging(value); this.SendPropertyChanging(); this._MembershipChequeID = value; this.SendPropertyChanged("MembershipChequeID"); this.OnMembershipChequeIDChanged(); } } } [Column(Storage="_MembershipID", DbType="Int")] public System.Nullable<int> MembershipID { get { return this._MembershipID; } set { if ((this._MembershipID != value)) { this.OnMembershipIDChanging(value); this.SendPropertyChanging(); this._MembershipID = value; this.SendPropertyChanged("MembershipID"); this.OnMembershipIDChanged(); } } } [Column(Storage="_ChequeDate", DbType="DateTime")] public System.Nullable<System.DateTime> ChequeDate { get { return this._ChequeDate; } set { if ((this._ChequeDate != value)) { this.OnChequeDateChanging(value); this.SendPropertyChanging(); this._ChequeDate = value; this.SendPropertyChanged("ChequeDate"); this.OnChequeDateChanged(); } } } [Column(Storage="_DueDate", DbType="DateTime")] public System.Nullable<System.DateTime> DueDate { get { return this._DueDate; } set { if ((this._DueDate != value)) { this.OnDueDateChanging(value); this.SendPropertyChanging(); this._DueDate = value; this.SendPropertyChanged("DueDate"); this.OnDueDateChanged(); } } } [Column(Storage="_DepositDate", DbType="DateTime")] public System.Nullable<System.DateTime> DepositDate { get { return this._DepositDate; } set { if ((this._DepositDate != value)) { this.OnDepositDateChanging(value); this.SendPropertyChanging(); this._DepositDate = value; this.SendPropertyChanged("DepositDate"); this.OnDepositDateChanged(); } } } [Column(Storage="_ChequeNo", DbType="VarChar(50)")] public string ChequeNo { get { return this._ChequeNo; } set { if ((this._ChequeNo != value)) { this.OnChequeNoChanging(value); this.SendPropertyChanging(); this._ChequeNo = value; this.SendPropertyChanged("ChequeNo"); this.OnChequeNoChanged(); } } } [Column(Storage="_BatchNo", DbType="VarChar(50)")] public string BatchNo { get { return this._BatchNo; } set { if ((this._BatchNo != value)) { this.OnBatchNoChanging(value); this.SendPropertyChanging(); this._BatchNo = value; this.SendPropertyChanged("BatchNo"); this.OnBatchNoChanged(); } } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } }
-------------------------------------
Grid config
------------------------------------
<ISWebGrid:WebGrid ID="MembershipChequesGrid" runat="server" DefaultStyleMode="Win7" Height="322px" UseDefaultStyle="True" Width="99%" BindingOperationMode="ClientBinding"> <LayoutSettings AllowColumnSizing="No" AllowContextMenu="False" AllowEdit="Yes" AllowSorting="Yes" AlwaysShowHelpButton="False" ColumnSetHeaders="Default" EditOnClick="True" FilterBarVisible="False" InProgressUIBehavior="ChangeCursorToHourGlass" RowHeaders="Default" ShowRefreshButton="False" AllowBatchUpdate="True" NewRowLostFocusAction="AlwaysUpdate" > <BatchUpdateSettings AllowReviewChanges="True" /> <ClientSideEvents OnBatchUpdateSuccess="TransactionsWebGrid_OnBatchUpdateSuccess" /> </LayoutSettings> <RootTable Caption="MembershipCheques" DataKeyField="MembershipChequeID"> <Columns> <ISWebGrid:WebGridColumn Caption="Due Date" DataMember="DueDate" EditType="Custom" Name="DueDate" Width="80px" DataFormatString="d" DataType="System.DateTime" CustomEditorName="VistaCalendar"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Cheque No" DataMember="ChequeNo" Name="ChequeNo" Width="260px" DataType="System.String"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Batch No" DataMember="BatchNo" Name="BatchNo" Width="250px" DataType="System.String"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Deposit Date" DataMember="DepositDate" EditType="Custom" Name="DepositDate" Width="90px" DataFormatString="d" DataType="System.DateTime" CustomEditorName="VistaCalendar"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> </Columns> </RootTable> <ClientBindingSettings DataSourceType="WebService" ServiceUrl="../MembershipDataService.asmx" ItemTypeName="MembershipCheque" DataLoadMode="AllData"> <ServiceMethods SelectMethod="GetMembershipCheques" BatchUpdateMethod="BatchUpdateMembershipCheques" /> <ServiceEvents Selecting="Selecting_MembershipCheques"/> </ClientBindingSettings> </ISWebGrid:WebGrid>
Thanks,
Maged
Hi,
--------------------------------------------------
This is the select function:
[WebMethod] public object GetMembershipTransactions(DataSourceSelectArguments selectArguments) { MembershipDataContext context = new MembershipDataContext(); context.DeferredLoadingEnabled = false; context.ObjectTrackingEnabled = false; int nMembershipID = 0; Int32.TryParse(selectArguments.FilterExpression, out nMembershipID); var MembershipTransactions = from membershipTransaction in context.MembershipTransactions where membershipTransaction.MembershipID == nMembershipID select new { MembershipTransactionID = membershipTransaction.MembershipTransactionID, Amount = membershipTransaction.Amount, MembershipID = membershipTransaction.MembershipID, Note = membershipTransaction.Note, ProcessDate = membershipTransaction.ProcessDate, Processed = membershipTransaction.Processed, ReferenceNo = membershipTransaction.ReferenceNo, TransactionDate = membershipTransaction.TransactionDate, ChequeNo = GetChequeNo(membershipTransaction.MembershipChequeID), CreditCardNo = GetCreditCardInfo(membershipTransaction.CreditCardID) }; return MembershipTransactions.ToList(); throw new InvalidOperationException("Unsupported operation type!"); }
-----------------------------------------------------
And this is the grid configuration:
<ISWebGrid:WebGrid ID="TransactionsWebGrid" runat="server" DefaultStyleMode="Win7" Height="322px" UseDefaultStyle="True" Width="99%" BindingOperationMode="ClientBinding"> <LayoutSettings AllowColumnSizing="No" AllowContextMenu="False" AllowEdit="Yes" AllowSorting="Yes" AlwaysShowHelpButton="True" ColumnSetHeaders="Default" EditOnClick="True" FilterBarVisible="False" InProgressUIBehavior="ChangeCursorToHourGlass" RowHeaders="Default" ShowRefreshButton="False" AllowBatchUpdate="True" NewRowLostFocusAction="AlwaysUpdate" > <BatchUpdateSettings AllowReviewChanges="True" /> <ClientSideEvents OnBatchUpdateSuccess="TransactionsWebGrid_OnBatchUpdateSuccess" /> </LayoutSettings> <RootTable Caption="MembershipTransactions" DataKeyField="MembershipTransactionID" > <Columns> <ISWebGrid:WebGridColumn Caption="Date" DataMember="TransactionDate" EditType="NoEdit" Name="TransactionDate" Width="70px" DataFormatString="d" DataType="System.DateTime"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Amount" DataMember="Amount" Name="Amount" EditType="NoEdit" Width="55px" DataType="System.Decimal"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Cheque No" DataMember="ChequeNo" Name="ChequeNo" EditType="NoEdit" Width="125px" DataType="System.Decimal"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Credit-Card No" DataMember="CreditCardNo" Name="CreditCardNo" EditType="NoEdit" Width="125px" DataType="System.Decimal"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Processed" ColumnType="CheckBox" DataMember="Processed" DataType="System.Boolean" EditType="Checkbox" Name="Processed" Width="60px"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Process Date" CustomEditorName="VistaCalendar" DataFormatString="d" DataMember="ProcessDate" DataType="System.DateTime" EditType="Custom" Name="ProcessDate" Width="70px"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Reference" Name="ReferenceNo" Width="80px" DataMember="ReferenceNo"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Note" DataMember="Note" Name="Note" Width="95px"> <HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /> </ISWebGrid:WebGridColumn> </Columns> </RootTable> <ClientBindingSettings DataSourceType="WebService" ServiceUrl="../MembershipDataService.asmx" ItemTypeName="MembershipTransaction" DataLoadMode="AllData"> <ServiceMethods SelectMethod="GetMembershipTransactions" BatchUpdateMethod="BatchUpdateMembershipTransactions" /> <ServiceEvents Selecting="Selecting_MembershipTransactions"/> </ClientBindingSettings> </ISWebGrid:WebGrid>
And this is the table code:
---------------------------------------------------
[Table(Name="dbo.MembershipTransaction")] public partial class MembershipTransaction : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private int _MembershipTransactionID; private System.Nullable<int> _MembershipID; private System.Nullable<int> _TransactionTypeID; private System.Nullable<int> _CreditCardID; private System.Nullable<int> _MembershipChequeID; private System.Nullable<bool> _Processed; private System.Nullable<System.DateTime> _ProcessDate; private System.DateTime _TransactionDate; private System.Nullable<decimal> _Amount; private string _ReferenceNo; private string _Note; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnMembershipTransactionIDChanging(int value); partial void OnMembershipTransactionIDChanged(); partial void OnMembershipIDChanging(System.Nullable<int> value); partial void OnMembershipIDChanged(); partial void OnTransactionTypeIDChanging(System.Nullable<int> value); partial void OnTransactionTypeIDChanged(); partial void OnCreditCardIDChanging(System.Nullable<int> value); partial void OnCreditCardIDChanged(); partial void OnMembershipChequeIDChanging(System.Nullable<int> value); partial void OnMembershipChequeIDChanged(); partial void OnProcessedChanging(System.Nullable<bool> value); partial void OnProcessedChanged(); partial void OnProcessDateChanging(System.Nullable<System.DateTime> value); partial void OnProcessDateChanged(); partial void OnTransactionDateChanging(System.DateTime value); partial void OnTransactionDateChanged(); partial void OnAmountChanging(System.Nullable<decimal> value); partial void OnAmountChanged(); partial void OnReferenceNoChanging(string value); partial void OnReferenceNoChanged(); partial void OnNoteChanging(string value); partial void OnNoteChanged(); #endregion public MembershipTransaction() { OnCreated(); } [Column(Storage="_MembershipTransactionID", DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public int MembershipTransactionID { get { return this._MembershipTransactionID; } set { if ((this._MembershipTransactionID != value)) { this.OnMembershipTransactionIDChanging(value); this.SendPropertyChanging(); this._MembershipTransactionID = value; this.SendPropertyChanged("MembershipTransactionID"); this.OnMembershipTransactionIDChanged(); } } } [Column(Storage="_MembershipID", DbType="Int")] public System.Nullable<int> MembershipID { get { return this._MembershipID; } set { if ((this._MembershipID != value)) { this.OnMembershipIDChanging(value); this.SendPropertyChanging(); this._MembershipID = value; this.SendPropertyChanged("MembershipID"); this.OnMembershipIDChanged(); } } } [Column(Storage="_TransactionTypeID", DbType="Int")] public System.Nullable<int> TransactionTypeID { get { return this._TransactionTypeID; } set { if ((this._TransactionTypeID != value)) { this.OnTransactionTypeIDChanging(value); this.SendPropertyChanging(); this._TransactionTypeID = value; this.SendPropertyChanged("TransactionTypeID"); this.OnTransactionTypeIDChanged(); } } } [Column(Storage="_CreditCardID", DbType="Int")] public System.Nullable<int> CreditCardID { get { return this._CreditCardID; } set { if ((this._CreditCardID != value)) { this.OnCreditCardIDChanging(value); this.SendPropertyChanging(); this._CreditCardID = value; this.SendPropertyChanged("CreditCardID"); this.OnCreditCardIDChanged(); } } } [Column(Storage="_MembershipChequeID", DbType="Int")] public System.Nullable<int> MembershipChequeID { get { return this._MembershipChequeID; } set { if ((this._MembershipChequeID != value)) { this.OnMembershipChequeIDChanging(value); this.SendPropertyChanging(); this._MembershipChequeID = value; this.SendPropertyChanged("MembershipChequeID"); this.OnMembershipChequeIDChanged(); } } } [Column(Storage="_Processed", DbType="Bit")] public System.Nullable<bool> Processed { get { return this._Processed; } set { if ((this._Processed != value)) { this.OnProcessedChanging(value); this.SendPropertyChanging(); this._Processed = value; this.SendPropertyChanged("Processed"); this.OnProcessedChanged(); } } } [Column(Storage="_ProcessDate", DbType="DateTime")] public System.Nullable<System.DateTime> ProcessDate { get { return this._ProcessDate; } set { if ((this._ProcessDate != value)) { this.OnProcessDateChanging(value); this.SendPropertyChanging(); this._ProcessDate = value; this.SendPropertyChanged("ProcessDate"); this.OnProcessDateChanged(); } } } [Column(Storage="_TransactionDate", DbType="DateTime NOT NULL")] public System.DateTime TransactionDate { get { return this._TransactionDate; } set { if ((this._TransactionDate != value)) { this.OnTransactionDateChanging(value); this.SendPropertyChanging(); this._TransactionDate = value; this.SendPropertyChanged("TransactionDate"); this.OnTransactionDateChanged(); } } } [Column(Storage="_Amount", DbType="Decimal(18,2)")] public System.Nullable<decimal> Amount { get { return this._Amount; } set { if ((this._Amount != value)) { this.OnAmountChanging(value); this.SendPropertyChanging(); this._Amount = value; this.SendPropertyChanged("Amount"); this.OnAmountChanged(); } } } [Column(Storage="_ReferenceNo", DbType="VarChar(50)")] public string ReferenceNo { get { return this._ReferenceNo; } set { if ((this._ReferenceNo != value)) { this.OnReferenceNoChanging(value); this.SendPropertyChanging(); this._ReferenceNo = value; this.SendPropertyChanged("ReferenceNo"); this.OnReferenceNoChanged(); } } } [Column(Storage="_Note", DbType="VarChar(250)")] public string Note { get { return this._Note; } set { if ((this._Note != value)) { this.OnNoteChanging(value); this.SendPropertyChanging(); this._Note = value; this.SendPropertyChanged("Note"); this.OnNoteChanged(); } } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } }
--------------------------------------------------------
I checked the video, I really don't know why its not acting the same on my code!!
Anyway I chose to use batch update which better anyway!
Thanks for your help.
Well, simplest fix is to set the grid to BindingOperationMode="ClientBinding"
That also will make everything work more smooth and fast.
I couldn't open your video!
I can't send you the data neither the code, its fairly large project that need to be sent!
I used OnBatchUpdateSuccess and that is enough… Sorry for the misreporting.
Here is how to replicate it:
1- Set this option to true: EditOnClick="True"
2- You also can have one of column to be as boolean and checkbox.
3- Quickly change the data row after row fast (my users will do that for sure!).
4- Refresh the grid!
By the way, its not happening with batch update of course.
Let me know.
Ok, so you mean its a vs 2008 issue, okay I believe you!
Well, you may consider this as an important missing feature for future releases!
Please let me know when there is a fix!
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