I am a brand new user of this framework (excellent, excellent work Rocky). In addition, am writing my first Windows app having worked exclusively on web before.
Hoping someone can point me here. This is my situation:
I have some reference data tables that are very small (< 100 rows) and have a requirement to load all the records when the form load. My UI consists of TabControl control with two pages. Page1 contains a grid and Page2 is the Details page. The Grid is readonly. When a row selection is made from the grid, Page2 receives focus and data should be updatable. No deletes are allowed. Also, Page2 should allow for new data to be added.
I am binding the grid like this:
Me
.ChartFieldOverrideListBindingSource.DataSource = New SortedBindingList(Of ChartFieldOverrideInfo)(chartFieldOverrideList)ChartFieldOverrideList inherits from ReadOnlyListBase
Is this the correct approach for such an implementation? Ideally, when the user interacts with the data on Page2, just one record should be affected at a time. Going this way, it seems I will have to call Save manually, and handle a single row update. I am having crazy thoughts of using the row to populate my ChartFieldOverride object, and then call my methods from within that class to insert/update the row. Another thought I have it to bind Page2 to the single object class ChartFieldOverride and then call Fetch each time a selection is made from Page1. But then I'd have to Fetch on Page1 also, to refresh, when a new record is added via Page2. This all seems like a lot of traffic.
It appears, the whole workup looks like the Edit Project task in Project Tracker, except that I have the two forms combined into one.
Please, any advise.
Thanks, Andrew:
You have perhaps three options (with various sub-options).
Thanks Rocky.
I went with a combination of 2; readonlylist from which the user can select/delete, and then I use the selection to return a businessbase object.
However, I now have another issue, which I have posted here:
http://forums.lhotka.net/forums/post/28983.aspx
When I am adding new data I bind to a new basebusiness object thru a click event. The issue is, any textbox that I enter a value into requires a double-tab for me to exit it. This behaviour is not the same for edits, for which I am again binding to the same base business object, except that the GetMyData method was called, instead of NewData.
Really appreciate your help, sir.
Thanks,
Andrew
Copyright (c) Marimer LLC