shanda

shanda

  • NA
  • 2
  • 0

HELP HELP HELP...BIG PROBLEM WITH INFRAGISTICS WEB GIRD

Sep 2 2004 11:02 AM
ok, this is for people that have worked with the infragistics web grid. Either this grid is a piece of crap or I have the serious case of stupids..either way all I need is a solution to my problem. When I go in to add the rows to my datagrid from the front end the dataset does not persist. Let me explain myself. AS i click the add button on the front end the grid inserts an empty row and triggers the add row row event. In the add row event i have the following code. this.Retrieve(); DataTable _t = this._dsCateringRev.Tables[e.Row.Band.BaseTableName]; this._row = (DsCateringRev.CateringRevMinimumPeakRow)_t.NewRow(); _row.propid = System.Convert.ToInt32(this._hotel); _row.appyear = System.Convert.ToInt32(this._processYear); _row.RevType= "Peak"; //this._dsCateringRev.CateringRevMinimumPeak.Rows.Add( _row ); e.Row.DataKey = _row[_t.PrimaryKey[0]]; e.Row.Cells.FromKey(_t.PrimaryKey[0].ColumnName).Value = e.Row.DataKey; this._dsCateringRev.CateringRevMinimumPeak.Rows.Add( _row ); This is more or less according the the sample app that came with the grid. Then the grid executes the updatecellbatch event. Here is the code for that: DsCateringRev.CateringRevMinimumPeakRow row = null; DataTable table=null; //this.Retrieve(); object key=e.Cell.Row.DataKey; table=this._dsCateringRev.Tables[e.Cell.Band.BaseTableName]; //Try to find the row that needs to be updated. if (key!=null) row = (DsCateringRev.CateringRevMinimumPeakRow)table.Rows.Find(key); if(row!=null) { try { row[e.Cell.Column.Key] = e.Cell.Value; } catch( Exception _ex ) { this._dsCateringRev.RejectChanges(); } } } Well the problem is that the first time I rub this the dataset has the rows that i just added. On subsequent runs the dataset.datatable.rows.count = 0. In other words the dataset if empty. Got any words of advice. Thanks Sameer ok, this is for people that have worked with the infragistics web grid. Either this grid is a piece of crap or I have the serious case of stupids..either way all I need is a solution to my problem. When I go in to add the rows to my datagrid from the front end the dataset does not persist. Let me explain myself. AS i click the add button on the front end the grid inserts an empty row and triggers the add row row event. In the add row event i have the following code. this.Retrieve(); DataTable _t = this._dsCateringRev.Tables[e.Row.Band.BaseTableName]; this._row = (DsCateringRev.CateringRevMinimumPeakRow)_t.NewRow(); _row.propid = System.Convert.ToInt32(this._hotel); _row.appyear = System.Convert.ToInt32(this._processYear); _row.RevType= "Peak"; //this._dsCateringRev.CateringRevMinimumPeak.Rows.Add( _row ); e.Row.DataKey = _row[_t.PrimaryKey[0]]; e.Row.Cells.FromKey(_t.PrimaryKey[0].ColumnName).Value = e.Row.DataKey; this._dsCateringRev.CateringRevMinimumPeak.Rows.Add( _row ); This is more or less according the the sample app that came with the grid. Then the grid executes the updatecellbatch event. Here is the code for that: DsCateringRev.CateringRevMinimumPeakRow row = null; DataTable table=null; //this.Retrieve(); object key=e.Cell.Row.DataKey; table=this._dsCateringRev.Tables[e.Cell.Band.BaseTableName]; //Try to find the row that needs to be updated. if (key!=null) row = (DsCateringRev.CateringRevMinimumPeakRow)table.Rows.Find(key); if(row!=null) { try { row[e.Cell.Column.Key] = e.Cell.Value; } catch( Exception _ex ) { this._dsCateringRev.RejectChanges(); } } } Well the problem is that the first time I rub this the dataset has the rows that i just added. On subsequent runs the dataset.datatable.rows.count = 0. In other words the dataset if empty. Got any words of advice. Thanks Sameer