Bill Deihl
Top achievements
Rank 2
Bill Deihl
asked on 02 Sep 2008, 02:14 PM
I pulled this below javascript from the sample article. All works well except for the grid.mastertableview. It is always null.
I have tried it with client row select enable and not.
Is there another setting on the grid that I missed to fuly activate the client side api?
Visual studio 2008 with the Telerik 2008 Q2.
Thanks for any help.
Bill
function ShowEditForm(id, rowIndex) {
var grid = window["<%= rgIncoming.ClientID %>"];
var rowControl = grid.MasterTableView.Rows[rowIndex].Control; <--Problem here
grid.MasterTableView.SelectRow(rowControl,
true);
window.radopen(
"wfProcessIncomingItemV1.aspx?AttachmentID=" + id, "wndProcessAttachment");
return false;
}
5 Answers, 1 is accepted
0
Hello Bill,
Please test the following code:
You can also review the help article link below:
Getting RadGrid client object
Regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Please test the following code:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
<script type="text/javascript" language="javascript"> |
function GetMasterTableView() { |
var radGrid = $find('<%= RadGrid1.ClientID %>'); |
alert(radGrid.MasterTableView); |
} |
</script> |
</telerik:RadCodeBlock> |
You can also review the help article link below:
Getting RadGrid client object
Regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bill Deihl
Top achievements
Rank 2
answered on 02 Sep 2008, 06:07 PM
The alert reports [object Object]
0
Accepted
Hello Bill,
This message means that you properly get MasterTableView object.
You can use the following code to select a given row:
Regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
This message means that you properly get MasterTableView object.
You can use the following code to select a given row:
var radGrid = $find('<%= RadGrid1.ClientID %>'); |
var masterTableView = radGrid.MasterTableView; |
var row = masterTableView.get_dataItems()[selectRow]; |
row.set_selected(); |
Regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bill Deihl
Top achievements
Rank 2
answered on 03 Sep 2008, 01:22 PM
That did it.
Thanks.
Bill
Thanks.
Bill
0
Prajakta
Top achievements
Rank 1
answered on 08 Oct 2014, 05:20 AM
Hi Bill,
try this
var radGrid = $find('<%= RadGrid1.ClientID %>').get_masterTableView();
instead of
var radGrid = $find('<%= RadGrid1.ClientID %>')
Regards,
Prajakta Suryawanshi.
try this
var radGrid = $find('<%= RadGrid1.ClientID %>').get_masterTableView();
instead of
var radGrid = $find('<%= RadGrid1.ClientID %>')
Regards,
Prajakta Suryawanshi.