Infragistics UltraWinGrid 8.2.20082.2011

Posts   
 
    
he00273
User
Posts: 133
Joined: 02-Oct-2008
# Posted on: 03-Oct-2008 05:09:09   

I have been using Infragistics controls before I was aware of LLBLGen Pro.

I am using VS2008 SP1 with Infragistics NetAdvantage for Win Client 2008 Vol. 2

I am a little disappointed that there is or was incompatibilities between the two.

As fas I understand I am using a fairly recent version of their controls so if there is still an issue with the grid not supporting ITypedList I am very disappointed.

From the post http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=13223&HighLight=1

it was mentioned

Posted on: 30-apr-2008 20:39:22. Quote

We accidentally forgot to include the infragistics assemblies and the statebrowser dll in the beta archive. A new .zip was uploaded to the site. If you already downloaded the zip, you can copy over the remaining infragistics dlls from the v2.5 installation folder.

It would appear that there some additional files that are available as a work around or am I mistaken.

Is there a simple workaround available that I can understand. An example would be great.

he00273
User
Posts: 133
Joined: 02-Oct-2008
# Posted on: 03-Oct-2008 06:46:11   

Ok I found out about limiting MaxBandDepth to something less than 100 (like 1 or 2).wink

Tried that appears to work ok now but not quite how I expected. disappointed

Is there an easy way to use this with the Infragistics designer?confused

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 03-Oct-2008 10:25:04   

Tried that appears to work ok now but not quite how I expected

Would you please elaborate more on the above statement? What did you expect and could find?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 03-Oct-2008 10:26:01   

he00273 wrote:

I have been using Infragistics controls before I was aware of LLBLGen Pro.

I am using VS2008 SP1 with Infragistics NetAdvantage for Win Client 2008 Vol. 2

I am a little disappointed that there is or was incompatibilities between the two.

As fas I understand I am using a fairly recent version of their controls so if there is still an issue with the grid not supporting ITypedList I am very disappointed.

We've told them some time ago that if they didn't fix this pronto we would advice all our customers to kick out infragistics crap. And that helped, they assigned an engineer to it and implemented ITypedList support in their grid stuff.

if it still doesn't work, please tell infragistics to fix their code, as it should work.

From the post http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=13223&HighLight=1

it was mentioned

Posted on: 30-apr-2008 20:39:22. Quote

We accidentally forgot to include the infragistics assemblies and the statebrowser dll in the beta archive. A new .zip was uploaded to the site. If you already downloaded the zip, you can copy over the remaining infragistics dlls from the v2.5 installation folder.

It would appear that there some additional files that are available as a work around or am I mistaken.

Is there a simple workaround available that I can understand. An example would be great.

That remark has nothing to do with anything at runtime, we forgot to add some assemblies to the installer for the designer.

if you run into a problem with the infragistics grid, it's their problem. our code works OK with other 3rd party grids and the normal .NET datagrid/view so I think if you have a problem still, it's infragistics' problem.

Frans Bouma | Lead developer LLBLGen Pro
he00273
User
Posts: 133
Joined: 02-Oct-2008
# Posted on: 03-Oct-2008 10:39:35   

Day 2 with LLBLGen Pro

Morning : Investigated problem with Infragistics UltraWinGrid - found that one had to limit MaxBandDepth to 1 or 2. That head ache solved.

Afternoon : did more tutorials - worked ok. Started on my own stuff

Have small database (MSSQL 2008 ) only two tables Cases and CommunicationsLog There is a 1 to Many relationship between Cases and CommunicationsLog.

