R
René Nordby
I have a DataGrid with some TemplateColumns. One of these columns is a
CheckBox column, and the ChackBox have a ToolTip.
This application should run in several languages, why the ToolTip should be
changed dynamically.
I have solved this by changing the ToolTip in the ItemDataBound event, like
this
Private Sub myDataGrid_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dtgKategori.ItemDataBound
If e.Item.ItemIndex <> -1 Then
CType(e.Item.FindControl("myCheckBox"), CheckBox).ToolTip = "My new ToolTip"
End If
End Sub
And everything works fine, but could it be done in another way.
What I'm thinking about is, that the CheckBox column is a multiple instance
of one CheckBox, so it feels a little stupid to change the ToolTip for each
Item in the DataGrid.
It should be possible to change the ToolTip before I make my databinding, so
I only should do it once, but...?
Please give me a hint...
René Nordby
CheckBox column, and the ChackBox have a ToolTip.
This application should run in several languages, why the ToolTip should be
changed dynamically.
I have solved this by changing the ToolTip in the ItemDataBound event, like
this
Private Sub myDataGrid_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dtgKategori.ItemDataBound
If e.Item.ItemIndex <> -1 Then
CType(e.Item.FindControl("myCheckBox"), CheckBox).ToolTip = "My new ToolTip"
End If
End Sub
And everything works fine, but could it be done in another way.
What I'm thinking about is, that the CheckBox column is a multiple instance
of one CheckBox, so it feels a little stupid to change the ToolTip for each
Item in the DataGrid.
It should be possible to change the ToolTip before I make my databinding, so
I only should do it once, but...?
Please give me a hint...
René Nordby