hi,
plz tell me how to bind the record set to datagrid..
i have all the data in recordset now i want to modify the recordset and dind that to datagrid... also in one column i want to supress the duplicate values and put balnk spaces in that..hw can i do that.. plz let me know

thanks in advance

Recommended Answers

All 3 Replies

Hi,

use this code:
con > Open Connection object

Dim ssql As String
Dim rs As New ADODB.RecordSet
ssql = "Select * From MyTable Order By MyField"
Set rs = Nothing
rs.CursorLocation = adUseClient
rs.Open ssql, con
Set DataGrid1.DataSource = rs
DataGrid1.Refresh

I dont know how to Suppress Duplicate field Value, Eager to know if anybody has the solution for that.

Regards
Veena

the same thing i did.. but i want to edit the record set and then bind to datagrid

Hi,

Set all these properties of datagrid to True:
allowaddnew,allowdelete,allowupdate =true

Regards
Veena

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.