This is a migrated thread and some comments may be shown as answers.

Get cell value from gridboundcolumn on button click?

1 Answer 347 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cristian
Top achievements
Rank 1
Cristian asked on 14 Jun 2012, 12:42 AM
Hi I'm working with a radgrid populated with a few gridboundcolumns and one gridtemplatecolum with a radtextbox.
I have a save button on the bottom of the page wich will update to database the items wich has changes on the template column.
My question is how can I get the value of the cells tha dot not correspond to the templatecolumn.

For the template column I do the next
 
var rdtxtCant = (RadTextBox)rgAct_Indicador.Items[i].Cells[0].FindControl("rdtxt");

And it's working fine, but I don't know how to manage this when it is a gridboundcolumn.
Can you help me please?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Jun 2012, 04:18 AM
Hello Cristian,

Try the following javascript to achieve your scenario.
JS:
function OnClientClick()
{
  var master = $find('<%= RadGrid1.ClientID %>').get_masterTableView();
  var row = master.get_dataItems()[0];
  var cell = master.getCellByColumnUniqueName(row, "UniqueName");
  alert(cell.innerHTML);
}

Thanks,
Shinu.
Tags
Grid
Asked by
Cristian
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or