Author Topic: on editing some fields editable/enable and non editable/disabled  (Read 2952 times)

ruchabhutada

  • Newbie
  • *
  • Posts: 10
    • View Profile

Hello sir,

I m facing an issue of editable and non-editable on particular column while editing that row.
I have two consecutive drop downs
my case is:-
if i am selecting one particular value from first dropdown, so on selecting one specific value/keyword(special word in my functionality) then second dropdown should be disabled while editing only . And if i am selecting normal value from first dropdown then second dropdown should be enable.
For example:-
First dropdown values - a, xy ,c
second dropdown values- 1,100,3

Here in above example, xy is my special word.
If i select 'xy' from first dropdown then my second dropdwon should be runtime disable. And
if i select 'a' or 'c' then my second dropdown should be enable.

i have tried this following code: -
if(rowData[colm_number] == 'xy'){
colM.editable[colm_number+1] = false;
}

This code i have tried in function editing() and update(),
but above code is not working in both functions.

Please give me way to solve the problem.
i am in a need of solution.

Most awaiting for your kind words of reply.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: on editing some fields editable/enable and non editable/disabled
« Reply #1 on: July 19, 2016, 03:30:23 pm »
Quote
if(rowData[colm_number] == 'xy'){
  colM.editable[colm_number+1] = false;
}

It should be
if(rowData[ 'dataIndx of first column' ] == 'xy'){
  $grid.pqGrid( 'getColumn', { dataIndx: 'dataIndx of 2nd column'}).editable = false;
}

ruchabhutada

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: on editing some fields editable/enable and non editable/disabled
« Reply #2 on: July 20, 2016, 02:58:41 pm »
Hello sir ,
Thank you for kind reply..
but i have one question, what if i dont have dataIndex?
What should  have take instead of dataIndex..?
awaiting of your reply..