Visual Basic .NET Forums  

Go Back   Visual Basic .NET Forums > ASP.NET > Web Forms

Web Forms Discussion on web forms related topics, web form development, techniques, etc.

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-14-2009, 2:52 PM
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Jan 2009
Age: 25
Posts: 1
Reputation: 0
raafishaafi is on a distinguished programming path ahead
Default Merging Columns in One Column

Hey,
I have a requirement, If in datatable the value of one column is null. I gotta show the value of other column in the same column.

For example:

Code:
id | name | descript | descriptionType
1  | ab   |          |    doc 
2  | pd   | pdf      |
3  | cd   |          |   Business
Result should be

Code:
id name descript
1 ab       doc
2 pd       pdf
3 cd       business.
Thanks in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-14-2009, 6:59 PM
VB.NET Forum Master
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Sep 2007
Age: 22
Posts: 268
Reputation: 72
Stonkie probably authored a book by nowStonkie probably authored a book by nowStonkie probably authored a book by now
Default

You can modify your SQL SELECT statement like this :

Code:
SELECT Id, Name, ISNULL(Descript, descriptionType) AS Description
I you need the user to save this data though, you may have to keep two separate data models. A better idea might be to modify the data as it is displayed, but I do not have enough experience with Web Forms to help you out on this.
__________________
The human mind's capability to comprehend abstract concepts is limited to the vocabulary it can use to describe it. The more precise the building blocks, the more complex the thoughts that can emerge... Sounds like the evolution of programming languages doesn't it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 5:12 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0


For advertising opportunities click here.