Solved

Check if GridView column is a bound column

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now