bhermer
asked on
Good alternate to the DataGridView
Hi,
I have an application (for displaying financial information) that has for example 20 dynamic unbound datagridview controls, each has 18 columns and about 5 rows
I have routines that can update any cell by its grid name row index and cell index,this routine is on a constant cycle every 800ms applying changes to the cells and changing their colours accordingly. At any one pass I am changing on average about 40 cells
I need to reflect changes in 'realtime' and I have all my scavaging code as well as cell coordinate and change code down to about 400ms using threading on quad core CPU's
The problems:
1) The paint/refresh time in the grids are poor, I know my routines end well before the actual paint happens
2) All the grids are in a TablePanel and when scrolling the panel, the paint is even worse, just turns into white lines until a full refresh is done
3) I can't flash cells, i.e. change their colours for 5 seconds and revert to white without freezing the application (cant work out how to access a control from one thread to another)
I need an alternative, I come from an ASP.NET background, and using AJAX on an html page to display this much info, and flash cells etc is very simple, and a browser seems to have no problems with painting during scroll, or replacing cell contents without having to struggle. I am thinking about embedding a web control and creating HTML on the fly and sending JS commands to change cells etc. This is alot of work for me and I would like to know anyones thoughts on alternates??
Thanks
I have an application (for displaying financial information) that has for example 20 dynamic unbound datagridview controls, each has 18 columns and about 5 rows
I have routines that can update any cell by its grid name row index and cell index,this routine is on a constant cycle every 800ms applying changes to the cells and changing their colours accordingly. At any one pass I am changing on average about 40 cells
I need to reflect changes in 'realtime' and I have all my scavaging code as well as cell coordinate and change code down to about 400ms using threading on quad core CPU's
The problems:
1) The paint/refresh time in the grids are poor, I know my routines end well before the actual paint happens
2) All the grids are in a TablePanel and when scrolling the panel, the paint is even worse, just turns into white lines until a full refresh is done
3) I can't flash cells, i.e. change their colours for 5 seconds and revert to white without freezing the application (cant work out how to access a control from one thread to another)
I need an alternative, I come from an ASP.NET background, and using AJAX on an html page to display this much info, and flash cells etc is very simple, and a browser seems to have no problems with painting during scroll, or replacing cell contents without having to struggle. I am thinking about embedding a web control and creating HTML on the fly and sending JS commands to change cells etc. This is alot of work for me and I would like to know anyones thoughts on alternates??
Thanks
ASKER
I have tried (and I am doing it) at component level, I will try at form level tomorrow, but I am not sure it will help because then I will be delaying the whole forms update, and the idea here is to have almost instant updates, not to mention I need to get the whole refresh done in under 200ms
Have you ever used any other controls that have the same functionality but better performace? trouble being I think, the control is to heavy weight for what I need, I would probably have better performance with dynamic created labels!
I am thinking about writing an html page and dynamically adding, changing tables using javascript via the webbrowser navigate function ,javascript:void(JS) do you have an opinion on this perhaps?
Thanks
Have you ever used any other controls that have the same functionality but better performace? trouble being I think, the control is to heavy weight for what I need, I would probably have better performance with dynamic created labels!
I am thinking about writing an html page and dynamically adding, changing tables using javascript via the webbrowser navigate function ,javascript:void(JS) do you have an opinion on this perhaps?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi, thanks for that, unfortunatly the second one relys on ASP.NET engine running this is a thick application and it wont have access to an ASP instance.
I will have a play with the first one and let you know
I will have a play with the first one and let you know
ASKER
I am accepting this answer, simply because it gave me a better upderstanding on how to write my own
As a test, you might even try a Suspend/Resume at the form level (rather than the individual DataGridView's)
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.suspendlayout.aspx