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

Issues with client side binding on adding a new row

2 Answers 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bindu
Top achievements
Rank 1
Bindu asked on 28 Jan 2013, 05:56 AM
Hi Team,

Thank you for the amazing code snippets on client side binding, was able to implement it quickly. But I'm facing an issue on adding a new row to the grid. On creating a new row, client binding code is called to fetch all the rows and bind it again to the
grid.

ServiceNamespace.Service1.GetData(param1, param2, updateGrid);

//callback

 function updateGrid(result) {

  var tableView = $find("<%= Grid1.ClientID %>").get_masterTableView();    

  tableView.set_dataSource(result);

  tableView.dataBind();  




 

 


2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 28 Jan 2013, 08:47 AM
Hello,

Why you are not able to see third row. (Please check below link)
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/nested-template-view-is-not-working-with-more-that-10-records.aspx#2291336

To solve this issue you have to create html tag and add this tag to particular column using Rowdatabound client side events.
For Ex:
function RowDataBound(sender, args) {
              var GetCell = args.get_item().get_cell("ColumnUniqueName"); // Column unique name
              if (GetCell) {
                  var MSign = document.createElement('span');
                  MSign.innerHTML = args.get_dataItem().YourFieldName; // Filed name
                  MSign.onclick = "javascript:void(0);";
                  MSign.title = args.get_dataItem().YourFieldName; // Filed name
                  GetCell.appendChild(MSign);
              }
          }

Thanks,
Jayesh Goyani
0
Bindu
Top achievements
Rank 1
answered on 28 Jan 2013, 10:52 AM
Thank you for a quick response. I do have a radtooltip inside the row. How can I add this on the client side. The rest of the html pieces I was able to add in RowDataBound.

Regards,
Bindu
Tags
Grid
Asked by
Bindu
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Bindu
Top achievements
Rank 1
Share this question
or