?
Solved

Check if GridView column is a bound column

Posted on 2006-07-03
4
Medium Priority
?
690 Views
Last Modified: 2012-06-27
1.
In GridView_RowUpdated event, i need to check if GridView column is a bound column.
Must be something extremly simple..

2.
on related note...
If anyone can explain it / send me a link:
In GridView_RowUpdated event, I'm comparing oldValues and NewValues, basically using modified code from here:
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridviewupdatedeventargs.aspx
(look at Example there).
Now when accessing TEMPLATE coluns, i have Old  and New values and its fine, in case of bound columns,
i get IsNothing(NewValues(i)) = true. Why NewValues in bound columns are nothing?

3.
Another story is NULL hadnling in above example from microsoft.
If It Is NULL Old /New values (as being cast in microsoft example) are Nothing, not DBNull.
Any idea why?

You help is gratly appreciated.
0
Comment
Question by:YakovS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 1000 total points
ID: 17035119
1 . Use this

GridView1.Columns(1).GetType

where .Columns(1) here you specify which column number

Hope this helps u )
thanx
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question