Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get reference to DataItem
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
How to get reference to DataItem
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01328496
Message ID:
01328496
Views:
43
Hi everybody,

This code
if (e.Row.RowType == DataControlRowType.DataRow)
    {

        LinkButton link = e.Row.FindControl("lnkbtnRemoveRole") as LinkButton;

        if (link != null)
        {
             
            DataRowView view = e.Row.DataItem as DataRowView;
in RowDataBound method produces null as view, though I can see DataItem for the Row and all the columns while executing line by line.

Do you see what may be wrong here?

Same code works fine in another Grid. The difference here is that this grid uses DataObject as its DataSource, doesn't have select button and has template field. May be select button makes all the difference? Let me try to add it.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform