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_Related Related Topics sp_TopicIcon
Need dropdownbox to be populated on each row depending on text entered in same row another column.
Tags: help
13/07/2011
09:57
Avatar
connect_fc
New Member
Members
Forum Posts: 1
Member Since:
13/07/2011
sp_UserOfflineSmall Offline

I have a jqgrid which has a structure like below:-


$("#AddCodeGV").jqGrid({
    datatype: 'local',
    colNames: ['From Date', 'To Date', 'ICD-9 Code', 'Description', 'CMS HCC',
               'RX HCC', 'Type', 'PDX'],
    colModel: [
        { name: 'FromDate', index: 'FromDate', formatter: this.formateJSONDateFormatter,
          width: 75, align: 'left' },
        { name: 'ToDate', index: 'ToDate', formatter: this.formateJSONDateFormatter,
          width: 55, align: 'left' },
        { name: 'ICD9CodeValue', index: 'ICD9CodeValue', width: 95, editable: true,
          align: 'left', edittype: "text"},
        { name: 'Description', index: 'Description', width: 100, align: 'left' },
        { name: 'CMSHCC', index: 'CMSHCC', width: 60, align: 'left' },
        { name: 'RXHCC', index: 'RXHCC', width: 55, align: 'left' },
        { name: 'Type', index: 'Type', width: 60, editable: true, edittype: "select",
          editoptions: { value: model.getSubmittableTypes() }, align: 'left' }
    ],
    sortname: 'ToDate',
    sortorder: "desc",
    rownumWidth: 15,
    rowNum: rowCount,
    forceFit: true,
    cellEdit: true,
    viewrecords: true,
    cellsubmit: 'clientArray',
    onSelectRow: function(id) {
        $("#AddCodeGV").resetSelection();
    },
    beforeEditCell: function(rowid, name, val, iRow, iCol) {
        //some code
    },
    beforeSaveCell: function(rowid, name, val, iRow, iCol) {
        //some code
    }
});
//jQuery("#AddCodeGV").setColProp('Type',
//    { editoptions: { value: model.getSubmittableTypes()} });

This code is commented because it is updating all the cols of all rows by the same value which is incorrect in  my case


Here, I have 15 rows in the grid. I want my "type" to be populated depending upon the text in "ICd9CodeValue". The "type" column gets value from "model.getSubmittableTypes()" which is a list returned from server side.

Initially the code below was there which actually populated the column "type" of all 15 rows with the same value (for eg: Type-1 and Type-2) as options in the select box which is not correct.

I want the select box to be populated with respective to the text entered in ICD9Code for that row. For eg: Row1 : ICd9Code = 1234 then "Type" = Type-1 Row2 : ICD9Code = 3232 then "Type" = Type-1 and Type-2 Row3 : ICD9Code = 4444 then "Type" = "Type-2

The submittable types in

model.getsubmittabletypes()

have the right data each time the ICD9Code is entered but I am unable to update its resp. "Type" in that row and save it.

Please advise. Thanks

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
39 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