New Posts New Posts RSS Feed: code required for adding 2 columns in gridview
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

code required for adding 2 columns in gridview

 Post Reply Post Reply
Author
Lakshmiramineni View Drop Down
Newbie
Newbie


Joined: 09-Jun-2009
Location: Bangalore
Posts: 4
Post Options Post Options   Quote Lakshmiramineni Quote  Post ReplyReply Direct Link To This Post Topic: code required for adding 2 columns in gridview
    Posted: 17-Jun-2009 at 8:08am

Partial Class Default2

    Inherits System.Web.UI.Page

 

    'Declare two dataset on page level

    Private dsUserVendorName As DataSet

    Private dsUserRoleName As DataSet

 

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        'Call following both function here

        LoadUserVendorName()

        LoadUserRoleName()

    End Sub

 

    Private Sub LoadUserVendorName()

        'Open Connection

        'Fill whole usersId and associate vendor name in dsUserVendorName dataset

    End Sub

 

 

    Private Sub LoadUserRoleName()

        'Open Connection

        'Fill whole usersId and Role name in dsUserRoleName dataset

    End Sub

 

    'This function call from grid view

    Private Function DisplayVendorName(ByVal intUserId As Integer) As String

        Dim strVendorName As String

        ' find Venodor Name from dsUserVendorName dataset using intUserId

 

        Return strVendorName

    End Function

    'This function call from grid view

    Private Function DisplayRoleName(ByVal intUserId As Integer) As String

        Dim strRoleName As String

        ' find Role Name from dsUserRoleName dataset using intUserId

 

        Return strRoleName

    End Function

End Class

Can you tell me what i can write in Function DisplayRoleName(ByVal intUserId As Integer).Already the gridview is existing and want to add 2 new columns in the existing gridview.urgent..

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down