问题
I need to render a datagrid with different kinds of cells in the same column. For example, I have a datagrid with a column "name" and a column "value". Depending on the "type" of my record, I would have different cells in the column "value" like a combobox or a simple textfield. and I don't really see how to do that programmatically... I don't know if the datagrid is the best choice. Any hint?
I'm using asp.net/vb.net with framework 3.5
回答1:
You can do that using the user control, where you pass the "type" to the user control and the user control will handle the type of control to show or generate.
来源:https://stackoverflow.com/questions/7496470/different-kinds-of-cells-in-the-same-column