Jqgrid rowid issue - jqgrid

While updating data from form to grid, same time two rowid get updated with the same id.
avoided refreshing the grid
when I filter the record adding duplicated records in the grid.

The rowis's in jqGrid should be unique and there should be no duplicated ids. Any duplication of row id's will cause unexpected results like described from you.

Related

Getting duplicate rows from Spring Data REST

I'm using spring data REST with PagingAndSortingRepository to serve a table, when i download it using pagination, i find the same row present in two different pages, the problem occurs for several rows.
Downloaded data should be inserted in a database with unique constraint, so rows must be unique.
i've added the sort parameter for id column then the duplicates disappears.

Readeonly property in kendo mvc project, and not work when sorting or filtering this column

I have two table in my database.
first has a id and description and second table has a id, description and first table key, i create a relation between this. after that i create a readonly property in models of second table and get the description of first table by query. i save 100 row of data in second table and 10000 in first table, and each 100 row of first table for one of the row of second table. now when i sort or filter my kendo grid on this column , this take a long time to load! i test this by a more data and see this is not work! i know this in controller whit out read only property but i want to say me a way to use readonly property!! please guide me.
Your question is a little vague but if I understand correctly, it seems you are having problems dealing with large datasets, you may want to look into using serverFiltering and serverSorting.
Not sure if you have implemented your grid through Razor (.cshtml) or client (.js) however these links should get you on the right track.
A few more tutorial links:
Razor
Javascript

Oracle forms hybrid validation

This is my first post ever and haven't come across any other questions related to this. I am attempting to try and create a hybrid validation type and add it to an existing oracle form. We have a super/subset type of thing going on. When one chooses something from a dropdown, there are 5 options. If 4 of those options are chosen, the data is pulled from one validation table dataset, table A. If the other option is chosen, it comes from a different table's dataset, table B. These (along with others items) are saved in Table C. Table C has a FK constraint regarding these validations. I have added another column to table C to attempt to bypass the FK constraint, but the field still tries to save in the FK column. I can't seem to figure out if I need to add a database trigger, an item level trigger, or a form level trigger to reroute the data to correct columns in the database. Thanks in advance for any help!
If your items are select lists, you would use an item level trigger (when-validate-item) on the superset list item to populate/repopulate the list for the subset item.
Alternatively, you could use a popup LOV on the subset item which has a query which is filtered by the value of the superset item.

problem with 'datatable' jquery plugin and two table (ajax related)

i have two tabs that their content loads by ajax. both have a table in their content. i want to apply 'datatable' jquery plugin to both table. tables have the same id because they are create by a function.but their rows are different.
datatable plugin is applied to first tab table well but on the second one give this error:
"DataTables warning (table id = 'dttable'): Cannot reinitialise DataTable.
To retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster)."
i use "bDestroy":true in datatable plugin define.but in this way the plugin doesn't show in second table.
would you help me?
Your problem is that both tables have the same ID, which is invalid HTML. When you try to initialize the second Databable, your selector only finds the first table and tries to initialize Datatables on the first table again, which results in the error that you are getting.
You need to change your function to create each table with a unique ID and initialize each table by its respective ID.
Why not set the Datatables by a className rather than ID then it can apply to both of them?
When retrieving the data you can use something like $('.dataTableStyle').eq(1) to get information from the relevant one.
I'm using mvc3 and my problem was with initializing a dataTable in a view, then rendering a partial view with another dataTable. The issue was not in the id's of the 2 tables, but in the way the partial views get rendered in the framework. In my case, I had to move the script, or reference to the script, into the view that hosts the partial view. I had an issue similar to this using the Google Maps api.
try this code
$(document).ready(function() {
oTable = $('#DataTables_Table_0').dataTable({ //DataTables_Table_0 <-------table id
iVote: -1, //your field name
"bRetrieve":true
});
oTable.fnSort( [ [1,'desc'] ] );
});
use this in function event when you would change your table data
$('#tbl_resultates').dataTable().fnDestroy();
and add
"bRetrieve": true,
in
$('#tbl_resultates').dataTable({

jqGrid rowid naming conflict during save

I need some help with jqGrid. I have a table with the primary key column named 'id'. It seems that there is naming conflict with jqGrid when the inline edit does ajax post back to save data. The rowid used as the unique identifier is also named 'id' in jqGrid.
Is it possible to change the default rowid variable name to something else, such as '_id' to avoid naming conflict? Did I miss something?
There are different ways to solve your problem.
You can not change the id name used in jqGrid, but you can rename any parameters of ajax requests. For example you can use prmNames: {id:"_id"} option of jqGrid.
If you have a column in the table which has primary key and which can be used to identify a grid row, you can set key: true in the column definition. As a result the column with key: true will be used by jqGrid instead of additional id. Moreover this option can be used also to reduce the size of data (see Jqgrid 3.7 does not show rows in internet explorer as an example).

Resources