First time poster, long time user. Here is my issue
Is there any way to find out the rowstate of the grid row, similar to a dataset retaining information of insert, update, delete?
Is there a property I can access that will tell me 'even though this is not currently an addrow, it is an inserted row in the grid?
here is my code, really hope to be able to add an OR to the if statement:
private void _grdGLMapping_AfterRowActivate(object sender, EventArgs e){if (this._grdGLMapping.ActiveRow.IsAddRow == true || this._grdGLMapping.Rows.????){
this._grdGLMapping.ActiveRow.Cells["sDWHTwoPartCode"].Activation = Activation.AllowEdit;this._grdGLMapping.ActiveRow.Cells["sOrigGeoCode"].Activation = Activation.AllowEdit;this._grdGLMapping.ActiveRow.Cells["sProductMappingID"].Activation = Activation.AllowEdit;this._grdGLMapping.ActiveRow.Cells["sTradeAccountCode"].Activation = Activation.AllowEdit;this._grdGLMapping.ActiveRow.Cells["sICAccountCode"].Activation = Activation.AllowEdit;}else{this._grdGLMapping.ActiveRow.Cells["sDWHTwoPartCode"].Activation = Activation.NoEdit;this._grdGLMapping.ActiveRow.Cells["sOrigGeoCode"].Activation = Activation.NoEdit;this._grdGLMapping.ActiveRow.Cells["sProductMappingID"].Activation = Activation.NoEdit;this._grdGLMapping.ActiveRow.Cells["sTradeAccountCode"].Activation = Activation.AllowEdit;this._grdGLMapping.ActiveRow.Cells["sICAccountCode"].Activation = Activation.AllowEdit;}}
Hello,
I am just checking about the progress of this issue. Please let me know If you need my further assistance on this.
Could you please clarify what other condition you want to add to the if statement. With your 'IF' you know if the active row is an 'AddRow' or already inserted, so I might be missing something here. I will be very happy to assist you further on that matter.
appreciate the idea... its definitely hack-ish, was hoping there was an infragistics gridrow property i wasn't seeing...
but the boss says to use it. just implemented and it works, so thanks for the input!
(if anyone knows a real property, please still reply!)
I have not found a great way to do this except to use another field (probably a database IDENTITY column) to test this kind of thing.
For instance, if adding the record to the database change "iTradeAccountMappingID" from 0/null to something like 121243124, then you could say, if "iTradeAccountMappingID" IS NOT NULL AND IS > 0