how to get rearranged columns from the database - jqgrid

I am working on columns drag nad drop its working fine and the new order is also saved in the database but when i again opens the page it shows the pervious order so, how cani achive this.
Thanks in advance

You can save remapColumns parameter of jqGrid and use the remapColumns method to restore the order of the columns. I recommend you to read the ansewer with the demo which show how to do this by saving the information in the localStorage. You can do the same, but save the information in the database.

Related

PL/SQL INSERT DATA TO TABLE IN ORACLE APEX

I created a blank page and inserted textfields and button which will serve as a form. I want to display the inserted data from user once the button save is clicked, and the data will also show on the interactive grid below the page. Please help me on this.
I'd suggest another approach: use the Wizard to create Report with a Form on a table. It will create an Interactive Report (and you'll use it to review data stored into a table) and a Form (you'll use to insert new records and to update/delete existing ones).
Apex does everything for you; you'll only have to make it pretty because it'll work "as is". With your approach, you'll have to program everything yourself.

Hide/Show a Columns in Crosstable by using Ironpython

i new to spotfire,i never worked on iron-python script.i want hide the columns those are don't have values.
columns have to hide automatically based on value.
Sample Image
could you please help on this issue.
thanks for your help.
Thanks,
Basha
It is possible to trigger the IronPython script on the dashboard being opened action. You need JavaScript for that. Such script can contain the current date and you can use the current date to hide the columns showing data for the months after current date.

Data table distorts after refreshing data

I have a data table that represents data like this:
after clicking the edit marker (pencil icon) i can edit some fields. The fields need to be validated and if it fails the fields have to reset. I do this in the managed bean of the view using p:ajax event="rowEditInit" to save the attributes before saving and ajax event="rowEdit"to do the actual validation. if validation fails i return the previously saved values. if validation is correct i save the data to the database and load the collection again. Then i
RequestContext.getCurrentInstance().update("vesselBalticSegmentCreateForm")
to reload the view.
Doesnt matter if the validation fails and i set the values back or it succeeds and i save/reload data the table breaks becoming like this:
seems to load only the edited row. and loads both edit/list modes.
any ideas what i'm doing wrong?
The primeFaces RowEdit functionality already updates the row, also updating the table does by design not work (not sure if it is intentional, but that is just how it is). I know there is a duplicate of this Q/A on stackoverflow, I just do not seem to be able to find it. Someone might be able to create a patch/workaround, e.g. try on the prerenderview event to remove the id's of id's in the individual row that was edited. I don't have the time to try to create one.

CakePHP display updated table of data using ajax

I'm having real trouble finding any documentation on this.
I have a page that displays a list of users, above this i can edit the users successfuly with ajax. After the update, i want the table below to be updated with the new information.
How do i go about doing this? I'm thinking i need some sort of view that displays the data in a table, and i want to get that view's contents and inject it into my page, but i can't seem to find out how?
Can anyone point me in the right direction please
Put users table in div id like "Users" and do something like following in edit ajax success function call
$("#users").load("same_page_url #users");

jqGrid issue - getRowData

I seem to be havign yet another problem with jqGrid :-( I am trying to get the current row data using getRowData, but all I get back is an array [object, Object]. What am I doing wrong?
This is what I'm using
var rowdata = $("#list").jqGrid('getRowData');
Can somebody help?
thanks
After reading in the comments additional information about your problem I would recommend you following.
If you need to print the page which contains jqGrid you could need to prepare additional CSS for media="print". See here for additional information.
The method getRowData called without parameters give back the array of rows which are array of visible cells. For every cell will be called unformatter, so the data could be not identical to to data which you posted to jqGrid. Moreover if you use data paging or filtering you can have another problem: only visible cells from the current page will be returned back.
I personally prefer to use export to Excel instead of printing the pages. In the case I add an custom button in the navigator bar. If the button will be clicked by the user the request to the corresponding MVC controller action will be sent. The server get all data for the corresponding grid from the database and generate XLSX Excel data as stream with respect of Open XML SDK. The corresponding code is not very small, but in the way one can generate perfect Excel file formatted like it is required. In the case you don't need install Microsoft Office on the server side. The user just opens Excel with all data if he/she clicks the "Export to Excel" button in the jqGrid. In Excel there are very good printing possibility. The most users knows Excel very good and can customize the data (hide some columns for example) before printing.
So my suggestion to you to spend some time in implementing export to Excel instead of implementing printing of jqGrid directly.

Resources