我的一个页面中,显示给用户的DATAGRID已经格式化成了货币格式,如下:
<asp:BoundColumn DataField="Price" ReadOnly="True" HeaderText="单价" DataFormatString="{0:C}"></asp:BoundColumn>现在我想实现点编辑后,被转换的格式自动还原成可以编辑的格式,因此我是从DATASET里面重新提取相应字段值到item中,但实际在编辑框中仍然显示的是货币格式,怎么回事?public void MyDataGrid_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
this.MyDataGrid.EditItemIndex = e.Item.ItemIndex;
myLabel.Text="";
GetPreCast();
dr=ds.Tables[0].Rows[MyDataGrid.EditItemIndex]  ;  //取得popedom字段
MyDataGrid.Items[12].Cells[0].Text= dr["promisePay"].ToString();
}