I want to show record of one row in multiple rows of webgrid. How can i achieve this.

View

@grid.GetHtml(
    tableStyle: "grid",
    headerStyle: "head",
    alternatingRowStyle: "alt",
    columns: grid.Columns(
             grid.Column("vehicleType","Type"),
             grid.Column("make", " Make"),
             grid.Column("modelType", "Model"),
             grid.Column("color", "Color"),
             grid.Column("registartion", "Registartion"),
             grid.Column(
             header: "Action", 
             format: @<text> 
           <a href="DeleteVehicle#" id="deleteLink"  onclick="DeleteVehicle">Delete</a></text>)
    )
)

instead of columns i want my modelType and registration in another row.

Please help me

You can use Pivot in sql..

you can use pivot.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.