Hi,
One of our page uses Radgrid and in client-side wanted to add one more column to the grid. Have been searching the whole site for any ideas or answers but no luck.
Below is the code
<script type="text/javascript">
Sys.Application.add_load(function () {
$("#master_DefaultContent_rts_ts1891_s4143_f3987srvgrid_ctl00 thead tr").append("<th>Primary Selection</th>");
$("#master_DefaultContent_rts_ts1891_s4143_f3987srvgrid_ctl00 tr:gt(0)").append("<td><input id='PrimarySelection' type='checkbox' onclick='handleClick(this);' /></td>");
var tableView = $find("<%= master_DefaultContent_rts_ts1891_s4143_f3987srvgrid %>").get_masterTableView();
tableView.rebind();
});
function handleClick(cb) {
var user = $(this).closest("tr").find("td:eq(1)").text();
alert(user);
userIds.splice($.inArray(user, userIds), 1);
if (cb.checked) {
userIds.push(user);
}
}
</script>
Thanks,
Prem
One of our page uses Radgrid and in client-side wanted to add one more column to the grid. Have been searching the whole site for any ideas or answers but no luck.
Below is the code
<script type="text/javascript">
Sys.Application.add_load(function () {
$("#master_DefaultContent_rts_ts1891_s4143_f3987srvgrid_ctl00 thead tr").append("<th>Primary Selection</th>");
$("#master_DefaultContent_rts_ts1891_s4143_f3987srvgrid_ctl00 tr:gt(0)").append("<td><input id='PrimarySelection' type='checkbox' onclick='handleClick(this);' /></td>");
var tableView = $find("<%= master_DefaultContent_rts_ts1891_s4143_f3987srvgrid %>").get_masterTableView();
tableView.rebind();
});
function handleClick(cb) {
var user = $(this).closest("tr").find("td:eq(1)").text();
alert(user);
userIds.splice($.inArray(user, userIds), 1);
if (cb.checked) {
userIds.push(user);
}
}
</script>
Thanks,
Prem