Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on asp.net mvc4 and razor. i am getting hte below data from database based on the productId=2.this is the single row data from database.My question is how can i display this single row data in web grid.Any body help me.
{"ProductId":2,"ProductInfo":[{"Key":"Size","Value":"small"},{"Key":"color","Value":"Gray"},{"Key":"Gender","Value":"Male"},{"Key":"Price","Value":"$150.00"},{"Key":"Desciption","Value":"Test Product Description--DY"},{"Key":"Rating","Value":"4"},{"Key":"Rating","Value":"4"}],"CategoryID":1,"ManufaturerId":3,"ItemNo":"sku1212","ProductName":"ECCO Womens Kawaii Sandals","DeletedInd":"N","medImagePath1":"/Images/SmallnlargeImg/sandal1_medium1.png","medImagePath2":"/Images/SmallnlargeImg/sandal1_medium2.png","medImagePath3":"/Images/SmallnlargeImg/sandal1_medium3.png","larImagePath1":"/Images/SmallnlargeImg/sandal1_large1.png","larImagePath2":"/Images/SmallnlargeImg/sandal1_large2.png","larImagePath3":"/Images/SmallnlargeImg/sandal1_large3.png","smaImagePath1":"/Images/SmallnlargeImg/sandal1_thumb1.png","smaImagePath2":"/Images/SmallnlargeImg/sandal1_thumb2.png","smaImagePath3":"/Images/SmallnlargeImg/sandal1_thumb3.png"}

I want to display below columns for grid

ProductId,CategoryID,ManufaturerId ,ItemNo,ProductName,DeletedInd,LastRefreshedDate,CreatedDate,LastRefreshedUserId,CreatedUserId,EffectiveBeginDate,EndDate,UPCCode,StoreID,SKU,SKUFullName,[SupplierCode] ,[SupplierCodeFullName]
Posted
Updated 19-Sep-13 4:45am
v2
Comments
TryAndSucceed 19-Sep-13 12:54pm    
You have to create a WebGrid in your view or in your controller dynamically.
JasonMacD 19-Sep-13 13:15pm    
What have you tried so far. Have you google this. Here is one example: http://www.w3schools.com/aspnet/webpages_webgrid.asp

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