.net - Adding column functionality to a Custom Repeater -


I am trying to expand a custom repeater, so that I have a table fashions (similar to a gridview). Whatever I am thinking of getting, is to get that thing which can be implemented in the following manner:

  & lt; My: customrepeater id = "rpt" runat = "server" & gt; & Lt; Columns & gt; & Lt; Colonel header = "id" & gt; ## id ## & lt; / Col & gt; & Lt; Colonel Header = "name" & gt; ##Name ## & lt; / Col & gt; & Lt; / Column & gt; & Lt; / Mary: customrepeater & gt; Can someone suggest that this can be achieved? Can I somehow create an archive for a class that implements an itemplate?  

Thanks, Steve

! Edit it!

I have achieved it by creating a new class (Colonel) with an ITemplate property and then in a generic.list (colon) property in the repeater. Therefore, to add items, I do the following:

  & lt; Columns & gt; & Lt; My: colonel header = "1" & gt; & Gt; ColTemplate & gt; Exam & lt; / ColTemplate & gt; & Lt; / My: Col & gt; & Lt; My: colonel header = "2" & gt; & Lt; ColTemplate & gt; Test2 & lt; / ColTemplate & gt; & Lt; / Mary: Colonel & gt; & Lt; My: colonel header = "3" & gt; Lieutenant; ColTemplate & gt; Test3 & lt; / ColTemplate & gt; & Lt; / My: Colonel & gt; & Lt; / Column & gt;  

Let me know if anyone has a better solution

I 'By creating a new class (colonel) with ITMplate property and then making the property of generic.list (colonel) in the repeater. Therefore, to add items, I do the following:

  & lt; Columns & gt; & Lt; My: colonel header = "1" & gt; & Gt; ColTemplate & gt; Exam & lt; / ColTemplate & gt; & Lt; / My: Col & gt; & Lt; My: colonel header = "2" & gt; & Lt; ColTemplate & gt; Test2 & lt; / ColTemplate & gt; & Lt; / Mary: Colonel & gt; & Lt; My: colonel header = "3" & gt; Lieutenant; ColTemplate & gt; Test3 & lt; / ColTemplate & gt; & Lt; / My: Colonel & gt; & Lt; / Column & gt;  

was not looking at any other recommendations as I thought I should answer it and give my solution here.

Cheers


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -