Sys$WebForms$PageRequestManager$_matchesParentIDInList.
function
Sys$WebForms$PageRequestManager$_matchesParentIDInList(clientID, parentIDList) {
for (var i = 0, l = parentIDList.length; i < l; i++) {
if (clientID.startsWith(parentIDList[i] + "_")) {
return true;
}
}
return false;
}
On this page I have 3 RadGrids and if I remove the one with the following code evrything works fine.
<
telerik:RadGrid ID="gvExpenseAssignments" runat="server" AutoGenerateColumns="false" Height="570">
<ClientSettings EnableRowHoverStyle="true">
<Scrolling AllowScroll="true" ScrollHeight="550" UseStaticHeaders="true" />
</ClientSettings>
<MasterTableView DataKeyNames="GL_Account_Template_Id" EditMode="InPlace" AllowMultiColumnSorting="false"
TableLayout="Fixed" AllowNaturalSort="false" Width="99%">
<Columns>
<telerik:GridBoundColumn DataField="ItemsString" Visible="false" UniqueName="strHintItems"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="GL_Account_Name" HeaderText="Account Name" ReadOnly="true" AllowSorting="true" HeaderStyle-Width="260"></telerik:GridBoundColumn>
<telerik:GridButtonColumn Text="Hint" runat="server" CommandName="cmdHint" HeaderText="Account Items" ShowInEditForm="true" HeaderStyle-Width="65px" ItemStyle-Width="65px"></telerik:GridButtonColumn>
<telerik:GridButtonColumn Text="Suggest" runat="server" CommandName="cmdSuggest" HeaderText="Mapping Assistant" ShowInEditForm="true" HeaderStyle-Width="65px" ItemStyle-Width="65px"></telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="GL_Account_No" HeaderText="Linked Account No" UniqueName="lblAcctNo" ReadOnly="true" AllowSorting="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Cust_GL_Account_Name" HeaderText="Linked Account Name" UniqueName="lblAcctName" ReadOnly="true" AllowSorting="true"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
The whole aspx file is attached as an image file. I get the same behavior wether I data bind the grid or not. The issue that I have found is that clientID in the javascript function is a function and not a string so it contains no method startsWith. I have found a workaround that creates an anonomous function for startsWith -
Function.prototype.startsWith = function(){return false;};
but I would like to be able to find a mor permanent fix or what I am doing that is causing the error to begin with.
Thank you.
<script type="text/javascript"> function FillAmount(sender, args) { var grid = $find("<%=RadGrid1.ClientID %>"); var MasterTable = grid.get_MasterTableView(); var txtQuantityE = $find('<%= txtQuantityE.ClientID %>') var lblRate = $find('<%= lblRate.ClientID %>'); var lblAmount = $find('<%= lblAmount.ClientID %>'); var Amount = $find(Number(txtQuantityE.value)*Number(lblRate.Text)).get_value(); $find(lblAmount).set_value(Amount); } </script>
aspx has this under RadNumericTextBox <ClientEvents OnBlur="FillAmount" /> Private Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound If e.Item.IsInEditMode Then For Each Column As GridColumn In e.Item.OwnerTableView.Columns If Column.UniqueName = "ProductForReseller" Then ' Code goes here End If Next End IfEnd Sub<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="LinqDataSource1" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" GridLines="None" Skin="Outlook" ShowGroupPanel="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AutoGenerateColumns="False" Width="62em" Height="37em"> <ClientSettings AllowDragToGroup="True"> <Scrolling AllowScroll="True" /> </ClientSettings> <MasterTableView DataKeyNames="reseller, product" EditMode="InPlace" CommandItemDisplay="Bottom" DataSourceID="LinqDataSource1"> <SortExpressions> <telerik:GridSortExpression FieldName="product" SortOrder="Ascending" /> </SortExpressions> <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldName="reseller" HeaderText="Reseller" /> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="reseller" HeaderText="Reseller" /> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <Columns> <telerik:GridEditCommandColumn EditText="edit" HeaderStyle-Width="7em"> </telerik:GridEditCommandColumn> <telerik:GridDropDownColumn UniqueName="Reseller" ListTextField="name" ListValueField="id" DataSourceID="LinqDataSourceReseller" HeaderText="Reseller" DataField="reseller" DropDownControlType="RadComboBox" AllowSorting="true" HeaderStyle-Width="7em" AllowFiltering="false"> </telerik:GridDropDownColumn> <telerik:GridDropDownColumn UniqueName="ProductForReseller" ListTextField="name" ListValueField="id" DataSourceID="LinqDataSourceProduct" HeaderText="Product" DataField="product" DropDownControlType="RadComboBox" AllowSorting="true" HeaderStyle-Width="7em" AllowFiltering="false"> </telerik:GridDropDownColumn> <telerik:GridDropDownColumn UniqueName="ProductActivationType" ListTextField="name" ListValueField="id" DataSourceID="LinqDataSource2" HeaderText="Activation type" DataField="product_activation_type" DropDownControlType="RadComboBox" AllowSorting="true" HeaderStyle-Width="7em" AllowFiltering="false"> </telerik:GridDropDownColumn> <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete" HeaderStyle-Width="7em"> </telerik:GridButtonColumn> </Columns> </MasterTableView> </telerik:RadGrid>I'm displaying a context menu when right-clicking a radgrid. How do I access radgrids columns?
Thanks for the help!
Protected Sub RadContextMenu1_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) Handles RadContextMenu1.ItemClick Dim radGridClickedRowIndex As Integer = Convert.ToInt32(Request.Form("radGridClickedRowIndex")) Dim radGridClickedRow As GridDataItem = CType(RadGrid1.Items(radGridClickedRowIndex), GridDataItem) 'How do I access radGridClickedRow column here? mpuDuplicateTrip.Show() ' show ModalPopup End Sub