Dynamic List binding refetch with mdi form

Posts   
 
    
Posts: 15
Joined: 02-Jan-2010
# Posted on: 02-Jan-2010 09:15:24   

Hi. I am evaluating llblgenpro and i have a question about the some best practices for my particular scenario. I'm writing an LLBLGen Pro Framework here that supports Adapter I'm running on winform mdi app.

Fist creating dynamic dynamic list at the same :ResultsetFields fields = new ResultsetFields(3); fields.DefineField(EmployeeFields.FirstName, 0, "FirstNameManager", "Manager"); fields.DefineField(EmployeeFields.LastName, 1, "LastNameManager", "Manager"); fields.DefineField(EmployeeFields.LastName, 2, "AmountEmployees", "Employee", AggregateFunction.Count); IRelationCollection relations = new RelationCollection(); relations.Add(EmployeeEntity.Relations.EmployeeEntityUsingEmployeeId, "Employee", "Manager", JoinHint.None);

IGroupByCollection groupByClause = new GroupByCollection(); groupByClause.Add(fields[0]); groupByClause.Add(fields[1]);

DataTable dynamicList = new DataTable(); TypedListDAO dao = new TypedListDAO(); dao.GetMultiAsDataTable(fields, dynamicList, 0, null, null, relations, true, groupByClause, null, 0, 0);

Second bindind "dynamicList" to grid : Gridcontrol.DataSource = dynamicList

The user too can open another mdi window with the "Employee" and add, modify or delete any Employee.

How can I refetch or refresh to dynamicList (binding grid to another mdi form) when user (modify or new Employee) save the "Employee" in the another mdi form?

How can I refetch or refresh to dynamicList when user delete "Employee" in the grid?

Regards

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 02-Jan-2010 10:21:31   

You have to pull the data again. You can:

  • create a Refresh button in windows that contains the grid. Such button executes the code you have above.

  • Create a Refresh/Refetch method you can call from other mdi forms when they are done. As the first mdi forms is not static, you have to know the instance name of the form.

David Elizondo | LLBLGen Support Team
Posts: 15
Joined: 02-Jan-2010
# Posted on: 02-Jan-2010 12:11:14   

Hi, Thank you for reply,

I can refresh with execute above code. But the dynamiclist include 15.000 record and every refresh operatition is slow performance. Which is the Best way fast refresh methot? or How can I refresh only releated one record in the dynamiclist ?

regards,

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 04-Jan-2010 02:22:11   

I think your question in this thread (http://llblgen.com/TinyForum/Messages.aspx?ThreadID=17132) is almost the same. Lets follow the discussion there.

David Elizondo | LLBLGen Support Team