Re: CellFormating function slowing down table refresh..
- From: "Christiano Donke" <cdonke@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 3 Apr 2009 12:12:11 -0300
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.
.
- References:
- Prev by Date: RE: How do I get the machine sid in C#
- Next by Date: Changing Crystal Report data source to a function
- Previous by thread: Re: CellFormating function slowing down table refresh..
- Next by thread: newgroup for .net sockets
- Index(es):
Relevant Pages
|