Get original cell data in jqgrid - jqgrid

In my asp.net application, I'm using jqGrid and I am trying to trim the display text of a cell by terminating it with ...
Now, onSelectRow or by click on the message column cell, I want the original long message.
I tried duplicating the same column by giving different index name and kept it hidden. But here I am unable to retrieve cell data by index name.
Any idea here?

Resolved by duplicating message column with different headertext in DataGrid so that name in colModel can be different. Kept this column hidden and retrieving full message from this hidden column.
Any other better solution will be appreciated.

Related

Show hidden data with mouseover in a particular colum of Jqgrid

how can display items of a hidden colmodel when mouse over another column which shows only some part of the data. in user column i have many names, i only display first user name and rest the count. so i passed the full names as hidden. I want to display that names according to the mouseover
If I correctly understand the problem you can solve it by usage cellattr callback which defines title attribute based on the value of another (hidden) column. See the answer for the corresponding code example.

BIRT Reports column not spanding the whole row as desired

I am fairly new to BIRT reports.
In the BIRT reports designer I have added a 2nd row to my table which is binded to a data set. In this 2nd row I want 1 column from my data set to take up the whole row.
So what I did was to add the second row and merge all the columns in that row to form one column. I then added a text field with Dynamic HTML Text.
<VALUE-OF>row["ITEMDESCRIPTION"]</VALUE-OF>
The problem I have is that the data is not taking the whole row. It is being wrapped into only a small section of the row. I must be missing something. Can someone help me with this pls.
I'm attaching both the way the end report looks like and also the screenshot of the set up in the designer.
End Result
Designer (you can see all the rows merged in the second row of the table and in the properties i can see a colspan of 10 for that single column)
thanks
I've found out that the asnwer to this question is to make the field element inline style rather than block and also to check the No Wrapping check box for this field int he designer.

SlickGrid deleting a column does not delete its data

I am adding a new column to SlickGrid using of course grid.setColumns(newColumnDef);
I allow the user to then enter values into this new column
If they so choose they can remove this column and add another column which they can select from a dropdown list.
This all works fine, the column gets removed and the grid appears without the removed column. However when I call dataView.getItems() to grab the data from the grid the columns I'vd previously removed are still there. Looks like setColumns with a new column definition and dataView.refresh does not delete the columns data, just the column is removed. I need to remove the columns data when the column is removed... Any suggestions would be most helpful.
Changing the presentation of the data does not change the data itself.
Use deleteItem method of dataview as follows,
dataView.deleteItem(id);\\where id is your unique id
dataView.refresh();`

jquery ui binding to sortable recieve event when dealing with nested sortables

I have a need to sort columns and separately I need to be able to sort fields accross columns and would like to hook into the col sort finished so that I can save the new column position and then also hook into the field sort finished event so that I can save the new field position
There is a jsFiddle showing an example here (doesn't seem to work in IE, but thats a different story!). What this shows is that when a column is dragged no alert is shown and when a field is dragged between columns the field AND column alerts are shown.
I'm using 'receive' to avoid multiple calls, one for the source and one for the target.
Any help would be really appreciated. Thanks
You should use different events to hook into, sortupdate does what you want. Because you are nesting sortables it is also important to prevent event bubbling, this is what causes your double alert. Here's an updated fiddle
By the way, when dragging a field to another column the sortupdate handler is called twice because two columns changed.

jqgrid save xml string inside hidden cell problem

I have 2 grids. in both of them i use loadonce:true .
In the first grid i have a cell with an onblur event which
opens a dialog with the second grid.
after i edit the second grid i want to save as xml it's content and
ascribe it to the row of the first grid (the row witch opened the dialog).
In the end i want to generate an xml from the first grid that will
include the xml I generated before in the second grid.
so what is the best way to implement this?
Thank's In Advance.
Depend on how exactly you implement the scenario which you describe you could has any data in the internal data parameter of jqGrid existing always if one use local datatype or loadonce:true in your case.
Direct accessing to the data parameter per jQuery("#grid_id").getGridParam('data') get your reference to the data array. The data array contain all data of the grid (not only the current displayed page) and the data are not yet placed in the <td> element. So the data are unmodified and could contain for example any XML fragments.
UPDATED: To make you easier to understand what I mean I made the small demo. If you double-click on a row you will see the XML data associated with the row.
The "note" column can be hidden. Because all hidden columns exist in grid as HTML markup I made it visible. You can see the difference what can be saved as grid internal data and what can be displayed (also as hidden data).
UPDATED 2: You can consider to use autoencode:true option in your grids.

Resources