• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "looking for alternative to jqGrid in mvc asp.net"

Collapse

  • scotspine
    replied
    sorry hab [keep yer hair on]. like i said, i posted the wrong question. i'm really looking for an alternative to the jqgrid, 'coz it don't degrade too nicely when users haven't got j/script enabled [not common i know, but...] and i also want more control over the rendering etc. and i also want to page more than simple tabular data - think asp.net repeater etc...

    so again, apologies, it was my fault for a poorly titled thread and thanks for your help...promise..never do it again...must think more clearly...read before posting...don't mislead...

    Leave a comment:


  • HairyArsedBloke
    replied
    WTF has that lot got to do with jqGrid ????

    Leave a comment:


  • scotspine
    replied
    thanks hab. i think i wasn't asking the right question. i get the jquery grid stuff...more or less out the box. what i'm looking for is a solution that is unobtrusive...i think i will need to do it myself.

    i can get the paging working properly, retrieving only the rows i need, but i'm having problems ajaxing it all.

    so far i have in the html:

    ========================
    Code:
    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
            $("form#paging").submit(function(event) {
                event.preventDefault();
            });
        });
    
        function hijack(form, callback) {
            $("#indicator").show;
    
        }
    </script>
    .
    .
    .
    .

    HTML Code:
    <table>
            <thead>
                <tr>
    			    <th>Make</th>
    			    <th>Model</th>
    			    <th>Mileage</th>
    			    <th colspan="3">Action</th>
                </tr>
            </thead>
    		<%
    		foreach (Car car in ViewData.Model) { %>
    			<tr>
    				<td><%= car.Make %></td>
    				<td><%= car.Model %></td>
    				<td><%= car.Mileage %></td>
    				<td><%=Html.ActionLink<CarsController>( c => c.Show( car.Id ), "Details ") %></td>
    				<td><%=Html.ActionLink<CarsController>( c => c.Edit( car.Id ), "Edit") %></td>
    				<td>
        				<% using (Html.BeginForm<CarsController>(c => c.Delete(car.Id))) { %>
                            <%= Html.AntiForgeryToken() %>
        				    <input type="submit" value="Delete" onclick="return confirm('Are you sure?');" />
                        <% } %>
    				</td>
    			</tr>
    		<%} %>
        </table>
    <div class="pager">
    	<% using (Html.BeginForm("Index", "CarsController", FormMethod.Post, new{ID="paging"})) { %>
    		<%= Html.Pager(ViewData.Model.PageSize, ViewData.Model.PageNumber, ViewData.Model.TotalItemCount) %>
    		<% } %>
    	</div>
    =====================

    in the controller:

    ====================================

    Code:
            
    [Transaction]
            public ActionResult Index(int? page)
            {
                int currentPageIndex = page.HasValue ? page.Value - 1 : 0;
    
                int numCars = carRepository.GetAll().Count;
                IList<Car> cars = carRepository.GetAllPaged(currentPageIndex * defaultPageSize, defaultPageSize);
    
                return View(cars.ToPagedList(currentPageIndex, defaultPageSize, numCars));
            }
    ====================================

    the ToPagedList method returns all the paging links for the tabular data. i need a way to hook up the click event of each anchor tag of the paging to the js ajax handler...

    ...i realise that the j/script above is incomplete..it's just stubbed out for now.

    ...(wonder if this post will format)

    Leave a comment:


  • HairyArsedBloke
    replied
    First of all, a disclaimer, I’m not a techie; I just hack stuff together until it sort of works.

    I have an async jqGrid on a view and it gets populated by making a call to the controller that returns a JSon result.

    I nicked the code off of somebody’s web page but I can’t find it just now. I’ll have another look later as I think I’ll need to keep a record of this myself.

    Leave a comment:


  • scotspine
    replied
    hi hab, i should prob. have included a question with the o/p, beyond the unobtrusive bit, which clearly it can't be

    did you use a cell array or named columns and if the second, did you use iqueryable?

    ta

    Leave a comment:


  • HairyArsedBloke
    replied
    Aye, I've done it. Using ASP.NET MVC that is.

    Leave a comment:


  • scotspine
    started a topic looking for alternative to jqGrid in mvc asp.net

    looking for alternative to jqGrid in mvc asp.net

    has anyone here used this, using json to feed it data, in an mvc environment? i'm debating whether to 'roll my own' or invest some time with it. obvious reservations include the fact that it won't produce an unobtrusive solution. or can it?

Working...
X