I have a WinGrid which is connected to a WinDataSource. I have spent time arranging the field layouts in the grid. Now I add a new field to the WinDataSource. When I go back to the WinGrid, the new field is not represented. So I would like to "Update" the WinGrid to see that there is a new field in the DataSource. The only way I have found to do so, is to change the DataMember property of the grid, and then reset it. Unfortunately, doing so also resets the whole layout that I painstakingly set up.
How can I have the WinGrid recognize there is a new field in the DataSource without messing up the columns layouts.
Hello,
Thank you for your feedback. Please let me know if you need any further assistance on this.
Thank you.
I watched your video, but I don't know if it will work in my case, because I discovered that my original question might have been in error. I was looking for the addition column in the wrong band, so I thought it didn't appear. It might have actually been in the correct band all along.
I'm very sorry. Thanks for your assistance anyway.
Did you try my latest suggestion and did you were able to download and see the video that I post in my previous post ?
What is the results when you try my suggestion ?
Also what could you do is saving your layout via designer, reset your UltraDataSource, bind the Grid to UltraDataSource and load saved layout. Doing so you shouldn’t lose your layout and you will be able to use it in future.
I am waiting for your response.
Thanks for your reply.
First of all, you say you are using a DataTable. I'm using the WinDataSource. They may act differently
second, perhaps the reason why it doesn't work by me, is because I am adding the new column to a child band.
My WinDataSource is made up of a primary band (Order), and a child band (Items). Both of these are shown in the DataGrid. If I add a new column to the child band (Items), it does not show up in the grid in design mode (although it does show up when the app is run).
See if you can duplicate that.
Hello ,
When you are binding the UltraGrid to the UltraDataSource and if you add a column to UltraDataSource after that, this change should be visible on the grid.
I suppose that you have defined DataScheme via designer of the grid and then you are adding a column via designer to the UltraDataSource, and because the key of new column in UltraDataSource does not match to the column in the grid schema this column is not showing in your Grid. So my suggestion is to verify and add a column to UltraGrid with the same key as in the UltraDataSource. To understand me better I have captured a video, where I am showing what I am talking about how to fix it.
Thnak you.