Problem to Set DataGrid Row new Value

  • Thread starter Thread starter marciocamurati
  • Start date Start date
M

marciocamurati

Hi,

At my application I have a DataGrid that was loaded with data for my
Sql Server Ce, at this point it's ok, the data create rows, scroolbar
run ok, etc...
My problem is when I try to change a value of a row for example (column
1, row 1) when I set it the application freeze and I need to restar the
application. Anyone know if it's a DataGrid problem or if this problem
is in my application ?

Code:
Private Function setDataGridValor(ByVal row As Integer)
Dim getOut As Integer = CInt(dataGrid.Item(row, 2))
Dim getIn As Integer = CInt(dataGrid.Item(row, 3))

dataGrid.Item(row, 2) = getOut - 1
dataGrid.Item(row, 3) = getIn + 1
End Function

Private Function selectRow(ByVal row As Integer)
dataGrid.Select(row)
Application.DoEvents()
End Function
:

Thanks.
 
Most common reason is described here:



http://groups.google.com/group/micr...fadbe?q=freeze+invoke&rnum=3#9698376dc0ffadbe

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
IIlya,

Than this problem is "normal" at the .Net Compact FrameWork, I will
need to make some changes at my application to resolve it. That's right
?

Thanks
 
This problem is "normal" for both desktop and compact frameworks.

The difference is what desktop hangs only from time to time while NETCF
hangs pretty much all the time.
If you had reports of your desktop application occasionally hanging, that's
probably the reason.

So, yes, you need to change your code.



Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
llya,

Thans for you atention and help, I will read the post that you send to
me with attention and if I have doubts I will post here, if you can
help me again will be good.

Thanks again.
 
Hi,

It's resolve my problem the use of the Invoke, get out the application
freeze.

Thanks !
 
Back
Top