Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
jqGrid not removing combo box with custom formatter after saverow
11/03/2014
14:46
Avatar
julianonunes
Member
Members
Forum Posts: 9
Member Since:
15/06/2012
sp_UserOfflineSmall Offline

I have a grid using inline edit that allows adding multiple blank rows, but this is causing some problems.

If I add two or more rows and leave some of them with errors, the other rows (saverow succeeded) turn all columns to read-only, with the exception of a select column (edittype: select) with custom formatter to return the combo box text instead of value.

Here is a sample of my code:

<script type="text/javascript"> jQuery(document).ready(function () { jQuery('#grid').jqGrid({ autowidth:true, datatype:'local', height:'100%', pager:'#pager', rowNum:10, sortname:'User', viewrecords:true, gridComplete: function() {OnGridComplete()}, onSelectRow: function(rowid, status) {OnSelectRow(rowid, status)}, colModel: [ { name:'AlternativeIndex', hidden:true, key:true, index:'AlternativeIndex' },{ name:'UserId', formatter: formatUserAsDropDown, label:'User', sortable:true, width:300, editable:true, edittype:'select', editoptions:{"value":""}, index:'UserId' },{ name:'Permission', formatter:'select', hidden:false, label:'Permission', sortable:true, width:170, editable:true, edittype:'select', editoptions:{"value":"R:Read;W:Write"}, index:'Permission' } ] }); }); </script>

And here is the code for the custom formatter:

function formatUserAsDropDown(cellvalue, options, rowObject) { return rowObject.Username; }

This problem does not occur with Permission column.

PS: I cannot reload the grid after saverow as there maybe have some rows with errors and I have to keep them editable until the user fix these errors and click on Save button again.

01/04/2014
15:50
Avatar
julianonunes
Member
Members
Forum Posts: 9
Member Since:
15/06/2012
sp_UserOfflineSmall Offline

Any help on that please?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
41 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information