DevExpress Grid and SF


Author
Message
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Peter first I want to thank you for the help you are offering.

I put Me.MyBBS.BusinessObject.CurrentView in the watch Window and used the visualizer.....NO DATA?????? So obviously no data in the grid....?

This the my code for the form. I tried loading the data in the load and the new.

me.customers1.currentview Shows all the records in the sample customers database since all I did was a "Select * from customers".





Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.Customers1.fillalldata()

End Sub

Public Sub New()

' This call is required by the Windows Form Designer.

InitializeComponent()

' Add any initialization after the InitializeComponent() call.

'Me.Customers1.fillalldata()

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

' Break Point

End Sub

End Class





Scanning under my BBS I did run into this info which does not seem correct to me but I don't know how to fix it or if it is even wrong?????



CurrentRow{"The CurrentRow for table '[dbo].[Customers]' could not be evaluated because the CurrentRowIndex is out of range. Business object record count: 0. CurrentRowIndex: -1."}System.Data.DataRow



TIA.
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
Terry,



You are correct in that it should not be this difficult, so most likely, I have learned from experience, there is probably something simple not being done. I have attached a C# simple sample using a BO, BBS, and a DevEx grid (v8.2, you may need to update your references to make this sample work).
Attachments
DevExGrid.zip (156 views, 87.00 KB)
Peter Jones
Peter Jones
Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Terry (sorry about the Thomas),



In the Watch Window you should be able to see:



Me.MyBBS.BusinessObject.CurrentView.

This is the data your grid is using



The first path under BusinessObject should be the name of the BO that populates the BBS. If this as expected?



You can the drill down into the BO (in Me.MyBBS.BusinessObject.YourBOName) itself to see what it says about its data source and all its controls.



Do you use the BO's ParentFormLoading event to populate your BO when the form opens?



Cheers, Peter
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
On my break point I tried this in the Watch Window:

me.myBBS.CurrentView but I could find that.

So I tried me.myBBS.SourceBO.CurrentView and it had Zero(0) Records.



If that is where I should have looked then no wonder the grid has no records. But is that where I should have looked? If so what could I have done wrong in setting up the BBS? Setting up a BBS seems to be so straight forward.



If these are goofy questions I am sorry but I'm a newbie to Strataframe which of course makes me a real newbie to DevExpress.....







Peter Jones
Peter Jones
Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Thomas,



Yes but the grid is displaying data from the business binding source (bbs) for the bo not the bo itself. Does the bbs' current view contain data?



Cheers, Peter

'
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
That is exactly what I did. I click the button. Use me.mybo.currentview and use the watch window and the visualizer and I have 311 records. Yet the grid shows absolutely nothing. I'm overlooking something or some switch and I know it but i'll be D...... if I know what it is???? TIA.
Peter Jones
Peter Jones
Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Terry,



I think you need to be looking at this at run-time. Why not add a button to your form and break when its clicked. You can then look at your grid and its data source in 'real-time' to see what the status is. I can only figure that your BO is empty.



Cheers, Peter
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
This is plumb dumb. It can not be this hard. I just created a simple project with a form, BO, and BBS. With a break point I know the BO has data with the visualizer. I add a DevExpress Grid and select the data source which is my BBS. It populates the columns with the correct fields. When I run it I get NO DATA. What property do I need to set?
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
When I select the data source for the DevExpress Grid does it matter where I select the data source from:

Project Data Source?

Form List Instance?

Add Project Data Source and Select Object?



Also, is there a way to view the data in the BBS with the visualizer like you can in the BO?



Yuck I am having about as much fun with this as I can stand......Crying
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I am having a problem loading the example. All kinds of errors. I will work on that. One thought, I don't have to load data in the BBS do I if I loaded data in the BO?

Also, anyone else got any ideas? TIA.
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