I have a data object that I pass to my gridview user control as a generic list and I would like to just use the fields/properties that I am returning from the stored proc I am running. My object has about 25 properties and the proc I am running is only returning about 5-7 fields. I am currently running a prepareColumns to hide columns not needed but I would like to just return the fields I need and set them to my DataSource without having to worry about what to show and what not to?
My object is called workItem and my query returns these fields
But when I pass the object to the datasource it shows every property in my object so I would like to just send the object with these fields and not the unneeded fields...
Any help would be appreciated.....