datagrid further question(編號:8487)

Excuse me, how can I perfrom the following actions:
1. Query by SQL and put the result in datagrid
2. Click any one of the row an then update the data ( only one data need to update in each record )