UltraWebGrid分层出问题:索引超出了数组界限
UltraWebGrid用到了分层(Hierarchical),偶做的类似Infragistics NetAdvantage 的例子--WebGrid下的Database Updating(没看过这个例子的不用管,看看下面这两行代码就好了),dataSet11取出来没有问题,但加上下面两行就会出错"索引超出了数组界限",到底什么原因啊,另外,这两行代码用处何在?
UltraWebGrid1.Bands[0].DataKeyField=dataSet11.Tables[ParentTable].PrimaryKey[0].ColumnName;
UltraWebGrid1.Bands[1].DataKeyField=dataSet11.Tables[ChildTable].PrimaryKey[0].ColumnName;