View Full Version : Form element values from a grid

15 Feb 2007, 3:24 AM
Hi ,
I have created a grid which has form elements like textbox , button etc.
how can i get the values of these elements .

i have created form elements inside grid using this code

colModel = new YAHOO.ext.grid.DefaultColumnModel([
{header: "Product", sortable: true,dataIndex:0},
{header: "Unit Price", sortable: true,dataIndex:1},
{header: "Weight", sortable: true,dataIndex:2},
{header: "Stock", sortable: true,dataIndex:3},
{header: "Order Qty", sortable: true,dataIndex:4,renderer: function(value, row, column, node) {return '<input type="text" size="3" value="3" id="'+"text"+row+'" value="3" name="qty" style="width:100%; height:15px; font-size:9;"/>';}},
{header: "Action", sortable: true,dataIndex:5,renderer: function(value, row, column, node) { return '<input type="button" onClick="var textid = '+"text"+row+'; if(!flag) {CartInit();} Example.addCartRow('+row+'); " value="Add" id='+"button"+row+'style="width:70%; height:15px; font-size:8; font-weight:300; color:#000000;" />';}},
{header: "Category", sortable: true,dataIndex:6},
{header: "Group", sortable: true,dataIndex:7},
{header: "Comments", sortable: true,dataIndex:8}