Welcome Guest Search | Active Topics | Sign In | Register

The type or namespace name 'ItemClickEventArgs' does not exist in the namespace 'EO.Web' Options
Real Drouin
Posted: Thursday, October 22, 2009 2:39:33 PM
Rank: Member
Groups: Member

Joined: 10/22/2009
Posts: 13
Hi,

I need help. We are NOT using Visual Studio for different reasons that would be too long to explain.

I bought the suite of components yesterday. It does most of the thing that we want, but now, we are having a problem with the click in treeview.

We've been told to add this
private void SM1_ItemClick(object sender, EO.Web.ItemClickEventArgs e)
{
}
and we should be fine.
But we are getting
The type or namespace name 'ItemClickEventArgs' does not exist in the namespace 'EO.Web'

I've asked a couple times but the answer is for us to start using Visual Studio. It's not possible whatsoever.

Any of you have an idea how to fix it or should I just give up ?

Thanks
Real
eo_support
Posted: Thursday, October 22, 2009 3:09:43 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Hi,

You do not have to use Visual Studio if you do not want to. But you will need to add a reference to our DLL explicitly in your web.confg if you choose not to use Visual Studio. Here is a good article on how to do this:

http://support.discountasp.net/KB/a97/how-do-i-add-an-assembly-reference-in-the-webconfig-file.aspx

You don't have to include version or culture information. For example, it can be as simple as:

Code: HTML/ASPX
<add assembly="EO.Web" />


Hope this helps.

Thanks
Real Drouin
Posted: Thursday, October 22, 2009 3:20:28 PM
Rank: Member
Groups: Member

Joined: 10/22/2009
Posts: 13
Sounds interesting.

I went in web.config, added
<add assembly="EO.Web" />

in <assemblies>

<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral,...
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,....
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, ....
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral,...
<add assembly="EO.Web" />
</assemblies>


At the top of my aspx I have :

<%@ Register TagPrefix="eo" Namespace="EO.Web" Assembly="EO.Web" %>

And in my aspx.cs I do a reference like I've been told :

private void TreeView1_ItemClick(object sender, EO.Web.ItemClickEventArgs e)
{
faa.Text = "it's working";
}

When I run the application, I'm always getting the same error :

Compiler Error Message: CS0234: The type or namespace name 'ItemClickEventArgs' does not exist in the namespace 'EO.Web' (are you missing an assembly reference?)

Source Error:



Line 154:
Line 155:
Line 156: private void TreeView1_ItemClick(object sender, EO.Web.ItemClickEventArgs e)
Line 157:{
Line 158: faa.Text = "it's working";




Any idea what is the problem ?

Thanks
Real
eo_support
Posted: Thursday, October 22, 2009 3:28:29 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Hi,

We looked into it and it appears to be a mistake in the documentation. The correct type should be EO.Web.NavigationItemEventArgs, not EO.Web.ItemClickEventArgs. We sincerely apologize for the problem.

You can find the correct type name from the reference section at here:

http://doc.essentialobjects.com/library/1/eo.web.navigationitemeventhandler.aspx

The reference section is automatically generated from the source code, so if you see a conflict between the reference section and other section in the documentation, the reference section is always the correct one. :)

Thanks for bring this doc error to our attention. We will correct it as soon as possible.

Thanks!
Real Drouin
Posted: Thursday, October 22, 2009 3:37:59 PM
Rank: Member
Groups: Member

Joined: 10/22/2009
Posts: 13
Hi,

Sounds great. Now the program compiled BUT it looks that it's still not working. The program doesn't execute the onclick.

When I click on the treeview, it should set faa.Text to it's working. Well it doesn't.

private void TreeView1_ItemClick(object sender, EO.Web.NavigationItemEventArgs e)
{
faa.Text = "it's working";
}

Is ItemClick the right thing ?

Thanks
Real
eo_support
Posted: Thursday, October 22, 2009 3:43:18 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Did you set RaisesServerEvent to true?
Real Drouin
Posted: Thursday, October 22, 2009 4:15:38 PM
Rank: Member
Groups: Member

Joined: 10/22/2009
Posts: 13
No. No one told me about it.

