Datagrid freeze

G

Guest

Hi all,

i'm working on a simple TCP server-client query program whereby server takes
in an input query from the client, decodes it, and updates the datatable that
stores the data accordingly or returns the result of the query. There is a
datagrid on server whose datasource is the above datatable.

Whenever I receive a command to add a new row, the GUI of the server freezes
but other clients can still query the (updated) data as usual. And the GUI
returns back to normal once client that added the row disconnects from it.

Does anyone know what is wrong? I would gladly provide codes if needed but
won't do it in case I start flooding the forum.

Thank you in advance.
 
C

CT

I guess I don't know enough about the infrastructure of your application
setup, but it seems to me that having a UI on the server isn't the right way
to go. Is the server app also the data server, and/or is the data persisted
anywhere?
 
G

Guest

Thanx CT,

My data server is just in the form of a datatable whereby I populate its
rows using a text file when my server first starts up. Everything else that
happens take place within the datatable itself. Do you mean the problem lies
with the use of datagrid?

nSp
 
C

CT

Is the text file directly bound to the DataTable or do you simply iterate
through it and add the rows to the DataTable? In addition, the data in the
text file, are they persisted from the the DataTable at any point?
 
G

Guest

Hi CT,

The way I populated my data was what you've described, iterate and add rows
to DataTable, then close the file. The only time the file would be accessed
again is when the 'Save' button is pressed but I have not come to that so far.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top