使用通用列表进行 WebDataGrid 排序
我有一个像这样的通用集合,
Dim List(Of t) myData = data.GetData()
myWebDataGrid.DataSource = myData
myWebDataGrid.DataBind()
webdatagrid 排序的配置是这样的,
<Behaviors>
<ig:Sorting Enabled="true" SortingMode="Multi">
<ColumnSettings>
<ig:SortingColumnSetting ColumnKey="Key1" Sortable="true" />
</ColumnSettings>
</ig:Sorting>
</Behaviors>
但是当我在此控件上设置可排序属性并运行页面时... 我只是尝试排序,所有数据都消失了。
I have a generic collection like this
Dim List(Of t) myData = data.GetData()
myWebDataGrid.DataSource = myData
myWebDataGrid.DataBind()
the config of the webdatagrid sort is this
<Behaviors>
<ig:Sorting Enabled="true" SortingMode="Multi">
<ColumnSettings>
<ig:SortingColumnSetting ColumnKey="Key1" Sortable="true" />
</ColumnSettings>
</ig:Sorting>
</Behaviors>
but when I set the sortable property on this control and run the page...
I just try to sort and all the data disappears.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,网格希望在每次回发时都有数据源。或者您可以尝试设置 EnableDataViewState="true"
Yes the grid expects to have datasource on every postback. Or you can try to set EnableDataViewState="true"
我意识到回发后我必须再次设置数据。
I realized that after the postback I have to set the data again.