I have a Web Data Tree set up like so:
<ig:WebDataTree ID="webDataTree1" runat="server" OnNodeClick="webDataTree1_NodeClick" Font-Size="Smaller" AutoPostBackFlags-NodeClick="On"></ig:WebDataTree>
The web data tree resides inside a web explorer bar. Each node of the explorer bar has a web data tree inside of it. I didn't design it this way - I'm upgrading from an old system that used the web list bar to hold web data trees.
The code that handles the NodeClick looks like this:
protected void webDataTree1_NodeClick(object sender, DataTreeNodeClickEventArgs e) { try { if (!e.Node.HasChildren) { string[] tableDetail; //tableDetail = e.Node.DataKey.ToString().Split('|'); 16 Feb 2015 EMF tableDetail = e.Node.Key.ToString().Split('|'); object[] getFilter = new object[5]; getFilter[0] = Int32.Parse(tableDetail[0].ToString()); getFilter[1] = tableDetail[1]; getFilter[2] = tableDetail[2]; getFilter[3] = e.Node.Text; getFilter[4] = tableDetail[3]; _delLoadFilterpage.DynamicInvoke(getFilter); } }
// .. catch code is here & the end of the method.
There are two scenarios that happen here.
The first time I click on a node in the web data tree, the nodeclick event does not fire. However, all of the nodes within the web explorer bar get moved down into other nodes. For example, the first three items (which start off in the first menu) wind up in the second menu, the first and third menus are blank, then the fourth holds the contents of the second menu, and so on.
The second time I click on a node, it fires the NodeClick event, at which point all of the data is scrambled, none of the arguments are correct, and I wind up with an exception. Please let me know what other information you need, thanks!
Hello Edward,
Thank you for the feedback. Please feel free to contact me via the private case if you require further assistance.
Thank you! I tried it again today and it compiled and ran fine.
I'm going to try reorganizing some of the code and will get back to you with the results. The whole application has thousands and thousands of lines of code and markup and it's difficult for me to pare all of it down to the basics of what I'm trying to accomplish.
The one thing that makes your code example significantly different from mine is that, while you add the web explorer bar nodes programmatically, the web data tree nodes are created using the HTML markup. So it's not as close as to my case as I would like it to be. If I can't get the program to work today, I may try to make your example more like my own and see if I can get that to fail.
Thank you for your help and I will let you know how it goes...
It is a common practice to test the sample before making it public. What is more, this sample works as expected and WebExplorerBar2 is defined via the markup so there is no need to add it ServerSide. Both WebExplorerBar1 and WebExplorerBar2 are correctly rendering. I suggest you to download a new fresh copy of the sample and take a look at it.
I understand you could prefer to share more details privately, so I have created a private case CAS-153402-W3J6Y5. We could continue our discussion via the case. You could find details for your current support activity at: https://ko.infragistics.com/my-account/support-activity
OK, I downloaded your code sample. I'm curious, do you run your code before you post it? The reason I ask is because I had to add the following line in order to get it to compile:
WebExplorerBar WebExplorerBar2 = new WebExplorerBar();
Once I did that, it would run. And it would display the "WebExplorerBar using Markup ExplorerBarGroups" but displayed nothing in the "WebExplorerBar using ServerSide DataTable DS for ExplorerBarGroups.
I have a screenshot of the results but my company is particular about accessing file sharing services (i.e., they block all of them). I can send you the file and you can post it, or just take a look. Basically everything below the second heading (ServerSide DataTable DS) is blank.
What have I missed here? Let me know, thanks!
Hello,
Without runnable code sample to debug, I could not tell what the cause of this behavior is on top of my head. However, we could further narrow this down. I have created a CodeSample using the approach from the code shared and yet, I could not reproduce this. I have tested this in both IE and Mozilla browsers with the same v14.1.20141.2392. I have logged the ServerSide Events order of firing into the output window in VS. Using similar approach we could find what is the exact order of events firing in your application as well.
Not firing OnNodeClick seems could be related to the WebExplorerBar events and how they are handled. Are there any event handlers attached for it? I could not see any WebExplorerBar event handlers in the code shared. For example when the first time a node from the templated tree is clicked, and the text/nodes messed up what is the event firing?
What is the event when the WebExplorerBar groups and items are populated in? What are all of the PostBack/ServerSide event handlers used? What are all AutoPostBackFlags/setting used? These are also related.
I am attaching the code sample used trying to replicate this. I suggest you test it on your side and see if you could modify it to match your case. Trying to replicate the approach in code will best answer most of the questions.
In case you would prefer to create a new one/or attach the logic privately, I could create a private case for you where the samples could be exchanged in private.I am looking forward feedback from you.