Dear Infragistics,
I have a collection of objects as my datasource. I keep binding these objects in the designer to the grid through a binding source for the data schema. Else the band and column settings won't work so that I can start designing row layouts. But every time i close and open the designer it 'forgot' the Data Schema. When I click on it to set it, it 'knows' the correct bindingsource. So it did not completely forget. But I need to reapply it. Therefor it also doesn't remember the row layout I designed.
What am I doing wrong?
Oh, yeah. I think we do one every month (or at least try to) for bug fixes and such.
Anyway, glad we got this all worked out.
Mike,
I've never realized you guys have service releases in between. I've downloaded and installed the latest and now everything works as expected.
All this trouble...
Well thanks alot for your time and help.
Hi,
I followed your steps but you lose me on step 8. I am not seeing any such problem.
It could be that this was an issue that has already been fixed. Try getting the latest service release and see if that helps.
How to get the latest service release - Infragistics Community
If not, then there must be something different on your machine that is causing this. Do you have the latest service pack(s) for Visual Studio? I'm using SP1.
Mike Saltzman said:Am I missing a step?
... No *sigh*. Doesn't seem like it... I didn't change the column/row layout or rearrange columns because it doesn't matter.
Look, please follow these steps exactly:
1) I go to the grid's Designer Dialog on Form2.
2) I click on the Data Schema button
3) I click on the Bind to a DataSource to Establish Schema button
4) Datasource = mockUprepositoryBindingSource and DataMember = People, press OK.
5) Press OK again. Notice mockup layout in grid in the designer of Form2. Looks good.
6) Run project (Form2 starts up)
7) Grid looks fine. I stop running the project.
8) Designer of Form2 is shown and i immediatly notice the mockup layout in the grid is not there (as if not bound to a source).
9) I click on the control and the properties say that the DataSource is still mockUprepositoryBindingSource and the DataMember is still People, so that seems fine.
10) I run it again, everything is fine. I'm starting to wonder what my problem was in the 1st place...
11) Stop running again (again I see no mockup layout as it should on a bound Infragistic's grid).
12) So to make sure, I open the grid's Designer Dialog again.
13) Now in the grid's Designer Dialog it has NO Data Schema (Band and Column Settings are empty... I see no + sign infront of it).
14) I press Cancel button as a little trick I've heard by a colleague of mine and I immediatly see mockup layout in grid again... (huh?)
15) I open the grid's Designer Dialog and Bands And Column Settings are filled (+ sign is shown infront of it) which indicates it has a Data schema and is correctly bound to my bindingsource. Ok, awesome... Looking good... (despite having to press Cancel to see it)
16) I go to Band[2] Lines to Column arrangement Overview, choose Use Row Layout and click Design Column Arrangement Now to mess around with Row Layout.
17) Save changes in grid's designer and go check the Designer of Form2. Mockup layout in grid looks as expected after my changes. I run Form2, layout of grid looks as expected and Data in it too. Good!
18) Stop running program and see in designer of Form2 that mockup layout is gone again in grid (as I've observed a couple of times now). Properties tell me again it should be bound to my binding source. But you know what, my Row Layout needs an adjustment...
19) So I open the grid's Designer Dialog and it has NO Data Schema (Band and Column Settings are empty... I see no + sign infront of it). So I can't adjust the row Layout of Band[2] Lines, because it has no Bands in the designer right now.
20) But I remembered the trick and I press "Cancel" button
21) I see my mockup layout again (so it's bound to my bindingsource correctly) but when I inspect the layout of the bands I notice band[2] Lines has standard layout again. Huh? Where's my row Layout.
22) I open the grid's Designer Dialog and I go to Band[2] Lines to Column arrangement Overview and it's on Use Groups And Levels. It's not on Use Row Layout anymore. Just to make sure I click "Design Column Arrangement Now", but alas my former Row Layout is gone.
I have made the steps as clear as possible. If you follow these steps and any step is different from what you are observing please let me know. Then we have a difference in systems. But this is what i'm observing.
DannyvdK said:The only thing I'm saying is that the 'quirky behaviour when dealing with the data source at design-time' goes away by using an UltraDataSource. This is my observation.
Of course it does. That is not surprising at all. Because UltraDataSource is a data source specifically designed to be used both at design-time and run-time. I am certain you would not have any such problems using a DataSet or DataTable, either.
It's only because you are using your own custom objects at design-time that you are experiencing any unusual behavior.
Anyway.. this morning I tried out your sample and tried to reproduce the problem you are getting and I am not seeing any issues. When I open your sample, and look at Form2, there isn't any schema here to lose. That is... I see the three column in order and there has been no modification of the schema - the band is still using GroupAndLevels layout which is the default.
So, as a test, I went into the grid designer and changed this so that this band is using a ColumnLayout and I rearranged the columns. I ran the sample and everything looks fine at run-time - it looks just the way I set it up.
I stopped running the sample and then went back into the grid designer and everything is still there, the layout is still fine. I also tried closing and re-opening the form designer just to be sure, but everything seems to be working fine for me no matter what I do.
Am I missing a step?