I am using gridview in my report page. at page load,binded with data from two table ,i have display only few field from both table ,and when the user selected the select button in front of every row the other detail are displayed in formview.
now this application is for shipping company they want that if the ship has not reached on discharge port on time.means that if the ship is late,The record of this ship must be high lighted ,the problem is their are 7 drop down and 8 radio button list based on the selection of this control the data in gridview is change.
I some how done the code for getting the record of the ship who are not on time .But i dont know how to change the row color of this recod in grid,And i have written a code for each drop down selection and radio button selection ,whether i have to change all code or their are some other method to achieve this .
Below is the code which i am using to display the record of the ship from Load_port table and Discharge_port table
how to change the color of the row at present i am using button and on the click event of the button i am displaying the result but client want that when he loged in he must see the record of the ship which are not on time
objdb = new DB(); string StrQ = "select DP.Ref_No,DP.Category_Name,DP.Appointed_By1,DP.Total_Qty,DP.DP1_Name,DP.DP1_SailingDate,LP.Vessel_Name,LP.Total_Lp_Qty,LP.LP1_Name,LP.Load_Sailing from Discharge_Port as DP inner join Load_Port as LP on DP.Ref_No =LP.Ref_No where DATEDIFF(Day,DP.ETA,GETDATE())>'12' and DP.DP1_ArrivalDate is null"; ds=objdb.getdata(StrQ); GvLpDpDetail.DataSource = objdb.getdata(StrQ); GvLpDpDetail.DataBind();
please tell me how to achieve above result
|