User Profile & Activity

Rolf Arndt Member
Page
of 2
Posted: November 10, 2010 7:18 AM

Hi Glenn Layaar


Thx for your reply.

I have implemented the function in our code and its working for expanding.

I made a similar for Colapsing and a similar for "Expaning again" (not LoadGroup action)

            OnAfterResponseProcess="WebGrid1_OnAfterResponseProcess"
OnGroupExpand="WebGrid1_OnGroupExpand"
OnGroupCollapse="WebGrid1_OnGroupCollapse"
function WebGrid1_OnAfterResponseProcess(controlId, actionName, lastRequestObject, xmlResponseObject) 
{
var WebGrid1 = ISGetObject(controlId);
if (actionName == "LoadGroup" && IS.IsXHTMLDocType() && IS.ie)
{
var childRows = WebGrid1.GetSelectedObject().GetRowElement().parentElement.nextSibling.getElementsByTagName("tr");
for (var i = 0; i < childRows.length; i++)
{
childRows[i].style.display = "";
}

}
return true;
}

function WebGrid1_OnAfterResponseProcess(controlId, actionName, lastRequestObject, xmlResponseObject) {
var WebGrid1 = ISGetObject(controlId);
if (actionName == "LoadGroup" && IS.IsXHTMLDocType() && IS.ie) {
var childRows = WebGrid1.GetSelectedObject().GetRowElement().parentElement.nextSibling.getElementsByTagName("tr");
for (var i = 0; i < childRows.length; i++) {
childRows[i].style.display = "";
}

}
return true;
}

function WebGrid1_OnGroupExpand(controlId, actionName, lastRequestObject, xmlResponseObject) {
var WebGrid1 = ISGetObject(controlId);
if (IS.IsXHTMLDocType() && IS.ie) {
var childRows = WebGrid1.GetSelectedObject().GetRowElement().parentElement.nextSibling.getElementsByTagName("tr");
for (var i = 0; i < childRows.length; i++) {
childRows[i].style.display = "";
}
}
return true;
}

function WebGrid1_OnGroupCollapse(controlId, actionName, lastRequestObject, xmlResponseObject) {
var WebGrid1 = ISGetObject(controlId);
if (IS.IsXHTMLDocType() && IS.ie) {
var childRows = WebGrid1.GetSelectedObject().GetRowElement().parentElement.nextSibling.getElementsByTagName("tr");
for (var i = 0; i < childRows.length; i++) {
childRows[i].style.display = "None";
}
}
return true;
}


Its also working quite oki. Untill you group after example City expand one of the last Citys and click on one of the Collumns onside the row.

Then i get the following Error: htmlfile unexpected call to method or property access.
if (!ISEvent.Raise(vfcc65.LayoutSettings.ClientSideEvents.OnCellClick,vfcc65.Id,vbb966.Id,v88587.rowIndex,v3ec22.cellIndex,v3ec22,v88587.position))

My working code are running with Checkboxes (Row selecters) which wont be maked.

This is working if I dont have the 3 client side events or if im running firefox.

Futher more to help you locate the problem it seams to be only the items in the Groups which havent been loaded by the "VirtualPageSize".

BR Rolf

Posted: October 8, 2010 7:55 AM

Hi

Any news to this Issue?

Best Regards

Rolf

Posted: September 16, 2010 9:07 AM
Hi again Handy

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

Posted: September 16, 2010 8:48 AM

Thx alot for your reply :)

I got it to work with your example:

