Grid Control


Author
Message
Sarosh
Sarosh
StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)
Group: Forum Members
Posts: 22, Visits: 116
Hi!

How come I don't see a Grid Control in the StrataFrame toolbox?

I am missing something?

Sarosh

Replies
Charles R Hankey
Charles R Hankey
StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)
Group: Forum Members
Posts: 524, Visits: 30K
Yes, I looked at the example. I understand the handlers for the next etc under the grid. My question regards having the change of row in the grid cause bound controls on the form for an individual record refresh as the grid row changes.



In the sample I tried putting a couple of textboxes on the form below the grid, bindign them to company and last name and with your grid I got the expected behavior - i.e. as the row changed in the grid the bound control changed. Since they are looking at the same currentdatatable I would expect them to be in sync.



But I don't get that behavior in the form I am attempting. I have a standard maintenance form with customer fields. I setup a browsedialog which works fine to retrive records. So far so good.



So then I dropped DataGridView onto the form, set up a BusinessBindingSource to CustomersBO1 and set the datasource for the grid to the BBS. Now when I return from the BrowseDialog I have the right record in the bound fields, the right set of records in the grid, but they are not in sync and navigating in the grid does not refresh the displayed record.



( exception is if I scroll down the grid to EOF I have both a blank grid row and blank bound controls )



Remember, I'm a .NET idiot still thinking VFP Smile



I don't see anything in the sample in that respect and yet it works there as I would expect but not in mine. Any hints as to where I should look for what I have obviously left out ?



The only code i see in the sample that might (?) be relevant if I understood it is



'''

''' When the row changes within the grid, the Navigated event will fire

'''


'''

'''

Private Sub Customers_Navigated(ByVal e As MicroFour.StrataFrame.Business.NavigatedEventArgs) Handles Customers.Navigated

Me.lblRowIndex.Text = Me.Customers.CurrentRowIndex.ToString()

End Sub





TIA for you patience.







Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
they are looking at the same currentdatatable I would expect them to be in sync.

OK, first you need to understand that the CurrentDataTable does not actually do anything except house the data.  A DataTable does not have a record pointer, only the BO.  An SF BO keeps up with the "Current" record for you through the CurrentRowIndex property which can be accessed through the CurrentRow property as well.  When talking to a grid, it does not know what the current index of the business object is since it uses the IBindingList and ICurrencyManagerProvider interfaces and has its own internal pointer that is used. 

Depending upon which grid is used the "sync" will be slightly different.  One thing that you can do when the 1.6.1 release is made public is handle the BrowseDialogs AfterBrowse event and then sync it up yourself.  Right now you could use the CurrentDataTableRefilled on the BO that is populated through the Browse and add the same type of logic.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Sarosh - 18 Years Ago
Ivan George Borges - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Sarosh - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Sarosh - 18 Years Ago
                         [quote] rows properly but the buttons on the toolstrip don't seem to...
Trent L. Taylor - 18 Years Ago
                             The BusinessBindingSource also implements the...
StrataFrame Team - 18 Years Ago
Charles R Hankey - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Charles R Hankey - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Charles R Hankey - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Charles R Hankey - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Charles R Hankey - 18 Years Ago
Trent L. Taylor - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search