serious problem
-
Hi i wanted to create a product comparision.user will select some products and than it will display side by side comparision. i tried datalist,grid, pivot table but still facing problem. in pivot table we r unable to display iamge and in datalist i am unable to display column headings and data in proper format pls suggest me. any idea or any link from there i can get some source code or idea to create the same?
-
Hi i wanted to create a product comparision.user will select some products and than it will display side by side comparision. i tried datalist,grid, pivot table but still facing problem. in pivot table we r unable to display iamge and in datalist i am unable to display column headings and data in proper format pls suggest me. any idea or any link from there i can get some source code or idea to create the same?
Try using a DataGrid and the TemplateColumns. It's worked for me. Not very hard to use. A link to a tutorial is below. http://aspnet.4guysfromrolla.com/articles/061002-1.aspx[^] You'll have to set autogeneratecolumns to false. Then, you don't even need a column header! You can format whatever you need in a table, or whatever you want.
**Description:** <%# DataBinder.Eval(Container.DataItem, "Description") %> **Category Name:** <%# DataBinder.Eval(Container.DataItem, "CatName") %> **View Count:** <%# DataBinder.Eval(Container.DataItem, "ViewCount", "{0:#,###}") %> (code sample from 4guysfromrolla.com)
-
Try using a DataGrid and the TemplateColumns. It's worked for me. Not very hard to use. A link to a tutorial is below. http://aspnet.4guysfromrolla.com/articles/061002-1.aspx[^] You'll have to set autogeneratecolumns to false. Then, you don't even need a column header! You can format whatever you need in a table, or whatever you want.
**Description:** <%# DataBinder.Eval(Container.DataItem, "Description") %> **Category Name:** <%# DataBinder.Eval(Container.DataItem, "CatName") %> **View Count:** <%# DataBinder.Eval(Container.DataItem, "ViewCount", "{0:#,###}") %> (code sample from 4guysfromrolla.com)
Um... The form butchered the code. Follow the link above to see what I was talking about.
-
Um... The form butchered the code. Follow the link above to see what I was talking about.
Hi thanks again.i already tried that code but problem is that this code will display colmn headings for each n every time when there is a record in the database; display will looks like: id CP100 id cp200 id cp3000 name xyz name ass name asassa and i wants to display my product comparision like the following: id cd100 cd200 cd3000 name xyz ass asasas if i will define table outside grid than i am unable to use the same table into grid. pls suggest me any solution.
-
Hi thanks again.i already tried that code but problem is that this code will display colmn headings for each n every time when there is a record in the database; display will looks like: id CP100 id cp200 id cp3000 name xyz name ass name asassa and i wants to display my product comparision like the following: id cd100 cd200 cd3000 name xyz ass asasas if i will define table outside grid than i am unable to use the same table into grid. pls suggest me any solution.
Here's the code that I used for my Testimonial View page. In order to use any of the manual columns you need to make sure that you set the "AutoGenerateColumns" to false, either in the datagrid tag or the codebehind. When you define the columns, there are different types, and manual headers that you can add. You can find more examples of this at asp.net, in the Tutorials section. The code below is what you'd do if you wanted to avoid the auto-generated table almost entirely. For each record the DataGrid wraps a <td> tag around the code I've got in the asp:TemplateColumn tag.
* * * **<%# DataBinder.Eval(Container.DataItem, "FName") %> <%# DataBinder.Eval(Container.DataItem, "LName") %>** <%# DataBinder.Eval(Container.DataItem, "City") %>, <%# DataBinder.Eval(Container.DataItem, "State") %> **Before**  %>) **After**  %>) <%# DataBinder.Eval(Container.DataItem, "Testimonial") %>
But from your reply it seems that you want a more typical format. Below is a link to the ASP.Net DataGrid tutorials page. This is pretty extensive, and shows how to properly add columns to a datagrid. You can use either CodeBehind or manually cr -
Here's the code that I used for my Testimonial View page. In order to use any of the manual columns you need to make sure that you set the "AutoGenerateColumns" to false, either in the datagrid tag or the codebehind. When you define the columns, there are different types, and manual headers that you can add. You can find more examples of this at asp.net, in the Tutorials section. The code below is what you'd do if you wanted to avoid the auto-generated table almost entirely. For each record the DataGrid wraps a <td> tag around the code I've got in the asp:TemplateColumn tag.
* * * **<%# DataBinder.Eval(Container.DataItem, "FName") %> <%# DataBinder.Eval(Container.DataItem, "LName") %>** <%# DataBinder.Eval(Container.DataItem, "City") %>, <%# DataBinder.Eval(Container.DataItem, "State") %> **Before**  %>) **After**  %>) <%# DataBinder.Eval(Container.DataItem, "Testimonial") %>
But from your reply it seems that you want a more typical format. Below is a link to the ASP.Net DataGrid tutorials page. This is pretty extensive, and shows how to properly add columns to a datagrid. You can use either CodeBehind or manually cri just wants a simple display fist column would contains all column headings and from second column the data will be displayed like the following: Brand LG samsung nokia price 12 11 112 specification x y z i am keep trying since 2 weeks but still unable to find solution.
-
i just wants a simple display fist column would contains all column headings and from second column the data will be displayed like the following: Brand LG samsung nokia price 12 11 112 specification x y z i am keep trying since 2 weeks but still unable to find solution.
Are you trying to do it sideways? With the column headings to the left? The way it would work is Head Head Head Img Brand Price Img Brand Price Img Brand Price Or whichever order you decide... Otherwise, you could just create a TemplateColumn, and inside, create a table with three cells, or format it however you want. It's got a LOT of flexibility. Check out the online examples of what the templatecolumn can do for you on asp.net.
-
Are you trying to do it sideways? With the column headings to the left? The way it would work is Head Head Head Img Brand Price Img Brand Price Img Brand Price Or whichever order you decide... Otherwise, you could just create a TemplateColumn, and inside, create a table with three cells, or format it however you want. It's got a LOT of flexibility. Check out the online examples of what the templatecolumn can do for you on asp.net.
-
yes i am trying for side by side comparision. from where i can get online example for side by side ?
Sorry, I'm lost on that one too... You might want to generate custom HTML for this one. It won't be as versatile as a DataGrid, but it'll work. Use an OleDbDataAdapter (oDA) and do a while(oDA.Read) { oDA["MyField"].ToString(); } You can make a StringBuilder that will create your HTML table for you, pulling the info from the DB as listed above. Hope this helps...
-
Sorry, I'm lost on that one too... You might want to generate custom HTML for this one. It won't be as versatile as a DataGrid, but it'll work. Use an OleDbDataAdapter (oDA) and do a while(oDA.Read) { oDA["MyField"].ToString(); } You can make a StringBuilder that will create your HTML table for you, pulling the info from the DB as listed above. Hope this helps...