CREATE TABLE [dbo].[Cases]( [CaseNumber] [int] IDENTITY(1,1) NOT NULL, [CaseIdentifier] nvarchar NOT NULL, [CreatedBy] nvarchar NOT NULL, CONSTRAINT [PK_Cases_1] PRIMARY KEY CLUSTERED

CREATE TABLE [dbo].[CommunicationsLog]( [LogNumber] [int] IDENTITY(1,1) NOT NULL, [LogType] nvarchar NOT NULL, [CaseNumber] [int] NOT NULL, [EnteredBy] nvarchar NOT NULL, [DateLogged] [date] NOT NULL, [TimeLogged] time NOT NULL, [LogEntry] nvarchar NOT NULL, CONSTRAINT [PK_CommunicationsLog] PRIMARY KEY CLUSTERED

The relationship is on the CaseNumber fields (FK_CommunicationsLog_Cases)

If I run select C.CaseIdentifier, C.CreatedBy, L.LogType , L.EnteredBy, L.DateLogged, L.TimeLogged from dbo.Cases as c left outer join dbo.CommunicationsLog as L on C.CaseNumber = L.CaseNumber

I get

CaseIdentifier CreatedBy LogType EnteredBy DateLogged TimeLogged 08V00001 he00273 Received Email he00273 2008-09-26 13:39:37 08V00002 he00273 Sent Email he00273 2008-09-26 13:39:52 08V00003 he00273 NULL NULL NULL NULL 08V00004 he00273 NULL NULL NULL NULL 08V00005 he00273 NULL NULL NULL NULL

I have used LLBLGen Pro to create the entities and then generated the C# code.

Created a simple project but I do not get any child rows back from the Case parent.

EntityCollection<CasesEntity> MyCases = new EntityCollection<CasesEntity>(); // fetch them using a DataAccessAdapter instance using (DataAccessAdapter adapter = new DataAccessAdapter()) { //adapter.FetchEntityCollection(MyItems, filter); adapter.FetchEntityCollection(MyCases, null); }

        Console.WriteLine("Number of entities fetched: {0}", MyCases.Count);
        // Display for each customer fetched the CustomerId and the CompanyName.
        foreach (CasesEntity I in MyCases)
        {
            Console.WriteLine("{0} {1} {2}", I.CaseIdentifier, I.CreatedBy, I.CaseNumber);

            foreach (var L in I.CommunicationsLog)
            {
                Console.WriteLine(" >>>>>>>> {0} {1} {2}", L.LogNumber, L.LogEntry, L.LogType);  
            }
        }
        // -------------------------------------------------------
        Console.ReadKey();

I get Number of entities fetched: 5 08V00001 he00273 1 08V00002 he00273 2 08V00003 he00273 3 08V00004 he00273 4 08V00005 he00273 5

Why can't I see anything from my communicationslog table for the first two case rows?disappointed

he00273
User
Posts: 133
Joined: 02-Oct-2008
# Posted on: 03-Oct-2008 10:54:34   

The problem I have at the moment is that I can understand how to use Grids (including Infragistic's one) with DataSets.

I am having difficulties gaining visibility of the of the entities etc generated by LLBLGen Pro. Not surprising as I have only been trying it out for a day and half.

If I have a child table with two parents then I want to be able to create a child for a particular parent and maintain the other realtionship via a combobox.

I have this situation

Parent A | /--------- other Parent B. parentage established by drop list/combobox. | / Child

In case its not obvious Parent B is a lookup table that is used to poplulate a column (entity attribute) in the child record. Both Parents have Indentity PKs with the child having a two FK colums to each respective parent.

I am not sure (at the present) how one handles this with LLBLGen Pro. Sorry to be such complete newbie in this.

he00273
User
Posts: 133
Joined: 02-Oct-2008
# Posted on: 03-Oct-2008 11:00:15   

Walaa wrote:

Tried that appears to work ok now but not quite how I expected

Would you please elaborate more on the above statement? What did you expect and could find?

If its possible I would like to choose the datasource at design time. I think I saw this in a video somewhere (one of the asp.net ones I think). I will go back and have another look.

he00273
User
Posts: 133
Joined: 02-Oct-2008
# Posted on: 03-Oct-2008 11:07:44   

he00273 wrote:

The problem I have at the moment is that I can understand how to use Grids (including Infragistic's one) with DataSets.

I am having difficulties gaining visibility of the of the entities etc generated by LLBLGen Pro. Not surprising as I have only been trying it out for a day and half.

Sorry did not make that very clear. The visbility is mental visibility. What LLBLGen Pros creates is still a bit black box to me at present. I have a fairly clear idea of dataSets, datacolumns, datarelations, datarows etc.

I am still trying to get my head around how LLBLGen Pro encapsulates this sort of stuff.

It would be nice if the llblgen pro application had a data preview for the entities that it builds so one could check to see what data it gets back. Maybe it has and I just have not discovered it yet. Maybe its asking too much.confused

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 03-Oct-2008 11:13:45   
        EntityCollection<CasesEntity> MyCases = new EntityCollection<CasesEntity>();
        // fetch them using a DataAccessAdapter instance
        using (DataAccessAdapter adapter = new DataAccessAdapter())
        {
            //adapter.FetchEntityCollection(MyItems, filter);
            adapter.FetchEntityCollection(MyCases, null);
        }

        Console.WriteLine("Number of entities fetched: {0}", MyCases.Count);
        // Display for each customer fetched the CustomerId and the CompanyName.
        foreach (CasesEntity I in MyCases)
        {
            Console.WriteLine("{0} {1} {2}", I.CaseIdentifier, I.CreatedBy, I.CaseNumber);

            foreach (var L in I.CommunicationsLog)
            {
                Console.WriteLine(" >>>>>>>> {0} {1} {2}", L.LogNumber, L.LogEntry, L.LogType); 
            }
        }
        // -------------------------------------------------------
        Console.ReadKey();

I get Number of entities fetched: 5 08V00001 he00273 1 08V00002 he00273 2 08V00003 he00273 3 08V00004 he00273 4 08V00005 he00273 5

Why can't I see anything from my communicationslog table for the first two case rows?

Because you didn't fetch them in the first place. Please note that you are using the Adapter model, and hence there is no lazy loading or Load on demand stuff. When fetching Cases, use a prefetchPath to fetch the related CommunicationLog.

he00273
User
Posts: 133
Joined: 02-Oct-2008
# Posted on: 06-Oct-2008 03:40:08   

Because you didn't fetch them in the first place. Please note that you are using the Adapter model, and hence there is no lazy loading or Load on demand stuff. When fetching Cases, use a prefetchPath to fetch the related CommunicationLog.

Ok thanks

        // C#               
        EntityCollection MyCases = new EntityCollection(new CasesEntityFactory());
        IPrefetchPath2 path = new PrefetchPath2((int)EntityType.CasesEntity);
        path.Add(CasesEntity.PrefetchPathCommunicationsLog);
         using (DataAccessAdapter adapter = new DataAccessAdapter())
        {
           adapter.FetchEntityCollection(MyCases, null,path);
        }
        Console.WriteLine("Number of entities fetched: {0}", MyCases.Count);
        // Display for each customer fetched the CustomerId and the CompanyName.
        foreach (CasesEntity I in MyCases)
        {
            Console.WriteLine("{0} {1} {2}", I.CaseIdentifier, I.CreatedBy, I.CaseNumber);

            foreach (CommunicationsLogEntity L in I.CommunicationsLog)
            {
                Console.WriteLine(" >>>>>>>> {0} {1} {2} {3} {4}", L.LogNumber, L.CaseNumber , L.LogType, L.DateLogged, L.TimeLogged);  
            }
        }
        // -------------------------------------------------------
        Console.ReadKey();

Now gives me

Number of entities fetched: 5 08V00001 he00273 1

1 1 Received Email 26/09/2008 12:00:00 AM 13:39:37 08V00002 he00273 2 2 2 Sent Email 26/09/2008 12:00:00 AM 13:39:52 08V00003 he00273 3 08V00004 he00273 4 08V00005 he00273 5 sunglasses

Should I use PrefetchPath2 path = new PrefetchPath2((int)EntityType.CasesEntity); or IPrefetchPath2 path = new PrefetchPath2((int)EntityType.CasesEntity); confused

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 06-Oct-2008 12:16:42   

Should I use PrefetchPath2 path = new PrefetchPath2((int)EntityType.CasesEntity); or IPrefetchPath2 path = new PrefetchPath2((int)EntityType.CasesEntity);

The same thing.

JimHugh
User
Posts: 191
Joined: 16-Nov-2005
# Posted on: 07-Oct-2008 00:43:16   

If it is inside the same function, it doen't matter.

But if you are going to pass it to other functions or other classes, then you really should use the interface.

It's probably a good habit to use the interface.