Oct 21, 2012, 4:53 PM
[CLOSED] Recover all values of the grid without using directmethods or directEvents.
Hi,
Is possible recover all the values of the grid in the code behind without using DirectMethods or DirectEvents?
See my scenario:
I have a form (fromCustomer) with a user control(UCAddress).
The user control UCAddress has a grid.
The user control has too two methods:
The GetAllAddress method is used to recover all values of the grid and save in database.
These two methods will be accessed through the fromCustomer.
How do I recover all values of the grid from the GetAllAddress method?
In my fromCustomer I have the following method:
Thanks.
Is possible recover all the values of the grid in the code behind without using DirectMethods or DirectEvents?
See my scenario:
I have a form (fromCustomer) with a user control(UCAddress).
The user control UCAddress has a grid.
The user control has too two methods:
public void FillGridAddress(List<Address> Address)
{
if (Address == null)
throw new ArgumentNullException("");
this.StoreAddress.DataSource = Address;
this.StoreAddress.DataBind();
}
public List<Address> GetAllAddress()
{
this.Address = //Values grid;
return this.Address;
}
The FillGridAddress method is used to populate the grid when editing.The GetAllAddress method is used to recover all values of the grid and save in database.
These two methods will be accessed through the fromCustomer.
How do I recover all values of the grid from the GetAllAddress method?
In my fromCustomer I have the following method:
protected void ButtonNewCustomer_Click(object sender, DirectEventArgs e)
{
Customer Customer = null;
try
{
//...
Customer = new Customer();
Customer.Address = UCAddress .GetAllAddress();
}
catch (Exception ex)
{
UtilityMessage.NotifyError("Error: " + ex.Message);
}
}
How would the implementation of the method GetAllAddress?Thanks.
Last edited by Daniil; Oct 26, 2012 at 5:47 PM.
Reason: [CLOSED]