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

Gridview Multiple Row Updation

1 Answer 245 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Retheesh
Top achievements
Rank 1
Retheesh asked on 14 Sep 2007, 04:11 AM
Sir,
    I couldn't update the value of a cell that I clicked last.
     I expect a quick reply.
     Thanks in advance
     Retheesh

Here I include the code     

private void btnUpdateAll_Click(object sender, EventArgs e)

{
GridViewInfo gvi = rgHeadLine.MasterGridViewInfo;
int Rowcount = gvi.Rows.Count;
for (int i = 0; i < Rowcount; i++)
{
GridViewRowInfo gvri = gvi.Rows[i];
bool publish = (bool)gvri.Cells["Publish"].Value;
bool Active = (bool)gvri.Cells["Active"].Value;
int HeadlineID = Convert.ToInt32(gvri.Cells["HeadLineID"].Value);
HeadLines myHeadline = new HeadLines();
myHeadline.Publish = publish;
myHeadline.Active = Active;
myHeadline.UpdatedBy =
"Mahesh";
int RecordAffected = myHeadline.UpdateHeadLine(HeadlineID);
}

}

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 16 Sep 2007, 10:41 AM
Hello Retheesh,

Probably this could be one of the boolean columns ("Publish" or "Active"). There is a known issue when a value in such a column is changed and before it is persisted in the grid, the grid loses focus. This issue has been addressed and will not be present in the upcoming Q2 2007 release of our controls.


Best wishes,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Retheesh
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or