0

I have created a Webgrid at server side in asp.net Mvc 3.0. The data columns are added there now I want to create columns for Edit and Delete functionality It was created at client side but when I execute It shows only one column which was created for Delete/Edit.Now I want to merge the client side and server side coding (The server side coding is done in class). So Please help me to solve the problem how can I create the grid with all the columns.

1 Answer 1

1
<td class="iconActions">
    <a href='@Url.Action("Details", "Contacts", New With {.id = item.ID})' class="ss_sprite ss_application_view_detail" alt="View Detail" title="View Detail" />
</td>
<td class="iconActions">
    <a href='@Url.Action("Edit", "Contacts", New With {.id = item.ID})' class="ss_sprite ss_application_edit" alt="Edit" title="Edit" />        
</td>
<td class="iconActions">
    <a href='@Url.Action("Delete", "Contacts", New With {.id = item.ID})' class="ss_sprite ss_cross" alt="Delete" title="Delete" />
</td>

In my case, @Url.Action was used because I wanted icons instead of worded links and needed to do that with css classes.

Hope this helps.

Sign up to request clarification or add additional context in comments.

3 Comments

Can u send me the code of edit and delete. The data has to be edit and delete in Sql server
Is this possible using Webgrid?
The edit and delete are handled by the controller action code. As far as the webgrid, I tend to stay away from it and build my "grids" myself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.