如何将模板列动态的设置成只读 当处于编辑时控制编辑完一列后再编辑下一列
问题是通常点击编辑按钮时所有可以编辑的列都会同时变成可编辑的怎样控制其中一些先不能编辑
 通过一些设置后再编辑呢

解决方案 »

  1.   

    how are binidng the template? you could try to set (if you are using BoundColumn)((BoundColumn)DataGrid1.Columns[n]).ReadOnly = true;or try to set those textboxes to readonly or replace those textboxes in ItemCreated event for the DataGrid when e.Item.ItemType = ListItemType.EditItem
      

  2.   

    是要做修改吧
    还是不要用这种方法
    如果你的列数多了
    页面怎么处理最好是修改时将数据读到文本框里,
    或下拉列表里,
    在进行修改
    你有可能还不会这么做
    不过以后就知道不能用(DataGrid)的这个方法进行修改了