///<summary>This method takes care of parsing the query by pulling out SET statements and finding the variables with their assigned values.
        ///Puts all of this information into the grid.</summary>
        private void FillGrid(bool isTypingText = false)
        {
            Point         selectedCell = gridMain.SelectedCell;
            List <string> listSetStmts = UserQueries.ParseSetStatements(_queryCur.QueryText);

            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g(gridMain.TranslationName, "Variable"), 200));
            gridMain.ListGridColumns.Add(new GridColumn(Lan.g(gridMain.TranslationName, "Value"), 200, true));
            gridMain.ListGridRows.Clear();
            foreach (string strSetStmt in listSetStmts)                                                //for each SET statement
            {
                List <QuerySetStmtObject> listQObjs = UserQueries.GetListQuerySetStmtObjs(strSetStmt); //find the variable name
                foreach (QuerySetStmtObject qObj in listQObjs)
                {
                    GridRow row = new GridRow();
                    row.Cells.Add(qObj.Variable);
                    row.Cells.Add(qObj.Value);
                    row.Tag = qObj;
                    gridMain.ListGridRows.Add(row);
                }
            }
            gridMain.EndUpdate();
            if (!isTypingText)
            {
                try {
                    gridMain.SetSelected(selectedCell);
                }
                catch {
                    //suppress if the row doesn't exist (such as filling the grid for the first time)
                }
            }
        }