Hello,
I have a datagrid and the data in it is dynamically created at runtime...
For iCounter = 0 To dataset.Tables( 0).Columns.Coun t - 1
Dim objbc As New BoundColumn()
With objbc
.DataField = dsAllPastReplie s.Tables(0).Col umns(iCounter). ColumnName
.HeaderText = dsAllPastReplie s.Tables(0).Col umns(iCounter). ColumnName
If .DataField = dsAllPastReplie s.Tables(0).Col umns("ReplyID") .ColumnName Then
.Visible = False
End If
End With
With datagrid1
.Columns.Add(ob jbc)
.DataSource = dsAllPastReplie s.Tables(0)
.DataBind()
End With
Next
dsAllPastReplie s.Clear()
I can add a column of buttons at design time, but how can I fire off some javascript when a button is clicked? I would ultimately like to have a user click one of the buttons and data in the corresponding row for a given column would come up in a popup window. I have the javascript to do the popup, but I cant figure out how to call it from the dynamically created buttons.
--
Any info will be very appreciated!
Jon
I have a datagrid and the data in it is dynamically created at runtime...
For iCounter = 0 To dataset.Tables( 0).Columns.Coun t - 1
Dim objbc As New BoundColumn()
With objbc
.DataField = dsAllPastReplie s.Tables(0).Col umns(iCounter). ColumnName
.HeaderText = dsAllPastReplie s.Tables(0).Col umns(iCounter). ColumnName
If .DataField = dsAllPastReplie s.Tables(0).Col umns("ReplyID") .ColumnName Then
.Visible = False
End If
End With
With datagrid1
.Columns.Add(ob jbc)
.DataSource = dsAllPastReplie s.Tables(0)
.DataBind()
End With
Next
dsAllPastReplie s.Clear()
I can add a column of buttons at design time, but how can I fire off some javascript when a button is clicked? I would ultimately like to have a user click one of the buttons and data in the corresponding row for a given column would come up in a popup window. I have the javascript to do the popup, but I cant figure out how to call it from the dynamically created buttons.
--
Any info will be very appreciated!
Jon
Comment