Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
I am Using below CODE DGV HeaderText Purpose..
Dim strSQL7 As String = "SELECT STUFF((SELECT DISTINCT '],['+ [FeesType] FROM FeeMaster WHERE Class='" & cboClass.Text & "' ORDER BY '],[' + [FeesType]  For XML Path('')), 1, 2,'') + ']' "
      Dim DaAp7 As New SqlDataAdapter(strSQL7, con)
        Dim Dset7 As New DataTable
        DaAp7.Fill(Dset7)
       
        With Me.DataGridView2
            .Columns.Add("Regno", "RegNo")
            .Columns.Add("Sname", "Name")
            .Columns.Add(0, Dset7.Rows(0).Item("Column1"))
           .Columns.Add("", "Total")
        End With
 
 
Wht is my Error : Team1 and Team-2 Show to Column3
 
Regno Name [Team-1],[Team-2] Total
 
i Need Seperate Team1 and Team2 Like
 
Regno Name Team-1 Team-2 Total
 
Please Tell me how can i do for Seperate
Posted 14-Feb-13 7:46am
Edited 14-Feb-13 7:59am
108.6K
v2
Comments
richcb at 14-Feb-13 14:13pm
   
What do you mean "What is my error"? That is what you are supposed to tell us. Are you getting an error message? Are you getting results you do not expect? Are you not getting any results at all? Does your code compile? Have you debugged it?
Navas Khanj at 14-Feb-13 14:15pm
   
DGV headertext want to display colum3 seperate
Ashok19r91d at 15-Feb-13 7:39am
   
Try This...
With Me.DataGridView2
.Columns.Add("Regno", "RegNo")
.Columns.Add("Sname", "Name")
.Columns.Add("Col1", Dset7.Rows(0).Item("Column1"))
.Columns.Add("", "Total")
End With
Navas Khanj at 15-Feb-13 9:39am
   
It's not Work For Seperate

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 375
1 Sergey Alexandrovich Kryukov 195
2 Prakriti Goyal 177
3 jlopez788 134
4 Kruti Joshi 117
0 OriginalGriff 6,742
1 Sergey Alexandrovich Kryukov 5,479
2 Maciej Los 3,474
3 Peter Leow 3,313
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 14 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100