I'm having trouble changing the expand/collapse button image in a grid. My goal is that I would like to keep the EnableEmbeddedBaseStylesheet ja EnableEmbeddedSkins false and set only the styles I need for the grid. This works fine and as expected, it also gets rid of the original styles of the button. The problem is that I can't find a place where to set the imageurl for the button.
I have tried several different solutions:
Inside mastertableview:
<ExpandCollapseColumn ButtonType="LinkButton" CollapseImageUrl="myfirsturl" ExpandImageUrl="mysecondurl" />
In Prerender:
dim column = TryCast(mygrid.MasterTableView.GetColumn("ExpandColumn"), GridExpandColumn)
column.ButtonType = GridExpandColumnType.ImageButton
column.ExpandImageUrl = mysecondurl
column.CollapseImageUrl = myfirsturl
In ColumnCreated:
If TypeOf e.Column Is GridExpandColumn Then
Dim column = TryCast(e.Column, GridExpandColumn)
column.ButtonType = GridExpandColumnType.ImageButton
column.ExpandImageUrl = mysecondurl
column.CollapseImageUrl = myfirsturl
End If
Nothing works. I have a feeling that I'm trying to set it 1) int the wrong sub (even though many examples use solutions above) 2) to the wrong element. So how can I change it?
I have tried several different solutions:
Inside mastertableview:
<ExpandCollapseColumn ButtonType="LinkButton" CollapseImageUrl="myfirsturl" ExpandImageUrl="mysecondurl" />
In Prerender:
dim column = TryCast(mygrid.MasterTableView.GetColumn("ExpandColumn"), GridExpandColumn)
column.ButtonType = GridExpandColumnType.ImageButton
column.ExpandImageUrl = mysecondurl
column.CollapseImageUrl = myfirsturl
In ColumnCreated:
If TypeOf e.Column Is GridExpandColumn Then
Dim column = TryCast(e.Column, GridExpandColumn)
column.ButtonType = GridExpandColumnType.ImageButton
column.ExpandImageUrl = mysecondurl
column.CollapseImageUrl = myfirsturl
End If
Nothing works. I have a feeling that I'm trying to set it 1) int the wrong sub (even though many examples use solutions above) 2) to the wrong element. So how can I change it?