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!
|