Solved

Check if GridView column is a bound column

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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