Solved

Check if GridView column is a bound column

Posted on 2006-07-03
4
689 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 250 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

687 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