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

RadGrid ItemCreated reference to current Column

1 Answer 398 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 16 Aug 2010, 05:19 AM
Hi,

I need a way to know which column the current item in ItemCreated is part of.

Essentially, I want to be able to do this:

Dim dctLocked as Dictionary(Of String, Boolean)
.
.
.
CType(e.Item, GridDataItem).Enabled = dctLocked(CurrentColumnUniqueName)

Where CurrentColumnUniqueName is a variable containing the current column unique name somehow.

Is there any way to do this?

Thanks

Daniel

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Aug 2010, 06:52 AM
Hello Daniel,

ItemCreated is fired before the grid binds to data. That means no data is available in the cells' text. So you can access the cell value in ItemDataBound event. Check out the following documentation which explains how to access the cell/row in ItemDataBound event.
Accessing cells and rows

Thanks,
Princy.

Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or