hi friends,
i hav to use value from event to other methods.
Is it possible to do this???
Is it possible to do this???
string NameId = string.Empty;
string OrdId= string.Empty;
my event :
protected void dgv_RowEditing(object sender, GridViewEditEventArgs e)
{
GridViewRow row = (GridViewRow)dgvDeplymentReport.Rows[e.NewEditIndex];
NameId= row.Cells[17].Text; (here getting gridview value)
OrdId = row.Cells[18].Text;
}
private void Something()
{
a=NameId; (here im nt getting the Value from event)
b=OrdId;
}
My Question is hoe to use that event value in other methods..
Pls Help me
Thanks In Advance
Pls Help me
Thanks In Advance

Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 18, 2015, 7:38 AM EDT
private void Something(string nameId, string ordId)
{
string a, b;//declare a & b as you want
a = nameId;
b = ordId;
}
protected void dgv_RowEditing(object sender, GridViewEditEventArgs e)
{
string NameId, OrdId;
GridViewRow row = (GridViewRow)dgvDeplymentReport.Rows[e.NewEditIndex];
NameId= row.Cells[17].Text; //here getting gridview value
OrdId = row.Cells[18].Text;//here getting gridview value
Something(NameId, OrdId);
}
Guest UserRank #816 · 2.8K reputationPosted Aug 18, 2015, 6:45 AM EDT