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 ShahiPosted Aug 18, 2015, 11:38 AM
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 UserPosted Aug 18, 2015, 10:45 AM