jquery-bootgrid

How to deal with jQuery bootgrid request data in MVC

拈花ヽ惹草 提交于 2020-01-23 12:04:26
问题 I'm having some issues with implementing a jQuery bootgrid using ASP.Net MVC. I can't implement the sorting, searching, pagination etc. functionality. This is what I have in my controller: public JsonResult IndexJson(BootgridRequestData model) { var contacts = (from x in db.ContactSet select new { x.AccountId, x.FirstName, x.LastName, x.FullName, x.JobTitle, x.ParentCustomerId, x.EMailAddress1, x.Telephone1, x.MobilePhone, x.Fax, x.GenderCode, x.BirthDate }).ToList(); // This tResult throws a

Bootgrid - Unexpected token < in JSON at position 0

随声附和 提交于 2020-01-22 03:35:51
问题 I am having a bootgrid table which I populate using ajax, the problem is when I select multiple columns from db, after ten columns I receive an error. Does anyone know if boodgrid has a limitation or something. I specify that the data are ok, I tested all of them with less than eleven rows and it works perfectly, but if I select more than 10 columns from db I receive this: Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at Function.m.parseJSON (VM217 jquery-1

Bootgrid's search is not working

三世轮回 提交于 2020-01-06 20:54:38
问题 I'm trying to run the search of Bootgrid but when I enter data into the search field stays loading. The webmethod from server side return a list of DTO's that are automatically serialized , since the data is displayed correctly. I 've looked everywhere , documentation , examples and I cannot get to see which might be the problem, what should I do to make the search work? Thank you This is the asp.net code This is the DTO which i return a list of. Namespace Data.DTO Public Class CarSearchDTO

Jquery Bootgrid table row color based on condition

半腔热情 提交于 2020-01-06 19:57:44
问题 i would like to change row color based on my condition. I am using Bootgrid js (http://www.jquery-bootgrid.com/Documentation) Here is example: my condition can be 1 or 0 if it´s 1 than I need red background color, if 0 - default This works on "normal" tables <?php if(condition = 1){ <tr class="red"> } else { <tr> } ?> I have tried with template formater but it apply on whole table not on my condition Does anybody know is this possible and how to do this? Thx 回答1: You can use it with 2 methods

Bootgrid select row when checkbox is clicked

冷暖自知 提交于 2019-12-24 00:38:47
问题 I am using Bootgrid to display data in tables: http://www.jquery-bootgrid.com/ When I set the rowSelect to true , I can't select the row when I check the checkbox: I have created a JSFiddle: https://jsfiddle.net/n2jqjtep/1/ <table id="employeeList" class="table table-bordered"> <thead> <tr> <th data-column-id="iEmployeeId" data-type="numeric" data-visible="false" data-identifier="true">Id</th> <th data-column-id="sName">Name</th> <th data-column-id="sAddress">Address</th> </tr> </thead>

Force Bootgrid pagination element to stay in one position relative to it's parent container regardless of the number of table rows?

徘徊边缘 提交于 2019-12-23 17:21:06
问题 I am having trouble getting the pagination element of a JQuery Bootgrid table I am working on to stay in the correct position. It seems to be positioned relative to the last table row no matter what I try. I have tried setting the container div to relative and using top, left, etc. but I couldn't get it to work. Here are some pics to show the current positioning of the pagination: I am trying to get the pagination positioned similarly to the button labeled "Click Me!". This is where I want

Will bootgrid work with non-numeric column-id as data-identifier

北城以北 提交于 2019-12-12 02:27:18
问题 will bootgrid work with non numeric column-id as the identifier, if its a unique value? <th data-column-id="mytextid" data-identifier="true">Unique Text ID</th> Will selection="true" work for instance? Or do I need a numeric value for the identifier column? 回答1: OK tried it in fiddle. You can have a non numeric data-identifier . (IMHO it should be called data-row-identifier ...) In order to access that column you simply use the name you set in the data-column-identifier, so: <!-- works!! even

How to build the CRUD with Ajax json format between jQuery Bootgrid and C# (instead of JqGrid to deal with this issue)

时光怂恿深爱的人放手 提交于 2019-12-11 07:19:58
问题 Hi all I have been looking for a lot of relative resource to deal with my problem, however it isn't useful to me, even if I have checked the "jQuery Bootgrid" and many websites , I still didn't find any great example out, hopefully someone who really know it can help me to give me any slim clues or any good simple. By the way, 1. I wish I can use Ajax to update and see any modifies data between Browser and DB 2. Plesae give me example code Thanks Some problems issue 1.Ajax Connection Front

Jquery-Bootgrid, Row is null on click

帅比萌擦擦* 提交于 2019-12-11 03:44:45
问题 I have created a generic function, so I can use the same code on different pages. I am loading data using Ajax, I refresh my Table when a value of a DropDown changes. When I click on a row the value is null: This is my dataTable function function dataTable() { var self = this; self.url = ""; self.gridObject = null; self.Initilize = function (tableDiv, url) { self.url = url; self.gridObject = $("#" + tableDiv).bootgrid({ formatters: { "commands": function (column, row) { return "<button type=\

Spring MVC: Dynamic Param Name or Param Name using Regex?

家住魔仙堡 提交于 2019-12-10 18:24:47
问题 I'm trying out this grid component called jQuery Bootgrid. In AJAX mode, it POST s parameters to the server and the one related to sorting is sent like this: sort[colname]=desc The colname part changes depending on how you sort the grid. Is there any way in Spring MVC using @RequestParam to capture that sort param? For example, something like: @RequestParam("sort[{\\*}]") Map<String, String> sort That's just a wild guess and I doubt there is any clean way to do it. Any suggestions on how to