function WebGrid1_OnColumnContextMenu(controlId, col, menu, isGroup, location)
        {
            var separator = new WebMenuItem();    
            separator.Type = "Separator";       
            separator.Name = "MySeparator";          
            var menuItemGem = new WebMenuItem();    
            menuItemGem.Text = "Save Layout";    
            menuItemGem.Name = "LayoutSave";    
            menuItemGem.OnClick = "SaveLayoutValue";
            
            var menuItemGendan = new WebMenuItem();    
            menuItemGendan.Text = "Get Default Layout";    
            menuItemGendan.Name = "DefaultLayout";    
            menuItemGendan.OnClick = "DefaultLayoutValue";
            // Add Menu Separator and Menu Item    
            menu.Items.Add(separator);    
            menu.Items.Add(menuItemGem);
            menu.Items.Add(menuItemGendan);
        }
	
	    function SaveLayoutValue() {
            var grid = ISGetObject("WebGrid1");
            var key = "LayoutSave" //
            grid.AddInput("key", key);
            grid.SendCustomRequest();
        }
        function DefaultLayoutValue() {
            var grid = ISGetObject("WebGrid1");
            var key = "LayoutDefault"
            grid.AddInput("key", key);
            grid.SendCustomRequest();
        }

Serverside it calls:

    Private Sub WebGrid1_InitializePostBack(ByVal sender As System.Object, ByVal e As ISNet.WebUI.WebGrid.PostbackEventArgs) Handles WebGrid1.InitializePostBack
        If Not e.Action <> ISNet.WebUI.WebGrid.PostBackAction.Custom Then
            Select Case Request("key")
                Case "LayoutSave"                     
                    ucASPLPGridLayoutCtl.GridLayoutOptions(Request("key")) Case "DefaultLayout" ucASPLPGridLayoutCtl.GridLayoutOptions(Request("key")) Response.Redirect(Request.Url.ToString) End Select End If End Sub

And its working.


Best Regards Rolf

Posted: September 15, 2010 3:59 AM
Thx alot m8 :D

it was the problem i wrote:

<html xmlns="http://www.w3.org/1999/xhtml">

insted of:

<html>

Thx for the fast reply :)

Best Regards Rolf
Posted: September 10, 2010 3:15 AM

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


Best Regards

Rolf

Posted: September 9, 2010 3:04 AM

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

Posted: September 8, 2010 9:58 AM
Hi Handy

Thx for your reply both in here and on the chat yesterday.

Insted of this, which I got an error on:
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="250px" UseDefaultStyle="True"
Width="500px" style="left:160px; top:361px; position:absolute; z-index:101">
....


I did this after I talked with you on the chat yesterday:
<div style="padding-left: 160px; padding-top: 361px">
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="250px" UseDefaultStyle="True"
Width="500px" >
....

which did the trick, but still its a work around.

I have attached a wglang_da-DK (Localization) xml file which we have made for our Danish Site.
Is it posiable to get it into one of the next releases/Hotfixxes so we can use SmartWebResources on the Localization aswell?

You asked me yesterday for a test project for your developer team with the error I got when using:

style="top:361px; left:160px; position:absolute" on the webgrid.

Together with the XHTML Doc Type:

<!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">

Webgrid 7

Visual Studio 2005

Windows 7 64 Bit

IIS 7


Note that I again, replaced the Runtime licence key from the Webconfig with XXX-XXXX-XXXXX.

Hope to hear from you again soon.

BR Rolf
Posted: September 7, 2010 9:50 AM

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:

"Context menu feature is disabled because men u runtime system can't be loaded. Ensure you have registered SmartWebResources in this web application"

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:

"Context menu feature is disabled because men u runtime system can't be loaded. Ensure you have registered SmartWebResources in this web application"

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>


BR Rolf

Posted: September 6, 2010 5:04 AM
Thx for the reply

NOTE!: Im running Windows Ultimate #64 bit IIS 7

I have tried to make a test example.

I want to run in Integrated mode but i get an Error:
Theres been registrered a ASP.NET setting, there are not used in integrated administrative pipeline mode.

When i am running in Classic mode i get the following Error:

"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:

"Context menu feature is disabled because men u runtime system can't be loaded. Ensure you have registered SmartWebResources in this web application"


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>

BR Rolf


All times are GMT -5. The time now is 11:45 PM.
Previous Next