[RESOLVED]Toggle Sort direction image in razor

Hi, I have a html table in my razor view to display data.

Sorting function is working fine, however I am not able to decide how to display sort direction image in column headers.

<th>
                
                @Html.ActionLink("User Id", "DisplayUsers", new { sortOrder = ViewBag.NumberSortParm, UserId = ViewData["UserId"] }, new { @class = "sort", @id = "section1" })
            </th>
            <th>
                @Html.ActionLink("Password", "DisplayUsers", new { sortOrder = ViewBag.PassSortParm }, new { @class = "sort", @id = "section1" })
            </th>

Thanks & Regards

Hi siteslayer,

Thanks for your post.

siteslayer

Sorting function is working fine, however I am not able to decide how to display sort direction image in column headers.

please check this:

http://www.mikesdotnetting.com/Article/203/Enhancing-The-WebGrid-With-Sort-Arrows

Maybe it will help you.

Best Regards,

Eileen

Leave a Reply