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
We have just upgraded to Webgrid 7 and ran into a problem with ContextMenu when using XHTML the previous doc type was:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
its now:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
We need to use XHTML on our site and i have read that you should be able to use XHTML with webgrid 7 but the context menu looks odd in internet explorer and are placed wrong in Firefox see also the pics. for better understand the problem.
When using <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> the context menu works as it should but as i said we need to use XHTML on out pages to get other controls to work.
Settings:
<iswebgrid:WebGrid ID="WebGrid1" runat="server" DataCacheStorage="Session" DataMember="LPReturOrdreLinieList" Height="248px" Style="z-index: 100; left: 144px; position: absolute; top: 348px" TabIndex="20" ViewStateItems="BehaviorAndStyle" ViewStateStorage="Session" Width="819px" EnableWebResources="Auto"> <RootTable DataKeyField="LinieId" AllowEdit="Yes" Caption="Table1" DataMember="XXXXXXXXXXX" GroupTotalVisible="True" CellClickAction="CellSelect" PreviewRowVisible="True"> <FormatConditions> <iswebgrid:WebGridFormatCondition ColumnMember="VareLinieType" ConditionText="0" Name="FormatCondition0" Operator="GreaterThan"> <FormatStyle ForeColor="Red"> </FormatStyle> </iswebgrid:WebGridFormatCondition> </FormatConditions>
........................
<LayoutSettings InProgressUIBehavior="ChangeCursorToHourGlass" ColumnFooters="Yes" PromptBeforeDelete="True" AllowSelectColumns="Yes" AllowSorting="Yes" AutoHeight="True" RowHeaders="No" VirtualPageSize="10" AllowGrouping="Yes" FilterBarVisible="False" AllowColumnMove="Yes" AllowFilter="Yes" GridLines="Vertical" AllowExport="Yes" AutoFitColumns="True" AllowEdit="Yes" AutoWidth="True" UseRelativePositioning="False"> <ClientSideEvents OnEditKeyDown="WebGrid1_OnEditKeyDown"></ClientSideEvents> </LayoutSettings> </iswebgrid:WebGrid>
I have been in the Webgrid designer / settings / looking trough the Forums and havent found anyone with the same problem.
Any idees what i am doing wrong?
plZ help
BR Rolf
Hello Rolf,
Ok, Glad to hear that. I would save your xml language and forward this to our development teams. Hope they will include this culture in next release. Thank you for your help.
Regards,HAndy
I don't see any problem with my simple sample here. I've attach a screenshoots of mine too. I'm using a default Intersoft XHTML template Webform and do a few test on different browsers.
Could you please send me your context menu? Maybe I can help what is missing by looking at your code.
Thank you and have a nice day.
Best regards,
Niven Prasetya
"Context menu feature is disabled because men u runtime system can't be loaded. Ensure you have registered SmartWebResources in this web application"
All I did was:
Making new project called WebgridContextMenuTest
Under propperty under project "Use IIS WebServer "http://localhost/WebGridContextMenuTest" clicked "Create Virtual Directory"
on my Default.aspx site i draged a ISWebGrid and gave it a cell with the text "21321321"
Under Deployment maneger I wrote the Runtime License Key.
After i have done this the keys was added into my Web.config
<add key="ISNet.WebUI.ISRes_Registered" value="true" /> <add key="ISNet.WebUI.WebGrid.v7_0_7200.RunTimeLicenseKey" value="XXXX-XXXX-XXXXX" />
The Key has been replaced with XXX.
After this was done i right clicked the webgrid and clicked "register Smart Web Resources"
and sat EnableWebResources="Auto" for the webgrid.
tried to run it and got the error:
cant see what im doing wrong since i cant even ger a "test webgrid with 1 value to work :S
plZ help telling me what i am doing wrong.
This error i have fixxed on my main solution by right clicking the webgrid and clicked "register Smart Web Resources" and sat EnableWebResources="Auto" for the webgrid.
But its not wrking on my test Webgrid i wanted to paste in here. any chance you can zip your test example so i might locate what im doing wrong? Im pritty sure that its my Web.Config which are wrong.
Code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebGridContextMenuTest._Default" %><%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="250px" UseDefaultStyle="True" Width="500px" DataCacheStorage="Session" TabIndex="-1" ViewStateItems="BehaviorAndStyle" ViewStateStorage="Session" EnableWebResources="Auto"> <RootTable> <Columns> <ISWebGrid:WebGridColumn CustomEditorName="WebInputNET" Name="Linienr" Width="400px"> </ISWebGrid:WebGridColumn> </Columns> <Rows> <ISWebGrid:WebGridRow Height=""> <Cells> <ISWebGrid:WebGridCell Text="21321321"> </ISWebGrid:WebGridCell> </Cells> </ISWebGrid:WebGridRow> <ISWebGrid:WebGridRow Height="" Position="1"> </ISWebGrid:WebGridRow> </Rows> </RootTable> <LayoutSettings GridLines="Vertical"> </LayoutSettings> </ISWebGrid:WebGrid> </div> </form></body></html>
I got a forwarded email regarding this issue. However, as Niven said, we are unable to replicate the issue.Does your current sample place WebGrid in a container or something? However, you can also try to set the ContextMenu popup position manually. Please try to use the codes below.
<script language="javascript" type="text/javascript" id="WebGrid1_OnRowContextMenu"> var x; var y; function show_coords(event) { if (IS.ie) { x = event.clientX; y = event.clientY; } else if (IS.moz) { x = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; y = event.clientY + document.body.scrollTop + document.documentElement.scrollTop; } } function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject) { var WebGrid1 = ISGetObject(controlId); menuObject.Show(x, y); return true; } </script>
Hope this helps.
Regards,Handy
Hi Handy
thx for your reply.
Note that im running Windows 7 Ultimate 64 Bit, IIS 7, Visual Studio 2005. And XHTML on the pages
I have been working on the problem for quite some time and have located the problem it seams that in my "main" solution where i dont have the error:
I fugured out that the problem is Position: absolute;
<iswebgrid:WebGrid ID="WebGrid1" runat="server" DataCacheStorage="Session" Height="232px" Style="z-index: 101; left: 160px; position: absolute; top: 361px" TabIndex="-1" ViewStateItems="BehaviorAndStyle" ViewStateStorage="Session" Width="814px" EnableWebResources="Always">
When i Remove all style it works as it should but i need to be able to set position on the webgrid.
I have tried with a surounding <Div> and set the Position: Absolute on the Div insted but this aint helping.
I belive there is a Bug with the position since i have it working without the style.
Futhermore have i tried to make a Test example with a Webgrid with 1 cell but i get the error:
I have attached the source code and the published website for you to see the error, and my configuration. BE AWARE that i have changed the runtime licence key with XXXX-XXXX-XXXX
I Would really apriciate your reply on this issue.
I have tried the Script you gave me but i can only get the following to work and not as it was intented:
<script language="javascript" type="text/javascript" id="WebGrid1_OnRowContextMenu"> function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject) { var WebGrid1 = ISGetObject(controlId); menuObject.Show(100, 100); return true; } </script>
Please add ISNet.WebUI.WebDesktop.Resources.dll into your project references. This should fix your error.I will wait the sample that your promised in our previous livechat.
Hello,
Thank you for your sample. Do you mean that "Invalid Argument" was your error?
If it was, I am able to see the issue in here. I will let our developer teams know about this.For temporary, please use my workaround. It's good to see that you can replace the syle.About the localization, I will also send your attached xml to our development teams.Thank you for your effort.
After done some test, I found some weird things.At first, I can replicate the issue. Then, I tried to narrow down the differences between our references. When I tried to remove System.Web.Mobile, I could not see the issue again.
I already tried to delete the project and extract your attached project again.But before I changed anything in the project (just simply run after loaded the project), I could not see the error again.
Hallo again
Thx again for your reply, the error i got was as you said: "Invalid Argument" when useing:
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="250px" UseDefaultStyle="True"Width="500px" style="left:160px; top:361px; position:absolute; z-index:101">....
I tried to extract the project but i still get the error also tried to remove the System.Web.Mobile without it helping.
Best Regards
Rolf
Yes, I can see the error now. But I could not replicate it in my simple new project. I don't know which is missing.Would you help me find which setting is missing in my project.You can see that it works well with your structure.
Hallo again Handy
When i try to open your test project i get the following error "see attached picture"
Also i have looked in your webconfig and cant find:
<system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules> <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </modules> <handlers> <remove name="WebServiceHandlerFactory-Integrated" /> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add name="ISRes.axd_GET" path="ISRes.axd" verb="GET" type="ISNet.WebUI.WebResourceHandler, ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=b1f2a8511635667a" preCondition="integratedMode,runtimeVersionv2.0" /> </handlers> <!--<handlers> <add name="WebResourceHandler" verb="GET" path="ISRes.axd" type="ISNet.WebUI.WebResourceHandler, ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=b1f2a8511635667a" preCondition="integratedMode"/> </handlers>--> </system.webServer>
As faar as i have read this makes it able to run IIS 7.
Note that we are using:
Windows 7 Ultimate 64 bit
IIS 7
Visual Studio 2005
Webgrid 7
.Net Framework 2.0
Ok, I forwarded your project that replicates the issue to our developer teams.
After alot of testing I figured out that i was running with an old dll file. (ISNet.WebUI.WebDesktop.Resources.dll) and its working now as it should now that i have the newest dll file.
Sorry for the trouble.
Still it would be really nice if you could still take the:
I Attached earlier in the post to your developer team so we dont have to UseWebResources="False":
<TextSettings Language="UseCustom" UseLanguage="da-DK" UseWebResources="False"> </TextSettings>
In the LayoutSettings under each Webgrid.
Thx in advance.
Best Regards Rolf
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