微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Infragistics WebHierarchicalDataGrid-将数据绑定到IList时子波段的自定义样式?

如何解决Infragistics WebHierarchicalDataGrid-将数据绑定到IList时子波段的自定义样式?

| 我正在尝试在Infragistics分层数据网格的子级上设置一些自定义样式和Templatedatafield。我将控件绑定到具有子列表的IList。当我将其配置为AutoGenerateBands时,该控件将正常工作(显示父表并展开子表)。但是我需要在子表上有自定义标题和Templatedatafields。 这是我的aspx:
      <ig:WebHierarchicalDataGrid ID=\"WebHierarchicalDataGrid1\" runat=\"server\"   AutoGenerateColumns=\"false\" 
          AutoGenerateBands=\"false\" DataKeyFields=\"DataSourceId\" Width=\"700px\"   Height=\"700px\">
        <ExpandCollapseAnimation SlideOpenDirection=\"Auto\" SlideOpenDuration=\"300\" SlideCloseDirection=\"Auto\"
            SlideCloseDuration=\"300\" />


    <Columns>        
        <ig:Bounddatafield  datafieldName=\"DataSourceId\" Key=\"DataSourceId\" Header-Text=\"Data Source Id\" Hidden=\"true\"/>                        
        <ig:Bounddatafield  datafieldName=\"DataSrc\" Key=\"DataSrc\" Header-Text=\"Data Source\" />
        <ig:Bounddatafield  datafieldName=\"DataSrcType\" Key=\"DataSrcType\" Header-Text=\"Activity Type\" />
        <ig:Bounddatafield  datafieldName=\"Reporting\" Key=\"Reporting\" Header-Text=\"Reporting?\" />
        <ig:Bounddatafield  datafieldName=\"LastUpdtSrc\" Key=\"LastUpdtSrc\" Header-Text=\"Last Update Source\" />
        <ig:Bounddatafield  datafieldName=\"LastUpdtDate\" Key=\"LastUpdtDate\" Header-Text=\"Last Update Date\" />
        <ig:Templatedatafield Key=\"Priority\" Header-Text=\"Priority\"> </ig:Templatedatafield>
    </Columns>

     <Bands> 
        <ig:Band DataMember=\"WebHierarchicalDataGrid1\" Key=\"DataSourceId\">
            <Columns>
                <ig:Bounddatafield datafieldName=\"DataSourceId\" Key=\"DataSourceId\" Header-Text=\"Data Source Id\" Hidden=\"true\" />
                <ig:Bounddatafield datafieldName=\"OriginalSrc\" Key=\"OriginalSrc\" Header-Text=\"Original Source\" />
                <ig:Bounddatafield datafieldName=\"LastUpdtDate\" Key=\"LastUpdtDate\" Header-Text=\"Last Update Date\" />
                <ig:Bounddatafield datafieldName=\"RecordsCount\" Key=\"RecordsCount\" Header-Text=\"Records Count\" />
            </Columns>
        </ig:Band>
    </Bands>


        <Behaviors>
            <ig:Paging PagerAppearance=\"Bottom\" PageSize=\"50\" Enabled=\"true\" />
            <ig:Sorting SortingMode=\"Single\" Enabled=\"true\">
            </ig:Sorting>
        </Behaviors>
        </ig:WebHierarchicalDataGrid> 
这是我如何在页面加载中绑定数据的方法
    this.WebHierarchicalDataGrid1.DataSource = GetLastUpdatedEvents().OrderByDescending(x => x.LastUpdtDate);

    this.WebHierarchicalDataGrid1.DataBind();
代码生成格式正确的父表,并在正确的行上显示展开箭头。单击后,奶嘴将旋转,但不会显示任何子表。 任何帮助都感激不尽! 谢谢, -将     

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。