I went in the documentation and here is what I found:

public bool RaisesServerEvent {get; set;}

Personnally it doesn't mean anything.

I took that code and put it in the .CS file. It did not work.

What should I do and why do we have to set this when it should already be set

Thanks
Real
eo_support
Posted: Thursday, October 22, 2009 4:25:03 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Hi,

The documentation actually explained what this property does:

http://doc.essentialobjects.com/library/1/eo.web.basenavigator.raisesserverevent.aspx

Basically if you only use JavaScript to handle item click event (as a lot of people does), then you do not have to set this property; if you use code behind (C# or VB.NET or anything else runs on the server), then you do need to set this property to true.

Because it is a standard property, you set it the same way as you set any property on any ASP.NET server controls:

Code: HTML/ASPX
<eo:TreeView RaisesServerEvent="true" .....>
...
</eo:TreeView>


Hope this get you going.

Thanks
Real Drouin
Posted: Thursday, October 22, 2009 4:34:36 PM
Rank: Member
Groups: Member

Joined: 10/22/2009
Posts: 13
I did it and it still not working

This is the treeview

<eo:TreeView runat="server" id="TreeView1" ControlSkinID="None" Width="500px" Height="325px"
RaisesServerEvent="true"
ClientSideOnItemMouseOver="on_item_mouseover"
ClientSideOnContextMenu="ShowContextMenu"
AutoSelect="ItemClick">
This is the text box
<asp:TextBox ID="faa" runat="server" MaxLength="20" Columns="20" AutoPostBack="True"/></asp:TextBox>

This is the code in the cs file

private void TreeView1_ItemClick(object sender, EO.Web.NavigationItemEventArgs e)
{
faa.Text = "it's working";
}


It looks that the click is not working. Why the faa.Text is never set to "it's working"

Thanks
Real

eo_support
Posted: Thursday, October 22, 2009 4:47:14 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Hi,

You also need this:

Code: HTML/ASPX
<eo:TreeView OnItemClick="TreeView1_ItemClick" ....>
...
</eo:TreeView>


Visual Studio should automatically create this for you (because it's standard ASP.NET event handling syntax) but because you do not use Visual Studio, you will need to manually put it in.

Thanks
Real Drouin
Posted: Thursday, October 22, 2009 4:52:02 PM
Rank: Member
Groups: Member

Joined: 10/22/2009
Posts: 13
Still doesn't work

CS0122: 'services.TreeView1_ItemClick(object, EO.Web.NavigationItemEventArgs)' is inaccessible due to its protection level


Real
Real Drouin
Posted: Thursday, October 22, 2009 4:53:55 PM
Rank: Member
Groups: Member

Joined: 10/22/2009
Posts: 13
I want to re-explain the goal.

The tree is very nice. The users like it. Now they want to be able to click on a leaf. That's all.

I'm sure I'm not the first one asking for that.

Thanks
Real

eo_support
Posted: Thursday, October 22, 2009 5:13:10 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Hi,

Try to change privated to protected. There are several ways to handle server event. One way is to use the syntax shown above; for that syntax you need to use at least protected, not private. Another way is to use delegate, for which you can use private.

We understand your goal and we agree that handling server event is a very basic task. But please understand that even so a lot of pieces still need to be put together correctly for it to work. This is how ASP.NET works and it is partially why MS makes and sell Visual Studio when you do not wish to deal with all these details. We have nothing against you not using Visual Studio, but it would be much appreciated if you can understand that all these pieces are really just MS stuff.

Thanks
Real Drouin
Posted: Thursday, October 22, 2009 5:33:58 PM
Rank: Member
Groups: Member

Joined: 10/22/2009
Posts: 13
Hi,

I understand, don't worry. But I don't think so the problem is with VS. We've been doing our .net c# development for 4 years without VS and we are COMPLETELY SATISFIED.

I think the problem we are having here is with the object.

I changed the privated to protected and it's still not working...

I don't see the "it's working". It's simply doesn't go in the class.

Real
eo_support
Posted: Thursday, October 22, 2009 5:51:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Real Drouin wrote:
I think the problem we are having here is with the object.
We would completely disagree on that. I think we have already went a lot of extra miles to just get you to pick up many basic ASP.NET programming issues such as how to add reference, how to handle event, how to set a property, etc. We have no obligation to do any of those.

If you still think that the problem is with our objects, it will probably be easier for you go with another vendor because we see no point of helping you further when you still try to point your finger to us after all the extra help we have provided to you. We would have been out of business if our product can not do anything as simple as handling a click event. We will be more than happy to issue you a refund should you wish to do that.

If you wish to continue working with us, please isolate the problem into a test page that demonstrates the problem and we will be happy to take a look. Please see here for more details about posting test code:

http://www.essentialobjects.com/forum/postst3013_I-run-into-a-problem-can-I-send-over-my-code-so-that-you-can-take-a-look.aspx

Lastly, please review our product support policy:

http://www.essentialobjects.com/forum/postst1368_Product-support.aspx

Thanks
Real Drouin
Posted: Thursday, October 22, 2009 6:04:41 PM
Rank: Member
Groups: Member

Joined: 10/22/2009
Posts: 13
We are not using VS like THOUSANDS of other companies. There are reasons for that.
But that not the point.

I believe that your objects is working fine. Do you have an simple program that will show us the Treeview with click and the full code. Something very very simple. Just one page will be fine with use.

Thanks
Real

eo_support
Posted: Thursday, October 22, 2009 6:24:50 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Real Drouin wrote:
We are not using VS like THOUSANDS of other companies. There are reasons for that.
But that not the point.

We agree that is not the point and we have nothing against either way. The point is you need to know general ASP.NET programming and to be able to solve those issues by yourself, with or without VS. It is not our obligations to help on such issues and it is certainly not a problem of our product when you run into any of these issues.


Real Drouin wrote:
I believe that your objects is working fine. Do you have an simple program that will show us the Treeview with click and the full code. Something very very simple. Just one page will be fine with use.

Glad that you agree on that. Below is a sample page. When user clicks the node you will see the Label's Text is being updated:

<%@ Page Language="C#" %>

<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

protected void TreeView1_ItemClick(object sender, EO.Web.NavigationItemEventArgs e)
{
Label1.Text = "Item clicked:" + e.TreeNode.Text;
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<eo:TreeView runat="server" id="TreeView1" ControlSkinID="None" Height="260px"
onitemclick="TreeView1_ItemClick" Width="230px" RaisesServerEvent="true">
<Margin BackgroundImageUrl="00030417" Visible="True" Width="24" />
<LookNodes>
<eo:TreeNode DisabledStyle-CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;color:Gray;padding-bottom:1px;padding-left:1px;padding-right:1px;padding-top:1px;"
ImageUrl="00030407" ItemID="_Default"
NormalStyle-CssText="padding-right: 1px; padding-left: 1px; padding-bottom: 1px; color: black; border-top-style: none; padding-top: 1px; border-right-style: none; border-left-style: none; background-color: transparent; border-bottom-style: none"
SelectedStyle-CssText="background-color:Silver;border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:white;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;">
</eo:TreeNode>
</LookNodes>
<TopGroup Style-CssText="background-image:url('00030417');background-repeat:repeat-y;border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:black;cursor:hand;font-family:Tahoma;font-size:11px;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;">
<Nodes>
<eo:TreeNode ImageUrl="00030407" Text="Archive Folders">
<SubGroup>
<Nodes>
<eo:TreeNode ImageUrl="00030408" Text="Inbox">
</eo:TreeNode>
</Nodes>
</SubGroup>
</eo:TreeNode>
</Nodes>
</TopGroup>
</eo:TreeView>
<asp:Label runat="server" ID="Label1"></asp:Label>
</div>
</form>
</body>
</html>

Thanks
Real Drouin
Posted: Thursday, October 22, 2009 7:44:47 PM
Rank: Member
Groups: Member

Joined: 10/22/2009
Posts: 13
Excellent.
That's all I've been looking for.

Thanks
Real
eo_support
Posted: Thursday, October 22, 2009 7:53:54 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Great. Glad that helped!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.