Re: CellFormating function slowing down table refresh..



i've realized that..

i've solved that placing the images in the resources... and importing them
from there..

tks anyway..
christiano.

"Cesar" <nospam@xxxxxx> escreveu na mensagem
news:uSwOhD7sJHA.4068@xxxxxxxxxxxxxxxxxxxxxxx
First of all, getting every image from the disk is costly. Surely it will
slow down the process, specially if your grid show several lines.

Try setting the images on a array first, then reuse whenever you need an
already loaded image.



"Christiano Donke" <cdonke@xxxxxxxxxxxxxxxxxx> wrote in message
news:e7nh7wSsJHA.4876@xxxxxxxxxxxxxxxxxxxxxxx
hey there...

I'm using this function to place place an image inside a datagridview


If e.ColumnIndex = 0 Then
If Not (GridView.Item("StatAnda", e.RowIndex).Value) Is
Nothing Then
Dim value As String = GridView.Item("StatAnda",
e.RowIndex).Value.ToString 'Gets the filename of the image to be
placed
Dim img = Image.FromFile(modProp.AppPath & "\status\" &
value) 'Read the image
GridView.Item("ImagAnda", e.RowIndex).Value = img 'PLace
it in the grid
End If
End If


But it's slowing down my grid refresh... is there something that i can
change to speed it up??
Maybe place the images on the resources??

Changing a cell backcolor may get it faster??


Tks,
christiano.





.



Relevant Pages

  • Re: History of term "Grid Computing"
    ... definitions of grid, you don't believe this, so ... within a large, global Grid project. ... My feeling is that the difficulties of actual deployment of a platform ... It doesn't help that the thing is very interconnected so that resources ...
    (comp.distributed)
  • PropertyGrid sees only public properties
    ... How can I make my class expose the properties differently for a PropertyGrid ... I want to use the propertygrid to edit resources. ... However a property grid is ideal to edit ...
    (microsoft.public.dotnet.framework)
  • Re: Group/sum elements of a vector
    ... sorry if my question is stupid but I'm at the beginning of ... I have divided into a grid an area; for each square I calculate ... resources that can help the area, ...
    (comp.soft-sys.matlab)
  • Possible file corruption using project 2003
    ... I had some issues saving my project out to the Project server database, ... Even why I type a value in the grid, the work value next to the ... the case for all resources. ... the WBS looks very messed up. ...
    (microsoft.public.project.standard_and_server)