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 Subfunction UpdateGrid(rows) { clearError(); var grid = $find("<%=gridTickets.ClientID %>"); var mtv = grid.get_masterTableView(); alert(rows[0].Status.Shortcut); // <--WORKS GREAT!!!! mtv.set_dataSource(rows); mtv.dataBind(); return; }<telerik:RadGrid ID="gridTickets" runat="server" > <MasterTableView DataKeyNames="Id"> <Columns> <telerik:GridBoundColumn DataField="Id" HeaderText="Id" Display="false" /> <telerik:GridBoundColumn DataField="Status.Shortcut" HeaderText="Status" /> <telerik:GridBoundColumn DataField="Subject" HeaderText="Betreff" /> </Columns> </MasterTableView> </telerik:RadGrid> { "d": [ { "__type": "Ticket:#TicketWeb.Entities", "Area": { "__type": "TicketArea:#TicketWeb.Entities", "Id": 0, "Name": "test", "Shortcut": "test" }, "AreaId": 0, "Comments": null, "CostCenter": null, "CostCenterId": 0, "Created": "\/Date(1287085525987+0200)\/", "DontSendMailsAtInsert": false, "DueDate": null, "Duration": 0, "FinishDate": null, "From": null, "FromId": 0, "Guid": "6d9ac3f8-2bd4-4338-83cc-e85375e90039", "Id": 0, "InCharge": null, "InChargeId": 0, "LegacyId": null, "LegacyUid": null, "Logs": null, "ParentTicket": null, "ParentTicketId": 0, "PercentFinished": 0, "PhoneNumber": null, "Priorities": [ { "__type": "Priority:#TicketWeb.Entities", "Value": 0 }, { "__type": "Priority:#TicketWeb.Entities", "Value": 1 }, { "__type": "Priority:#TicketWeb.Entities", "Value": 2 }, { "__type": "Priority:#TicketWeb.Entities", "Value": 3 } ], "Priority": 0, "Reason": null, "ReceivedDate": null, "Responsible": null, "ResponsibleId": 0, "Revision": 0, "SortIndex": 0, "Specification": null, "StartDate": null, "Status": { "__type": "Status:#TicketWeb.Entities", "Id": 0, "MarksFinish": false, "MarksStart": false, "MarksStatusForNewSubProjects": false, "Name": "testkaka", "SetForNewTickets": false, "Shortcut": "kakakka", "SortIndex": 0 }, "StatusId": 0, "SubProjects": null, "Subject": "HI", "TicketReasonId": 0, "TicketType": null, "TicketTypeId": null, "TypeOfCosts": null, "TypeOfCostsId": 0 } ] }<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="sds_Credentials" GridLines="None" Skin="WebBlue" AllowSorting="True" Width="800px"> <MasterTableView AutoGenerateColumns="False" DataKeyNames="IDCredentials" DataSourceID="sds_Credentials"> <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="CredentialName" HeaderText="Credential" SortExpression="CredentialName" UniqueName="CredentialName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UserLogin" HeaderText="Login" SortExpression="UserLogin" UniqueName="UserLogin"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UserPassword" HeaderText="Password" SortExpression="UserPassword" UniqueName="UserPassword"> </telerik:GridBoundColumn> <telerik:GridHyperLinkColumn DataNavigateUrlFields="Website" HeaderText=" " DataNavigateUrlFormatString="{0}" UniqueName="Website" AllowFiltering="False" ItemStyle-HorizontalAlign="Center"> <ItemStyle Width="50px" CssClass="radgrid" /> </telerik:GridHyperLinkColumn> <telerik:GridHyperLinkColumn DataNavigateUrlFields="IDCredentials" HeaderText=" " DataNavigateUrlFormatString="credentials_details.aspx?IDCredentials={0}" Text="Details" UniqueName="IDRolodex" AllowFiltering="False" ItemStyle-HorizontalAlign="Center"> <ItemStyle Width="75px" CssClass="tbltdbutton" /> </telerik:GridHyperLinkColumn> </Columns> </MasterTableView> </telerik:RadGrid>Protected Sub RadGrid1_ItemDataBound1(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound If TypeOf e.Item Is GridDataItem Then Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) Dim hyplnk As HyperLink = DirectCast(item("Website").Controls(0), HyperLink) hyplnk.ImageUrl = "../../../images/iconIE.gif" hyplnk.Target = "_blank" End IfEnd SubProtected Sub RadGrid1_ItemDataBound1(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound If TypeOf e.Item Is GridDataItem Then Dim item As GridDataItem = TryCast(e.Item, GridDataItem) Dim value As String = item("Website").Text If value < "1" Then Dim hLink As HyperLink = DirectCast(item("Website").Controls(0), HyperLink) hLink.ImageUrl = "../../../images/iconIE.gif" hLink.Target = "_blank" hLink.Visible = False End If End If End Sub