Click here to Skip to main content
15,884,425 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to archive the records as per the months. Suppose the current month is June, so i would like to show the records created in this month in grid view. But the older records would be chronologically available in the archive column with each passing month.

What I have tried:

I have created a view that shows current months record in gridviiew. but i am unable to develop the archive column with previous month records.


my grid view

<div class="row">
    <table style="width:100%">
        <tr>
            <td style="color: white; font-size: 26px; height: 10%; font-size:large" colspan="5" bgcolor="#B40404" align="center">@ViewBag.month</td>
        </tr>
    </table>
    </div>

        @{
            WebGrid grid = new WebGrid(null, rowsPerPage: @Model.PageSize, canPage: true);
            grid.Bind(Model.ListAuthGrid, autoSortAndPage: true, rowCount: @Model.PageSize);
            grid.Pager(WebGridPagerModes.NextPrevious);
        }

        @grid.GetHtml(tableStyle: "table table-bordered table-striped", headerStyle: "bg-success", selectedRowStyle: "bg-warning", footerStyle: "bg-warning",
    mode: WebGridPagerModes.All,
    firstText: "<< First",
    previousText: "< Prev",
    nextText: "Next >",
    lastText: "Last >>",
        columns: grid.Columns(
                           grid.Column("", "",
                                format: @<text><center><img src="@Url.Content(item.filename)" width='120px' height='120px' /></center></text>),
                            grid.Column("exemsg", "Message to All"),
                             grid.Column("exeexp", "Experience in OIL"),
                             grid.Column("exelearn", "What I Learnt"))
Posted
Comments
[no name] 28-Jun-19 12:31pm    
Never heard of an "archive column". I doubt that anybody else has either.
Member 14330973 1-Jul-19 23:29pm    
i want to show in cloumn links like this-

2019

July(4)
June(20)
May(10)
April(1)
March(2)
February(30)
January(1)

2018
.....
.....
.....
.....
....
...

2017
....

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