Hi,
I' not sure if this is a LLBL matter or a DataGridView problem or something completely different. Anyway, I'm stuck and hope someone can give me a tipp:
I'm developing a WinForms C# application with LLBL 2.0 (SelfService).
On one of the forms I have a DataGridView which I bind to an EntityCollection "AllCustomers" during run-time. The collection receives it's data fom a View which shows customer names, addresses and similar stuff from joined tables like <Customers>, <Orders> and <Status>.
Whenever the user selects a customer in the DataGridView, I want the user to be able to edit the customer's data (but only CustomerEntity). So I fetch the corresponding entity from the database like
CustomersEntity selectedCustomer = new CustomerEntity(xxx);
and write all relevant data in some somple TextBoxes and ComboBoxes.
After modifing the data the user clicks on a Save-Button and I simply transfer all TextBox contents to the selectedCustomer entity and execute a selectedCustomer.Save().
So far, so good.
Of course I would like the DataGridView to reflect the changes made to the selected customer. And I could do that by simply reloading the whole EntityCollection "AllCustomers". But:
- I'm loosing the selected row.
- The refresh takes very long, because their are so many customers in the collection.
So, is there a way, to simply refresh ONE single row in a DataGidView (resp. refresh one single Entity in an EntityCollection and the tell the DataGridView to refresh only the corresponding row)?
I hope, all this was not too confusing and someone knows a simple solution (unfortunately I'm not such an experienced developer...:-( ).
Thanks,
Ingmar