Nested Repeater

前端 未结 3 774
孤独总比滥情好
孤独总比滥情好 2020-12-31 17:10

I Have a display that needs to be a little more dynamic than what I\'m use to and can\'t seem to quite find the answer I need.

                        Custom         


        
3条回答
  •  春和景丽
    2020-12-31 17:52

    I know this question is for a datatable, but I found this question while trying to accomplish the same task with objects and I didn't find an answer and thought it would be useful for someone else.

    If you are using an object that has nested objects in it, you set the datasource like this

    DataSource='<%# Eval("ChildDataSourceProperty") %>'
    

    I came to this conclusion upon all the other answers seeming too complicated

    Here is my full repeater code

    
        
            
    <%# Eval("ParentProperty") %>

    <%# Eval("ChildObjectProperty") %>

提交回复
热议问题