How to add a template dynamically in DataRepeater (Win forms)
-
venerdì 29 giugno 2012 10:19
Hi,
I am developing a win forms application and I need to use Datarepeater control to display some formatted data. I have used listview before this but it does not fit my requirment, so I need to use dataRepeater control.
Can anyone tell me that, how can I add a template dynamically to datarepeater and how can I bind items one by one into datarepeater ?
The application domain is POS, so when user clicks on items to add it in order list. All the items are having different options that I need to manage and show to user when he/she making bill.
In short, I need a good example to work with datarepeater in win-forms. i.e.
# How to bind items one by one
# How to create template dynamically and add it to datarepeater.
Thanks
/Vips
Tutte le risposte
-
lunedì 2 luglio 2012 06:00Moderatore
Hi Vips,
Welcome to the MSDN forum.
# How to bind items one by one
As far as I see, you can add data to its data source and then re-bind it to dataRepeater.
# How to create template dynamically and add it to datarepeater.
You need to add codes in DataRepeater.DrawItems event. For a detailed example, please download it at:http://code.msdn.microsoft.com/windowsdesktop/DataRepeater-Control-Sample-2b7c33ef/view/Reviews
If I misunderstood anything, please feel free to let me know.
Best regards,
Shanks Zen
MSDN Community Support | Feedback to us
- Contrassegnato come risposta Shanks ZenMicrosoft Contingent Staff, Moderator venerdì 6 luglio 2012 08:34
-
lunedì 9 luglio 2012 13:16Thanks shanks zen.

