Lets say I have a shopping cart,I don't know how many different item a customer is going to buy, so I have to create a lot of editfields(I don't want to use editable table or report table) in advance, then hide some of them. Is it possible I can create new control on the fly?
Comments
Therefore I'm creating a second response to address alternatives. May I ask why you would not consider the EditTable or ReportTable controls? Do you have a specific UI design in mind that precludes those controls? Are you worried about those controls being strictly row and column based?
Before dismissing the SRP EditTable control, I want to remind you that this control has some special layout capabilities that might suit you rather well. The first is the RowsToRecords property. This property allows you to define a logical record to be mapped to multiple rows in the EditTable (as opposed to a single wide row). Thus, your "fields" are wrapped.
The second feature is the CellMerge property. This property allows you to merge cells much like Excel, thus giving you a form-like experience.
The SRP Editor Options dialog demonstrates this in the Quick Commands tab:
Hopefully this presents new ideas you hadn't considered.