Using FillDataTable method


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well I think that you are going about this in a more difficult way than you need to.  I would use a BusinessBindingSource control, Fill by business object and just bind it to the grid.  There is a sample that comes with the framework named the BusinessBindingSource Sample (I think).  I know that it is on the first page of the Sample Console.  I recommend looking at this sample, I think it will help you as you move forward.
Vikram Saxena
Vikram Saxena
StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)
Group: Forum Members
Posts: 41, Visits: 99
Hi,



i am showing some data in a grid present in the form.

i want user can modify the customers in grid and also can add new.

lets say i have customers.



so what is do is.

//in the BO

public Datatable GetExistingCustomers()

{

return GetByStoredProcedure("proc_GetCustomers");

}



//in the form

DataTable dtCustomers = customerBO1.GetExistingCustomers();

gridCustomer.DataSource = dtCustomers;



now i want to use fill the BO i use on my form with same records as i am showing in the grid.

please tell me how can i do this.

should i need to use the CopyDataFrom() function. i tried this but when i use

customerBO1.NewRow() i got exception "The given key was not present in the dictionary.".



am i missing some thing??...please give me any solution..

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search