Hello everyone,
I am writing a VB.Net program and I am using a WinGrid to display data. I don't want to set the DataSource property of WinGrid and make the Grid populate the data automatically. What I need to do is loop on the data and create a new row and assign the values to its cells accordingly.
I know this might not be a good practice but I need to do that because I have a column of data that will not be shown in the Grid. Instead, its data will be assigned to the Row's Tag property.
Your assistance is highly appreciated.
Thank you guys, I am trying to do that. I am currently reading the Online Documentation for both WinGrid and UltraDataSource. Thanks again for your prompt response.
The grid cannot be used completely unbound, it needs some kind of data source in order to work. If you want to populate the grid manually in code, then I recommend binding it to an UltraDataSource. Then you could just add rows to the UltraDataSource in code to populate the grid.
Hello
You could databind the grid to an UltraDataSource, hide the column you refer to, and place the following line in the AfterRowUpdate event handler:
e.Row.Tag = e.Row.Cells("MyHiddenColumn").Value
Hope this helps.
Regards.