Skip to main content

Microsoft Silverlight

Answered Question Create a lightweight datagridRSS Feed

(0)

nyhetsgrupper@gmail.com
nyhetsgr...

Participant

Participant

1372 points

318 Posts

Create a lightweight datagrid

Hi,

The Datagrid is to slow to load. (It uses 250-300 ms to databind if I have 5 columns and 20 rows). I need to build a lightweight datagrid, or download one if it exists. I think it should be possible to make this faster, as it only takes 10 ms to databind the same collection to a ListBox with templated columns).

Where to start to create my own control? Have anyone created theire own small datagrid they want to sheare?

Please click the "Mark as answer" link if this answered your question

Roger Gullhaug

Allen Chen – MSFT
Allen Ch...

Star

Star

13858 points

1,801 Posts

Answered Question

Re: Create a lightweight datagrid

Hi

It's not a custom DataGrid but hope it can give you some ideas:

http://silverlight.net/forums/p/18286/62754.aspx

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

nyhetsgrupper@gmail.com
nyhetsgr...

Participant

Participant

1372 points

318 Posts

Re: Re: Create a lightweight datagrid

Thank you. The example helped me alot. I have now created my lightweight datagrid:) The only problem is that it is as slow as the original:( It seems like it is not possible to make this fast as it seems like Silverlight is slow when it comes to constructing a hierarchy (tree) of visual elements. I really hope this is faster in the release version.

Please click the "Mark as answer" link if this answered your question

Roger Gullhaug

nyhetsgrupper@gmail.com
nyhetsgr...

Participant

Participant

1372 points

318 Posts

Re: Re: Create a lightweight datagrid

Oops. I was wrong. My time measure wasn't very good. My lightweight datagrid control is at least twice as fast as the original datagrid. Maybe Silverlight is not slow creating a large hierarchy of visual elements. Maybe there is just something strange going on in the datagrid making it really slow.

Please click the "Mark as answer" link if this answered your question

Roger Gullhaug

acidburner
acidburner

Member

Member

154 points

74 Posts

Re: Re: Create a lightweight datagrid

Hi nyhetsgrupper,

 maybe you can tell me how you managed it to make a lightweight datagrid.

I have a datagrid with 100 rows and 8 columns. 7 columns are templated beacause they represent the weekdays. The rest of the grid will be populated with scheduledate (still have to make it). SL takes already seconds to build the datagrid so maybe you have some good advice?

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities