I have a grid that has checkboxes in the header. I am trying to figure out a way to remove these checkboxes upon exporting and am having no luck. I column header contains the checkbox control and a linkbutton. I tried clearing the cell and then adding just the linkbutton back, but the extract still showed the checkbox data. There must be a simpler way of accomplishing this. Does anyone have any ideas?
(the columns are created dynamically which is why there is a loop)
(the columns are created dynamically which is why there is a loop)
'failed attempt at removing the checkboxes from the header
Dim
commandItem
As
GridItem
For
Each
commandItem
In
radGridExport.MasterTableView.GetItems(GridItemType.Header)
Dim
hdrItem
As
GridHeaderItem =
CType
(commandItem, GridHeaderItem)
Dim
chkbox
As
CheckBox =
CType
(hdrItem.FindControl(
"cbAll"
), CheckBox)
chkbox.Visible =
False
For
j
As
Integer
= 16
To
hdrItem.Cells.Count - 1
Dim
ctrl
As
LinkButton =
CType
(hdrItem.Cells(j).Controls(0), LinkButton)
If
ctrl IsNot
Nothing
Then
Dim
val
As
Integer
= 0
Integer
.TryParse(ctrl.Text, val)
If
val > 0
Then
hdrItem.Cells(j).Controls.Clear()
hdrItem.Cells(j).Controls.Add(ctrl)
End
If
End
If
Next
Next