I have a gridview that displays client data. The first column on each row for the gridview is a checkbox. The second column on the gridview is client name and the third column is account holder. The user can select checkboxes (on multiple rows) to modify data (account holder).
I want to add clientName column value in a comma delimited string to a hiddenfield on my page.
Any help is highly appreciated.
var BaseControl = document.getElementById('<%= this.myGrid.ClientID %>');
var TargetControl = document.getElementById('MyHiddenField');
for (var i = 0; i < BaseControl.rows.count; i++)
var rowElem = BaseControl.rows[i];
for (var x = 0; x < rowElem.cells.count; x++)
var ClientName = rowElem.cells;
if (CheckBox.checked) TargetControl.Text += "," + Case_Id;