I am trying to set some data elements on the screen based on what row was selected in a grid. So basically I want to get the grid column values for the selected row when onrowclick event is triggered. I then want to place these into some other fields to do updating. This is more of a test process just to know I am able to move or condition data from what has been selected in the grid and put it somewhere else.
Anyway, I have the following in the onrowclick event and it fails when I select the row with error "Cannot read property 'grid' of null".
var value = getObj("gridParts").grid.getCellValue(row, 0);
changeElementValue("getpart", value);
My grid is labeled gridParts and the output field on the screen is getpart.
Client side javascript - get grid selected row values
-
- New User
- Posts: 10
- Joined: Mon Nov 04, 2019 11:01 am
- First Name: Bernard
- Last Name: Harris
- Company Name: Weather Shield Mfg., Inc.
- Phone: 7157482100
- Address 1: One Weather Shield Plaza
- City: MEDFORD
- State / Province: Wisconsin
- Zip / Postal Code: 54451
- Country: United States
- Contact:
-
- New User
- Posts: 10
- Joined: Mon Nov 04, 2019 11:01 am
- First Name: Bernard
- Last Name: Harris
- Company Name: Weather Shield Mfg., Inc.
- Phone: 7157482100
- Address 1: One Weather Shield Plaza
- City: MEDFORD
- State / Province: Wisconsin
- Zip / Postal Code: 54451
- Country: United States
- Contact:
Re: Client side javascript - get grid selected row values
Just a quick follow up on this so far. I was able to get it to work. I changed it to the following:
var value = getObj("Grid1").grid.getCellValue(rowNumber, 1);
changeElementValue("TextBox1", value);
I had to set it to the actual id of the element instead of the named value.
var value = getObj("Grid1").grid.getCellValue(rowNumber, 1);
changeElementValue("TextBox1", value);
I had to set it to the actual id of the element instead of the named value.
-
- New User
- Posts: 14
- Joined: Wed Feb 26, 2020 4:24 pm
- First Name: Srinivas
- Last Name: Siripuram
- Company Name: UPMC
- Phone: 2015655901
- Address 1: 532 Chatham Park Dr, APT 2A
- Address 2: Pittsburgh
- City: Pittsburgh
- State / Province: Pennsylvania
- Zip / Postal Code: 15220
- Country: United States
- Contact:
Re: Client side javascript - get grid selected row values
Hi,
I am trying to get the grid selected row number, on grid row double click event in javascript,
can you please some one help me how to get the clicked row number
on grid row double click.
I am trying to get the grid selected row number, on grid row double click event in javascript,
can you please some one help me how to get the clicked row number
on grid row double click.
Who is online
Users browsing this forum: No registered users and 2 guests