int Editid =Convert.ToInt16(GridView1.DataKeys[e.NewEditIndex].Values[0].ToString()); objdal.Editid=Editid; dv=objdal.Edit_Data(); ddlGroupName.SelectedValue= dv.Table.Rows[0]["Groupid"].ToString(); ddlName.SelectedValue = dv.Table.Rows[0]["Name"].ToString(); txt_LeaveFrom.Text = dv.Table.Rows[0]["LeaveFrom"].ToString(); txt_LeaveTo.Text = dv.Table.Rows[0]["LeaveTo"].ToString();
public DataView Edit_Data() { cmd = new SqlCommand("LeaveForm_Select_Data", cnn); cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); DataView dv = new System.Data.DataView(); dv.Table = ds.Tables[0]; return dv; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)