Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi there,

 

I am struggling with the following for some time now. I use the datagrid control in 3 ways.

 

1. To view a database query result and search in the result in the datagrid

2. When I need to update the database with a record

3. When I Insert data into a record.

 

Depending on these three functions I need the datagrid to behave different.

 

In the case of 1. The first row should be editable and the rows containing data should be read only. Just for selection purpose

 

In the case of 2. Only the row that needs to be updated (record in the database) should be editable. Just add a complete row from the datagrid view as a ercord in the database.

 

In case of 3. the row where the insertion needs to be done should be editable and the rest read only. Insert the new data in a existing database record.

 

What is the best way to do this?

 

is it better to do this ina custo control or just code it in the forms?

 

Thanks in advanced,

 

Cire

Trust the Universe
Posted

Ok, so i see that I have to do something with the paint event. But when I put the setdialog dimensions in this paint event it loops for ever.

How do I just run the paint event one time?

 

Cire

Trust the Universe

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...