Own c# Routines - Guidance Needed

Posted by Darren Parr on 06-Apr-2013 08:47

Hi

Ive got around alot of my issues with 2 c# classes. The datafilter now works a treat. I can get the data sorted and displayed for 70k records in under a second.

Wanting to also sort out my initializerow issue, I wrote a class for this.

All the class does is subsribe to initializerow in the grid in its constructor.

I instantiate from my ABL code using

RowObject = NEW GridHelper.RowObject(UltraGrid1).

It all works fine, but takes too long and I'm wopndering if the bridge is getting in the way. I would really appreciate some help in this area.

The c# is fine and quite simple. It just checks for the value of a cell telling it a colour to apply to the row.

Ive put some debug in here too and it goes into the routine but never creates the appearance as textcolor is set to ?.

ie when im not using colours, its still slow.

Strange really that a call to InitializeRow which just checks for the existence of a column and gets a value should have this kind of effect.

In fact I think my code in openeedge was quicker which tells me something isnt quite right. 2mins for 70k records on my i5 PC.

if (e.Row.Cells.Exists("TextColor"))
{
       System.Object objcolor = e.Row.GetCellValue("TextColor");

        if (objcolor != System.DBNull.Value)
               e.Row.CellAppearance = GetColorAppearance((int)objcolor);

}

Any ideas?

Thanks

Darren

All Replies

Posted by jquerijero on 06-Aug-2013 16:30

Passing large object like UltraGrid between ABL and .NET will be slow. I think it is doing a full copy/replication of the object.

Posted by Admin on 06-Aug-2013 16:39

I think it is doing a full copy/replication of the object.

No. It's not.

This thread is closed