Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 6th, 2006, 12:12 AM
su su is offline
Authorized User
 
Join Date: Nov 2006
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Probelm in DataGrid Display

I am using C#.NET, Visual Web Developer, SQL Server 2000.

I have a webform which has following stuff.

Textbox : Order# // represents ORD_Numer of database
Textbox : Start Date // represents Start_Date of database
Textbox : end date // represents END_Date of database
DDL : Show Image (yes/no)
Submit Button

Main SQL Query : SELECT ORD_ID, ORD_Number, Start_Date, End_Date FROM Orders

now here I am allowing user to either find order by order# or using Date Range. System takes default dates if User has not entered any date. Now in any case if Show Image DDL = No then DataGrid Does not show column of image. and if Show Image DDL = yes, DataGrid shows column of image with all images for corresponding order.

I will query the database to fetch image if DDL is YES.

Now my code is working without DDL selection. I dont know how to apply rule of DDL.

I was able to simply hide and show image column(i used templetecolumn) on index 0 of datagrid using ddlshowimage.visible == true/fals based on selection using onSelectedIndexChanged property of DDL.

Now my problem is I dont know how to show images (or add images in image column which is @ index 0 of datagrid). Images will be captured dyanmically from database based on ORD_ID.

Does Anybody has any idea how to add images after i bind datagrid based on selection of DDL (I will be able to capture value of DDL after submit button)?

PLEASE HELP!
Reply With Quote
  #2 (permalink)  
Old December 8th, 2006, 04:00 AM
Friend of Wrox
 
Join Date: May 2006
Location: Delhi, Delhi, India.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

delare a datatable dt with all requied column and image column.
According to selection of ddl fill dt .i.e. if ddl="yes" select with image column and if ddl="no" then fetch records without image column. and bind this dt to datagrid which already have image column.

Bijgupt
Reply With Quote
Reply


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid Column Display degie C# 2005 0 May 28th, 2007 01:48 AM
Datagrid display Lovehead VB.NET 2002/2003 Basics 1 January 20th, 2007 04:12 PM
Probelm in DataBound Column of DataGrid su C# 0 December 4th, 2006 07:39 PM
to display an icon in datagrid deeraj ADO.NET 4 March 30th, 2005 01:00 AM
Datagrid display deadrocker .NET Web Services 1 February 12th, 2005 06:04 AM



All times are GMT -4. The time now is 01:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.