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
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)