Re: Can I manually add items to a repeater after binding it?
- From: Alan Silver <alan-silver@xxxxxxxxxxxx>
- Date: Wed, 3 Aug 2005 18:28:40 +0100
Your best solution would be to spin through the datatable and add .NewRow()s as needed to fill in the holes before binding. LIfe will be easier if you loop from the bottom to the top, since you won't need to worry about jumping over the new rows as you insert them.
Thanks for the suggestion. The way I have it at the moment (written since posting) is that I pull out a DataReader and whizz through that, populating a DataTable as I go. Along the way, I look for gaps and add new rows as needed.
What's the easiest way to go through the DataTable itself? I was trying to find out how to do this, but couldn't find a clear example. I'm sure creating a new DataTable and copying the info over into it isn't very efficient, but it was the only way I could work out how to do it.
Thanks
-- Alan Silver (anything added below this line is nothing to do with me) .
- Follow-Ups:
- Re: Can I manually add items to a repeater after binding it?
- From: jasonkester
- Re: Can I manually add items to a repeater after binding it?
- References:
- Can I manually add items to a repeater after binding it?
- From: Alan Silver
- Re: Can I manually add items to a repeater after binding it?
- From: jasonkester
- Can I manually add items to a repeater after binding it?
- Prev by Date: hitting a key to make a selection in a listbox-not working
- Next by Date: Re: Installing & Using FCKEditor
- Previous by thread: Re: Can I manually add items to a repeater after binding it?
- Next by thread: Re: Can I manually add items to a repeater after binding it?
- Index(es):
Relevant Pages
|