Example #1
0
        protected void grdBooking_RowInserted(object sender, DevExpress.Web.Data.ASPxDataInsertedEventArgs e)
        {
            grdBooking.Selection.SelectRowByKey(Guid.Parse(e.NewValues["TransactionId"].ToString()));

            grdBooking.DetailRows.CollapseAllRows();
            grdBooking.DetailRows.ExpandRowByKey(Guid.Parse(e.NewValues["TransactionId"].ToString()));

            int          position          = grdBooking.FindVisibleIndexByKeyValue(Guid.Parse(e.NewValues["TransactionId"].ToString()));
            ASPxGridView grdBooking_Detail = (ASPxGridView)grdBooking.FindDetailRowTemplateControl(position, "grdBookingDetail");

            grdBooking_Detail.AddNewRow();
            grdBooking_Detail.Focus();


            grdBooking.FocusedRowIndex = position;
        }
Example #2
0
        protected void grdBooking_RowInserted(object sender, DevExpress.Web.Data.ASPxDataInsertedEventArgs e)
        {
            grdBooking.Selection.SelectRowByKey(Guid.Parse(e.NewValues["TransactionId"].ToString()));

            grdBooking.DetailRows.CollapseAllRows();
            grdBooking.DetailRows.ExpandRowByKey(Guid.Parse(e.NewValues["TransactionId"].ToString()));


            int          position          = grdBooking.FindVisibleIndexByKeyValue(Guid.Parse(e.NewValues["TransactionId"].ToString()));
            ASPxGridView grdBooking_Detail = (ASPxGridView)grdBooking.FindDetailRowTemplateControl(position, "grdBookingDetail");

            grdBooking_Detail.AddNewRow();
            grdBooking_Detail.Focus();


            grdBooking.FocusedRowIndex = position;
            //grdBooking.JSProperties.Add("cpRefresh", "refresh");
            //NAS.DAL.Accounting.AccountChart.Account account = session.GetObjectByKey<NAS.DAL.Accounting.AccountChart.Account>(Guid.Parse(e.NewValues["AccountId!Key"].ToString()));

            //GeneralJournal generalJournal = session.GetObjectByKey<GeneralJournal>(Guid.Parse(e.NewValues["GeneralJournalId"].ToString()));

            //General general = new General();
            //general.BalanceUpdate(session, account, generalJournal, false, double.Parse(e.NewValues["Debit"].ToString()) - double.Parse(e.NewValues["Credit"].ToString()));
        }