I have a grid which has a number of databound columns (all created in code)
I have carried out a number of conditional formatting operations for example
I have now added a gridimagecolumn to my table which I want to display an arrow image pointing up or down depending if my databound column "changeFromPrevious" is positive or negative.
I am hoping to simply change the imageURL of the gridImageColumn, but I am unclear how and from which event I should do this.
ie do I do this on the databound condition dataitem, if so how do I access the imagecolumn.imageurl
or
do I do this as each image in the GridImageColumn is created, if so how do get the databound item "changedfromPrevious" to apply conditions.
or is there a better approach?
Thanks
Johnathan
I have carried out a number of conditional formatting operations for example
Private
Sub
radgrid_databound(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridItemEventArgs)
'Is it a GridDataItem
If
(
TypeOf
(e.Item)
Is
GridDataItem)
Then
Dim
dataBoundItem
As
GridDataItem = e.Item
If
Left(dataBoundItem(
"ChangeFromPrevious"
).Text, 1) =
"-"
Then
dataBoundItem(
"ChangeFromPrevious"
).ForeColor = Color.Red
End
If
End
If
End
Sub
I have now added a gridimagecolumn to my table which I want to display an arrow image pointing up or down depending if my databound column "changeFromPrevious" is positive or negative.
I am hoping to simply change the imageURL of the gridImageColumn, but I am unclear how and from which event I should do this.
ie do I do this on the databound condition dataitem, if so how do I access the imagecolumn.imageurl
or
do I do this as each image in the GridImageColumn is created, if so how do get the databound item "changedfromPrevious" to apply conditions.
or is there a better approach?
Thanks
Johnathan