المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : How to edit Dataset value (NOT DATA GRID)



C# Programming
08-04-2009, 02:54 PM
Hi All,

i want to edit DataSet value before binding to GridView. How can i do that..?


conn.open();

string result="select name,address,age";
sqlCommand cmnd=new sqlCommand(result);
sqlDataAdapter ad=new sqlDataAdapter(result,conn);
DataSet ds=new DataSet();
result.Connection=conn;
ad.SelectCommand=result;

// in here i want to edit (divide age value by 2) before bind data to gridview.

ad.fill(ds);
GridView1.DataSource=ds;
GridView1.DataBind();

conn.close();


i want to divide age value by 2 before bind data to gridview.How can i do that...???

Thank you very much .....

CheeN