Click here to Skip to main content
15,911,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using the following the following code. The code already binding with datagrid. But The datagrid column header sames as the following like, Cur_Date,Cur_Time,Itemname etc... but I need Cur_Date as Current Date Cur_Time as Current Time,Itemname as Item Name. How I can achieve this..

I already check css but I didn't get the accurate output,but I need ,if itemname as Item Name and is set to column header. If the operation how to do in this page..?


Thanks in advance



public List<stockpagebll> SelectAllStock()
{
DataTable dt = sd.SelectAllStock();
List<stockpagebll> stock = new List<stockpagebll>();
foreach (DataRow row in dt.Rows)
{
StockpageBLL a = new StockpageBLL();
a.Id = Convert.ToInt32(row["item_id"]);
a.Cur_Date = Convert.DateTime(row["cur_date"]);
a.Cur_Time = Convert.DateTime(row["cur_time"]);
a.Itemname = row["itemname"].ToString();
a.Barcode = row["barcode"].ToString();
a.Location = row["location"].ToString();
a.Sellprize = Convert.ToDecimal(row["sellprize"]);
a.Buyprize = Convert.ToDecimal(row["buyprize"]);
a.Profit = Convert.ToDecimal(row["profit"]);

stock.Add(a);

}
return stock;
}
Posted
Updated 5-Nov-15 1:29am
v2

1 solution

Add css property(style="white-space: nowrap" in td of table) which allow text with white space as single line i.e. nowrap.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900