Solved

Check if GridView column is a bound column

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SignalR - getting new data from sql DB 5 79
Asp/Net Validation date Issue 9 52
ASP.NET reading ATOM 2 51
Help with C#, MVC, razor. 6 18
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

932 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

9 Experts available now in Live!

Get 1:1 Help Now