![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | CellFormating function slowing down table refresh.. 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. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: CellFormating function slowing down table refresh.. 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@xxxxxx> wrote in message news:e7nh7wSsJHA.4876@xxxxxx Quote: > 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. > |
My System Specs![]() |
| | #3 (permalink) |
| | 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@xxxxxx Quote: > 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@xxxxxx> wrote in message > news:e7nh7wSsJHA.4876@xxxxxx Quote: >> 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. >> > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Typed datasets and table table adapters components not showing inToolbox | .NET General | |||
| KAV 9 is slowing down my internet? | System Security | |||
| Slowing down the mouse | General Discussion | |||
| how do you create a dynamic table/pivot table | .NET General | |||
| BUG: Redirecting function contents to a file truncates function lines at the width of the console | PowerShell | |||