Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why this code returns null?
Message
From
15/09/2008 14:30:37
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01347651
Message ID:
01347724
Views:
19
>>>>>Hmm, why the Row isn't bound and what exactly means the row bound? I assign DataSet to GridView's datasource.
>>>>
>>>>I assume this is a WebControls.GridViewRow ?
>>>>What's the RowType of the row in question? - are you sure it's a DataRow not a Header,Footer or other non-bound type?
>>>
>>>Yes. It is a record in a GridView I'm trying to delete. Getting names from the Cells works fine, so using alternative syntax should also work. I like the alternative syntax much better because you don't need to guess which column is the last name or first name.
>>
>>This doesn't answer my question. What is the RowType of the GridViewRow when its DataItem type is null ? AFAIK a GridViewRow.DataItem will only return null if (a) it is not a bindable type or (b) it is - but it has not been bound.
>
>I can add a code to check for the type, but I'm sitting on a record in the GridView and trying to delete it. Why would type be something different than DataRow ?

I don't know. Maybe it is a DataRow. Why not just find out so that one line of enquiry can be closed?
If it IS a DataRow type then look for binding problems.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform