NavigateToPrimaryKey Error


Author
Message
Rogerio Mauri
Rogerio Mauri
StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)StrataFrame User (303 reputation)
Group: StrataFrame Users
Posts: 205, Visits: 629
1) PrimaryBusinessObject: tbCadastroBO1

2) browseDialog1->BusinessObjectType: vwTbCadastroBO
   browseDialog1->BusinessObjectToPopulate: vwTbCadastroBO1

3) After executed the search: Procedure executed inside of the event of closing of the browseDialog1 control.
        private void browseDialog1_BrowseDialogClosed(EventArgs e)
        {
            if (vwTbCadastroBO1.Count == 0)
                return;
            int idCadastro = vwTbCadastroBO1.IdCadastro;
            tbCadastroBO1.FillByView(vwTbCadastroBO1);
            if (tbCadastroBO1.Count > 0)
                this.NavigateToPrimaryKey(idCadastro);

        }

4) Method to populate the Primary Business Object (tbCadastroBO1) from the loaded view BO (vwTbCadastroBO1) in the browseDialog.
        public void FillByView(BDLicitecMasterViewBO.vwTbCadastroBO viewBO)
        {
            if (viewBO.Count == 0)
                return;
            viewBO.MoveFirst();
            string where = string.Empty;
            do
            {
                where += viewBO.IdCadastro + ", ";
            } while (viewBO.MoveNext());
            where = where.Trim();
            where = where.Remove(where.Length - 1);
            this.FillDataTable("SELECT * FROM TbCadastro"
             + " WHERE IdCadastro IN ( " + where + " )");

        }


5) Error: The navigation is executed successfully, however, the controls in the form is not refreshed.

Rogério Mauri Smile



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Rogerio Mauri - 16 Years Ago
Rogerio Mauri - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Rogerio Mauri - 16 Years Ago
Trent L. Taylor - 16 Years Ago
                         Trent... Solved problem! Step by step: Considering that...
Rogerio Mauri - 16 Years Ago
                             Yeah, you do have to have a primary key so that makes sense. Glad you...
Trent L. Taylor - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search