Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a grid on my page and i am trying to get its edit event in presenter.
This is the code i am writing in page

C#
protected override void OnInit(EventArgs e)
       {
           employeeSearchPresenter = new EmployeeSearchPresenter(this);
           grvEmployeeSearch.RowEditing += grvEmployeeSearchRowEditing;

       }

and this in presenter

C#
void employeeSearch_grvEmployeeSearchRowEditing(object sender, GridViewEditEventArgs e)
      {
          try
          {


now the issue is I need to get the data from the row. In general if i write the editing event on page then it was easy like this

GridViewRow editRow = grvEmployeeSearch.Rows[e.NewEditIndex];
                editRow.BackColor = System.Drawing.Color.FromName("#ffdb7b");
                Employee resource = (Employee)grvEmployeeSearch.DataKeys[e.NewEditIndex].Value;


but how can I get this in presenter.

Any help?
Posted
Comments
VishwaKL 19-Dec-12 2:55am    
you can read the data in row editing event ? cant you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900