This is a migrated thread and some comments may be shown as answers.

[Solved] How to Update data in radgrid_iteminserted event

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul Litwin
Top achievements
Rank 1
Paul Litwin asked on 24 Feb 2010, 07:18 AM
In the asp.net FormView, I can use code like this to update a record as it is being stored to the database during an insert:

    protected void fvCustomers_ItemInserting(object sender, FormViewInsertEventArgs e)
    {
        string strCity = ((DropDownList)((FormView)sender).FindControl("ddlCity")).SelectedValue;
        e.Values["City"] = strCity;
    }

How do I accomplish the same when inserting a record using RadGrid? I know how to locate the value in the dropdown but I can't figure out which event to choose and how to get access to the values as I can do in the FormView's ItemInserting event.

Thanks,
Paul

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Feb 2010, 11:03 AM
Hi,

Please take a  look at the following link on how to  Set  predefined values for different column editors

Do let me know if  this helps.

Thanks,
Princy
Tags
Grid
Asked by
Paul Litwin
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or