browse ith records on the GridView if errors rerun record or run next record ?


browse ith records on the GridView if errors rerun record or run next...
Author
Message
Dong Trien Lam
Dong Trien Lam
StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)
Group: Anonymous / Guest
Posts: 57, Visits: 251
"Browse ith record in the GridView if error rerun faulty records" this is my request, using a while loop 2, while outer ring running again if the ith sample error message, the sample code below if An error occured not run very well, but there are problems caused ith GridView on jump number and apparently does not run again faulty records, when defective block catch (Exception ex) is run, it gets in the error message in the block catch (Exception ex) and i will run continuously variable for every row (or rows) of the GridView, thanks to the help you troubleshoot.

     private void Tinh(object sender)
        {
            DevExpress.XtraGrid.Views.Grid.GridView Gv = (GridView)sender;
          
            i = 0; // int i is a global variable used to browse the ith record of GridView
            // bStop is the global variable bool
            while (i < Gv.RowCount && bStop)//Running faulty loop next record
            {
                try
                {
                    // While i have not stopped yet, the East and the next run
                    while (i < Gv.RowCount && bStop)// Running the main loop
                    {                             
                        if (condition)
                        {
                            //do somthing
                        }
                        else
                        {
                            //do somthing   
                        }
                         i++;
                    } // Running the main loop                    
                }                 
                catch (Exception ex)               
                {
                     i++;
                     Debug.Print("error: " + ex.Message);               
                }
            }// Repeat loop faulty next record
        }

Edited 8 Years Ago by Dong Trien Lam
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search