How to use update parametes in in Bulk edit Grid View

Topics: Developer Forum, New Control Requests, Project Management Forum, User Forum
Jul 6, 2009 at 6:24 AM

How to use update parametes in in Bulk edit Grid View

Ex

 

   SqlDataSrcBulkGrid.UpdateParameters["vpdApprovedDt"].DefaultValue = System.DateTime.Now.ToString();

 

it Is Not updated in databse

 

Beriefly

 

protected void EditableGrid_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
          
          _SqlDataSrcBulkGrid.UpdateParameters["vpdLstModiBy"].DefaultValue = _ModifiedBy;
         SqlDataSrcBulkGrid.UpdateParameters["vpdApprovedBy"].DefaultValue = _ApprovedBy;
           SqlDataSrcBulkGrid.UpdateParameters["vpdEntryStatus"].DefaultValue = "A";// ENTRY_STATUS.ToString();
          SqlDataSrcBulkGrid.UpdateParameters["vpdLstModiDt"].DefaultValue = System.DateTime.Now.ToString();
            SqlDataSrcBulkGrid.UpdateParameters["vpdApprovedDt"].DefaultValue = System.DateTime.Now.ToString();
        }

 

How?

 

But Isert parametes are inserts correctly ; But update parametes not working

Jul 8, 2009 at 8:55 PM

Try modifying e.NewValues instead. For example:

e.NewValues["vpdLstModiBy"] = _ModifiedBy;

Jul 25, 2009 at 6:29 AM

 

 

Thank you  kcaswick; It is Worked Fine

My mail. id is

muthuraj.net@gmail.com

by

P.Muthu Raj

Sep 25, 2009 at 4:06 AM
 
 

I am using Bulk edit Gridview; Iam using Dropdown list inside agrid View( It is set as autopostback=true),text boxes (all of them are inside Insert item Template);
If i first change some Changes n text box then finally i change dropdown list , it is not Consider as dirty Row? (Dirty Rows.Count=0)

How To save this row?