Multiple Query String Parameters in asp.net Datagrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dhanlak
    New Member
    • May 2007
    • 1

    #1

    Multiple Query String Parameters in asp.net Datagrid

    I am doing a asp.net Project, in which i need to populate a datagrid using a stored procedure. The stored procedure returns different column names based on the user input, but the no of columns(it returns 3 columns) returned is the same.

    I have bound these columns dynamically by retrieving the column names like this.

    Dim bc1 As New BoundColumn
    bc1.HeaderText = "ID"
    bc1.DataField = DATASET.Tables( 0).Columns(0).C olumnName.ToStr ing

    Dim bc2 As New BoundColumn
    ....
    Dim bc3 As New BoundColumn
    ....

    But the problem in addition to this, i need to create a 4th hyperlink column which passes all the other 3 column values as three querystring parameters to another page. I have tried numerous ways but nothing works. how can it be done using dynamic hyperlink template. Or is there any other good method for doing this.
  • gomzi
    Contributor
    • Mar 2007
    • 304

    #2
    Originally posted by dhanlak
    I am doing a asp.net Project, in which i need to populate a datagrid using a stored procedure. The stored procedure returns different column names based on the user input, but the no of columns(it returns 3 columns) returned is the same.

    I have bound these columns dynamically by retrieving the column names like this.

    Dim bc1 As New BoundColumn
    bc1.HeaderText = "ID"
    bc1.DataField = DATASET.Tables( 0).Columns(0).C olumnName.ToStr ing

    Dim bc2 As New BoundColumn
    ....
    Dim bc3 As New BoundColumn
    ....

    But the problem in addition to this, i need to create a 4th hyperlink column which passes all the other 3 column values as three querystring parameters to another page. I have tried numerous ways but nothing works. how can it be done using dynamic hyperlink template. Or is there any other good method for doing this.
    use a template field in the gridview for the hyperlink.
    i am not sure whether hyperlink supports the command name and command argument properties . if it doesn't then you can use the linkbutton which does support it.

    Comment

    Working...