Trapping click and doubleclick events

I have used the “EditLabel()” function to implement editing the label of nodes a user places on a view. However, I need to also edit the userflags data as well. I will likely need to edit other data that I am storing in a related data file and I am putting the id of the related record into .userflags when I build the view. Although there is probably a way to show the userflags in a text box (I’ve tried: goShowPanel(‘LabelPanel’, ‘TextBox1’, goInfo.UserFlags); and it just says “undefined” in text box after clicking on the node), I would really like to be able to write c# code to do what I want to do (including looking up the related record and saving data back to it as well). I have read and reread the web introduction document and have tried in my code something like:
MyView.ObjectSingleClicked += new GoObjectEventHandler(MyView_ObjectSingleClicked);
and in the method code I put a java alert message and it never gets hit. So I’m not sure what I am doing wrong.
I would simply like to have a single or double click event where I can put regular c# code.
Thanks

It isn’t clear to me whether you really want data and behavior on the client or on the server. The first part of your message assumes the former; but obviously any C# code has to be on the server.
So, for the simple case where the event handler is on the server, the ObjectSingleClicked event handler that you defined is fine. It works whether or not GoView.NoPost is true. Although you can’t implement any “java alert message” in C# code, you can certainly set a Visual Studio 2005 breakpoint in that event handler.
If you really want the behavior on the client, I can explain how to customize the data that is sent to the client.

Partly I’m trying to learn what my options are. I have got the code behind working and can get the part id of the node I just clicked on.
What about on the client side in java script doing this:
goShowPanel(‘LabelPanel’, ‘TextBox1’, goInfo.Text);
gives puts the text of the node in the textbox for me. As I mentioned above, I tried putting goInfo.UserFlages in there instead and it just returned “undefined” into my textbox next to the dropdown. What am I doing wrong? I need to be able to show them what data the node is linked to when they click on the node as well as allowing them to change the text. Actually I’m hoping to use the number in the userflags to initialize a dropdown on the panel showing them human readable info:

the userflags property of the node contains the id of the record I wish to show in the tag link dropdown.
Bottom line is I need to get the userflags info, initalize the dropdown to the correct record, then show the panel and allow them to make changes. I already have the code working on the “Set Label” button to save the data.
Thanks for your help.

Walter, I’ve got everything working now in code behind except for one thing. I have the nopost property on the view set true for obvious reasons. However when I click on the node, nothing happens because there is no post–so I have a goofy button labeled “View/Edit Selected Node”. When I click the button after selecting a node with a click, it gets info about the clicked on node, sets the updatePanel.visible to true, and then by nature of the button does a postback which show the now “visible” panel.
Can you think of anyway to have the objectclick or doubleclick event force a postback so I don’t have to use the goofy button?
Thanks

To pass additional data to the client, you need to add property/value pairs to a GoPartInfo for each GoObject that needs it. You can either override GoObject.GetPartInfo (as some of the examples do) or you can override GoViewDataRenderer.GetStandardPartInfo (as some other examples do).
Regarding whether or not a click is sent to the server, that depends on whether your “…Click” JavaScript function returns false or not. If it returns false, the view is not reloaded; otherwise it is.
And to clarify what you said, since GoView.NoPost is true, it is just the image and its data (i.e. GoPartInfos) that are reloaded – there’s no postback, but the GoView still gets to handle any events on the server.