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.NETTextBox控件,以绑定到Employee的属性。
For example, if we place a DataGrid on a form and bind it to the authors table in the pubs database, as shown in Figure 3, the size of the view state string in 1.x is 12,648 characters.
例如,如果我们在窗体上放置一个DataGrid,将其绑定到pubs数据库的authors表格,如图3所示,则1 . x中的ViewState字符串大小是12,648个字符。
How can I bind IsEnabled to whether or not a datagrid has a single item selected?
我怎么能绑定启用时是否有一个单一的选择项目中?
How can I bind IsEnabled to whether or not a datagrid has a single item selected?
我怎么能绑定启用时是否有一个单一的选择项目中?
应用推荐