Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

EXCEL like grid

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 01-10-2006   #1 (permalink)
lcantelmo@gmail.com
Guest


 

EXCEL like grid

I'm trying to create an Avalon custom control simulating the Excel
grid. It should have to be able to handle 5000 rows by 300 columns of
data.

My first approach was overriding the OnRender method and drawing the
visible fields, but the performance decreases when adding scroll
support because I need to repaint my grid all the time.

Another way is having a Grid element with the visible rows and columns,
and removing and adding the corresponding rows and columns to simulate
scroll.

What do you think? What would be a good approach?

Thanks in advance.


My System SpecsSystem Spec
Old 01-10-2006   #2 (permalink)
loser
Guest


 

Re: EXCEL like grid

First step- read through some WPF tutorials. Not to be blunt, but
overriding OnRender is the last thing you want to do here and you're
missing a few key points about WPF (like retained visuals).

Take a look at ListView, that'd be a good starting place. I don't know
if it has virtualization like ListBox does, but if not then thats what
you need to add.

My System SpecsSystem Spec
Old 01-10-2006   #3 (permalink)
lcantelmo@gmail.com
Guest


 

Re: EXCEL like grid

Is it possible to implement a Grid that supports virtualization? Is
that the right way to solve my problem?

In that case, should I choose Grid and/or VirtualPanel as base classes?
Should I implement IScrollInfo in that class?

Where can I find some information or samples to help me understand how
to implement a solution to my problem taking advantage of what Avalon
offers.

Thanks.

My System SpecsSystem Spec
Old 01-10-2006   #4 (permalink)
Drew Marsh
Guest


 

Re: EXCEL like grid

lcantelmo@gmail.com wrote:

> Is it possible to implement a Grid that supports virtualization? Is
> that the right way to solve my problem?


It is, but it's no easy task... so be prepared to do a lot of work.

> In that case, should I choose Grid and/or VirtualPanel as base
> classes?


This is a question I haven't spent enough time investigating. Looking at
the way VirtualStackPanel is implemented it seems like you should inherit
from VirtualPanel, but what that means is that you're stuck implementing
ALL the layout functionality of Grid again. I'm not sure if there's a way
to inherit from Grid, implement just IScrollInfo yourself and "feed" the
correct items to the base Grid.

> Should I implement IScrollInfo in that class?


Yes, that's how you know when to create/destroy controls that lie outside
of the current viewport.

> Where can I find some information or samples to help me understand how
> to implement a solution to my problem taking advantage of what Avalon
> offers.


AFAIK there are none. Virtualization is not an easy task and there's no holy
grail implementation that fits all possible layout needs. That's my guess
as to why why there's only VirtualizingStackPanel in the WPF library right
now.

HTH,
Drew


My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to view Excel document without Microsoft Office Excel installe jl Vista General 8 04-20-2008 11:38 PM
Vista ASP.NET 2.0 Cannot open Excel File using Microsoft.Excel 12.0 COM object ckellywilson Microsoft Office 0 03-26-2008 02:04 PM
WPF Grid? john Avalon 8 11-20-2006 12:10 PM
WPF Grid? john Avalon 0 11-19-2006 12:55 PM
Grid.Row Grid.Column set programatically at runtime craig kelly-soens www.XpectWorld.com Avalon 0 01-10-2006 03:52 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51