iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello,
I get a JavaScript Error "Unknown Runtime Error" at the end of my OnRowContectMenu function.
Here is the ascx code I'm using :
<ISWebGrid:WebGrid ID="wgPostItList" runat="server" DataSourceID="idsPostItList" UseDefaultStyle="True" DefaultStyleMode="Elegant" Width="100%"> <RootTable DataKeyField="PostItId" > <SortedColumns> <ISWebGrid:WebGridGroup ColumnMember="RecordDate" SortOrder="Ascending" /> </SortedColumns> <Columns> <ISWebGrid:WebGridColumn Caption="<%$ Resources:Resources, grdDate %>" DataMember="RecordDate" Name="RecordDate"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="<%$ Resources:Resources, grdUser %>" DataMember="UserName" Name="UserName"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="<%$ Resources:Resources, grdFileName %>" DataMember="Name" Name="Name"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="<%$ Resources:Resources, grdType %>" DataMember="MimeType" Name="MimeType"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> <LayoutSettings AllowDelete="Yes" PagingMode="ClassicPaging" PagingLoadMode="Custom" AllowSorting="Yes" PromptBeforeDelete="true" HeaderClickAction="SortMulti" AllowColumnSizing="No" AllowMultipleSelection="Yes" > <ClientSideEvents OnCellDblClick="OnCellDblClick" OnRowContextMenu="OnRowContextMenu" /> </LayoutSettings> </ISWebGrid:WebGrid> <isdatasource:isdatasource id="idsPostItList" runat="server"> <tables> <ISDataSource:ISDataSourceTable SelectMethod="GetData" SelectCountMethod="GetCount" TableName="PostIts" TypeName="PostItByObjectDataProvider" EnablePaging="true"> </ISDataSource:ISDataSourceTable> </tables> </isdatasource:isdatasource>
and the client-code :
function ShowSelectedRowDetails(controlId) { var grid = ISGetObject(controlId); var row = grid.GetSelectedObject().GetRowElement(); grid.AddInput("PostItId", row.keyValue); grid.SendCustomRequest(); return true; } function OnRowContextMenu(controlId, rowType, rowElement, menuObject) { var miDetailPostIt = new WebMenuItem(); miDetailPostIt.Text = "<asp:Literal runat="server" Text="<%$ Resources:Resources, lnkViewDetails%>" />"; miDetailPostIt.Name = "ViewDetails"; miDetailPostIt.OnClick = "ViewDetailsClick"; miDetailPostIt.CustomElement = controlId; miDetailPostIt.ImageURL = gridDetailIcon; menuObject.Items.Add(miDetailPostIt); alert ('test7'); } function ViewDetailsClick(menuItem) { return ShowSelectedRowDetails(menuItem.CustomElement); }
I can see my alert (test7) but just after that, the call of "ViewDetailsClick" seems to return this error...
The same code is used and works correcty in all our pages.
I did check my PostItId field exists in my datasource and its value correcty set.
Nicolas
Hi Nicolas,
It seems that I cannot replicate your issue. I have tried your sample code and it works well, all the function are called. The error that you have got, did it say "Unknown Runtime Error" ? or something else ? Have you tried to reset the VS ? or empty your "Temporary ASP.Net Files" <C:\Windows\Microsoft.NET\Framework\<<your version>>\Temporary ASP.NET Files> and do the "iisreset" from cmd prompt. I hope it helps and please do not hesitate to ask if you have any other questions.
Thank you,Andi Santoso
Hello Andi,
I thank you for your quick answer.
Yes I tried everything you wrote.
The error is "Unknown Runtime error". I have a AJAX tabcontainer in my user control but I tried to remove it and the behaviour is the same.
I open my user control as a window.open. When I do this, nothing happens when I right-click on the webgrid. When I open it normally (Navigate...) the error "Unknown runtime error" occures.
Actually, I do not see something wrong with your java-script code. So here, I attached you my aspx file using a northwind database, try and see if it runs fine on yours, if so, then you can modify mine. I hope it helps and please do not hesitate if you have any other questions.
Yes it worked well.
We found what causes the error.
The error occurs only on the pages where we use another component (PowerWeb FileUpload), which is an AJAX component.
Do you know any problems when we use intersoft components with other AJAX components?
Actually, I am not sure what may cause the error when you use another component such as PowerWeb FileUpload (AJAX component). Perhaps you can give me a simple sample code that can represent your issue using AJAX, because our product should be working fine with other AJAX tools and what is the version of your WebGrid if I may know ?. In fact, we have our built in component that works just like AJAX component, it is called "WebFlyPostBackManager". You can see our sample to have a further information and functionality of it. I hope it helps and please do not hesitate to ask if you have any other questions.
Thank you,Andi Santoso.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname