Sure, you can now bind data source controls to the GridView with little or no code, but does this necessitate a replacement for the DataGrid?
当然,现在您只需少量代码或不需要编码就能将数据源控件绑定到GridView,但是单凭这点就有必要替换DataGrid吗?
Remember, though, that a DataGrid can only bind to a data source object for the purpose of reading data.
但要记住,绑定到数据源对象的 DataGrid 只能用于读取数据。
Now, instead of adding a DataGrid, which will again be too wide if you add all columns to it, you should instead add individual ASP.NET TextBox controls to bind to the attributes of the Employee.
现在,作为替代,将添加一个DataGrid,如果将所有列都添加到其中,那么它会再次变得非常宽,此时应该改为添加个别a SP.NET TextBox控件,以绑定到Employee的属性。
应用推荐