Hi there,
I have a grid which bound to a dataSource. The datasource have 5 colums and in the designer view, it shows 5 columns. But when I run it, it shows more than 5 columns, it seemd the private member of the dataSoure was bound to the grid too. It happens in one of my grid. Other grid in the same screen using diff dataSource, the private member is not showing
Is any setting i can turn off the private member to show up on my grid?
Thanks!
Amy
HOWTO:How can I define columns in the grid at Design-time and bind them at run-time so that some fields of the data are excluded from the grid?
yamao said:BTW, what's the GenerateMember for? If i set it false, I can't use the ultraGrid in the Code behind, it is said it not defined.
GenerateMember is handled by Visual Studio, it's nothing specific to Infragistics. You can look it up in Microsoft's documentation for more details, but basically I think it determines if the form designer creates a member variable by which you can reference the control at run-time.
BTW, what's the GenerateMember for? If i set it false, I can't use the ultraGrid in the Code behind, it is said it not defined.
Hi Brain,
I was wrong, it was not the private member, it was the columns I removed from my dataset show on the grid. I used the Stored procedure to fill the dataset, the SP returns 11 columns, but I removed the 6 colums from the dataset. But the grid shows all 11 columns, even in the designer just 5 cloumns showed up.
Any idea how to fix this one? I could add a new Sp, just return 5 columns if there is no other way to fix it.
I tried this with a simple custom class that has a public property and a private one, and bound the grid to a <BindingList<T> where T is that type, and as I expected the private member did not appear. You might want to attach a sample project that demonstrates that behavior.