This is a migrated thread and some comments may be shown as answers.

PushButton reference in ItemDataBound?

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rob Ainscough
Top achievements
Rank 1
Rob Ainscough asked on 12 Feb 2019, 07:20 PM

I can reference ButtonType="LinkButton" in the ItemDataBound method but not a ButtonType="PushButton"?  I can't seem to locate the correct reference for PushButton?

This works but only for LinkButton

Dim ditem As GridDataItem = CType(e.Item, GridDataItem)

Dim ReserveButton As LinkButton = CType(ditem("gbtc_Reserve").Controls(0), LinkButton)

This triggers and error:

Dim ditem As GridDataItem = CType(e.Item, GridDataItem)

Dim ReserveButton As RadPushButton = CType(ditem("gbtc_Reserve").Controls(0), RadPushButton)

Cheers, Rob.

1 Answer, 1 is accepted

Sort by
0
Rob Ainscough
Top achievements
Rank 1
answered on 13 Feb 2019, 12:54 AM

Oops, solved this ... it was simple just use "Button" when using ButtonType="PushButton".

Rob.

Tags
Grid
Asked by
Rob Ainscough
Top achievements
Rank 1
Answers by
Rob Ainscough
Top achievements
Rank 1
Share this question
or