-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: shraddha
Message 13 in Discussion

Hi vandana,   Here is a solution to ur problem   Assumptions Dataset :  authorset1
Adapter : OleDbDataAdapter1
Datagrid: authorgrid   -------------------------Code begins 
here-----------------------  AuthorGrid.DataSource = AuthorSet1
                AuthorGrid.DataMember = "authors"
                AuthorSet1.Clear()
                OleDbDataAdapter1.Fill(AuthorSet1, "authors") 
 Dim ts As New DataGridTableStyle
                ts.MappingName = "authors"                 Dim colid As New 
DataGridTextBoxColumn
                With colid
                    .MappingName = "au_id"
                    .HeaderText = "Author ID"
                End With
                Dim collname As New DataGridTextBoxColumn
                With collname
                    .MappingName = "au_lname"
                    .HeaderText = "Last Name"
                End With
                Dim colfname As New DataGridTextBoxColumn
                With colfname
                    .MappingName = "au_fname"
                    .HeaderText = "First Name"
                End With
                Dim colphone As New DataGridTextBoxColumn
                With colphone
                    .MappingName = "phone"
                    .HeaderText = "Phone Num."
                End With
                Dim coladdr As New DataGridTextBoxColumn
                With coladdr
                    .MappingName = "address"
                    .HeaderText = "Address"
                End With
                Dim colcity As New DataGridTextBoxColumn
                With colcity
                    .MappingName = "city"
                    .HeaderText = "City"
                End With
                Dim colstate As New DataGridTextBoxColumn
                With colstate
                    .MappingName = "state"
                    .HeaderText = "State"
                End With
                Dim colzip As New DataGridTextBoxColumn
                With colzip
                    .MappingName = "zip"
                    .HeaderText = "Zip"
                End With
                Dim colcontract As New DataGridTextBoxColumn
                With colcontract
                    .MappingName = "contract"
                    .HeaderText = "Contract"
                End With                 ts.GridColumnStyles.Add(colid)
                ts.GridColumnStyles.Add(collname)
                ts.GridColumnStyles.Add(colfname)
                ts.GridColumnStyles.Add(colphone)
                ts.GridColumnStyles.Add(coladdr)
                ts.GridColumnStyles.Add(colcity)
                ts.GridColumnStyles.Add(colstate)
                ts.GridColumnStyles.Add(colzip)
                ts.GridColumnStyles.Add(colcontract)                 
AuthorGrid.TableStyles.Add(ts)                 ts = Nothing
                colid = Nothing
                collname = Nothing
                colfname = Nothing
                colphone = Nothing
                coladdr = Nothing
                colcity = Nothing
                colstate = Nothing
                colzip = Nothing
                colcontract = Nothing ----------------------------- code  ends 
----------------------------- 
This worked for me. i m sure it will work for you. Luv,
Shraddha

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to