Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditional field change via GridView _RowUpdating()
Message
From
13/11/2006 14:10:33
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Conditional field change via GridView _RowUpdating()
Miscellaneous
Thread ID:
01169262
Message ID:
01169262
Views:
62
Hi All,

I would like to update 2 fields bound to a mmGridView conditionally on the value of a third field in the row being edited in the grid.

I am not sure how to access the appropriate row & their values.
protected void grdSurveyDue_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
                  
         // Get the item to be updated
        this.grdSurveyDue.EditIndex = e.RowIndex;
        // Retrieve the previous SurveyDue DataSet
        DataSet dsSurveyDue = (DataSet)Session["dsSurveyDue"];

        // Save the DataSet (the GridView automatically binds back)
        this.Save(this.oSurveyDue, dsSurveyDue);

        // Reset the edited item and rebind the GridView
        this.grdSurveyDue.EditIndex = -1;
        this.BindControl(this.grdSurveyDue);
    }
Do I need to do something like this to set the row?:
this.oSurveyDue.Entity.SetDataRow(dsSurveyDue.Tables["SurveyDue"].Rows[e.RowIndex]);

This should be simple but since I am such a newbie I just have not been able to determine the best solution.

Just point me to some term & resources, Thanks.

Any help will be appreciated, Ted
Next
Reply
Map
View

Click here to load this message in the networking platform