0
我有一個帶有列類型和type_amount的DataTable。該DataTable綁定gridview GridView1
。按照DataTable的列中的代碼值顯示說明
type type_amount
1 50,000
2 60,000
3 90,000
我已經展現TYPE_ID而不是ID的GridView中的描述,使得當
type type_amount
silk 50,000
siffon 60,000
cotton 90,000
我怎樣才能做到這一點DataTable中我gridview的似乎?
public void Get_Billing_Type()
{
try
{
DataTable dt = new DAL_Set_Billing_Type().Get_Billing_Type();
foreach (DataRow row in dt.Rows)
{
// how to implement logic ??
}
GridView1.DataSource = dt;
GridView1.DataBind();
}
catch (Exception) { }
}