.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Expand specific Node in a flowchart

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :Windows Application
I am looking to expand the specific node in flowchart thru code. Is there any way to achieve this. I was going thru some post & found something ModelItemExtensions. ModelService modelService = wd.Context.Services.GetService<ModelService>();   //IEnumerable<ModelItem> activityCollection = modelService.Find(modelService.Root, typeof(Activity)); I am getting the modelitem collection as mentioned in below code instead of using ModelService.Find() method ModelItemCollection modelItems = modelService.Root.Content.Collection; I needed to use above code as Find() method was hanging the app. I am creating the instance of UserControl inside my activity & that seems to hang the Find() method. ModelItemExtensions.Focus(activityCollection.ElementAt(6)); Above code works for Activity but not for FlowChart (I am getting the collection using modelService.Root.Content.Collection). Any suggestions would be appreciable.

View Complete Post

More Related Resource Links

Addressing a specific node with CSS Friendly Control Adapters


Hello everybody,

I like the concept of the friendly control adapters, but I'm not sure if I can use them for my purpose.
My whole menu basically consist of one image, which itself contains the images for each menu item (is that understandable?).

Each menu item then displays only a certain part of the image.
I do this by shifting the background-position.

#navigation li#home a{
background-position:0px 0px;

/* Registration */
#navigation li#registration a:link, li#registration a:visited {
background-position:-106px -34px;

#navigation li#registration a:hover, li#registration a:focus {
background-position:-106px 0px;

/* Administration */
#navigation li#administration a:link, li#administration a:visited{
background-position:-212px -34px;

#navigation li#administration a:hover, li#administration a:focus{
background-position:-212px 0px;


I would like to do the same now with CSS Friendly, but I don't see how I can address each individual menu item node.
In static HTML I can give each link an ID (i.e. #administration), but I don't see how to do this with the asp:Menu control and CSS Friendly.

Can someone help me?

Thanks a lot,

Need help with getting InnerText from a specific node



I work with a third party API that sends the following XML response.

<?xml version="1.0" encoding="UTF-8"?>
<test type="boolean">true</test>
 <id type="integer">1234567</id>
 <id type="integer">987654</id>

I'm interested in getting the state and id for the job. I tried GetElementById but so far I'm making a mistake somewhere, I keep getting object reference not set... error.

I could use some help with this. Thanks.

Unable to select start node in flowchart?


This is weird. I'm trying to get my feet wet with WF 4 and have dropped a flowchart onto the design surface. After adding another activity I want to connect it to the Start node, but it's not available for selecting?!? It's visible but no box appears around it on mouse over.

Another symptom I noticed is that when I double-click a workflow xaml file, it's not loading the designer, but the xml view instead.

I tried repairing my VS2010 install but nothing has changed.

expand one node at a time in treeview


To anyone who know how to accomplish this: 

I have a tree view like this:








what I want to accomplish is when user click a parent node (for example node 1) every other parent nodes are collapse except the selected node( node 1), in other word, only one subtree is expanded at a time.

Thank you very much!


how to make a TreeNode in treeview as the 1st child node for every or specific Parent Treenode? w




How to  make a treenode  as the 1st child node for every parent node or for some specific parent nodes.

thanks in advance

Replication Monitor: Publication Node will not expand



I'm using SQL Server 2005 Replication Monitor to monitor a number of Publications.

One Publication node, will not expand however, that is to say that when clicked it's label changes to expanding and then never actually completes in order to provide details of the Publications at the Publisher. This means that I cannot highlight a specific Publication at the Publisher for further investigation and instead have to review all Subscriptions in the subscription watch list, which is cumbersome.

I have tried removing the Publication and adding it back to Replication Monitor without success, the issue persists. I have also tried creating a SQL Server Login with SYSDBA rights in order to connect to the remote distributor in order to rule out a permissions issue.

Has anyone else come across this issue before or can perhaps provide further suggestions in order to troubleshoot?

John Sansom | SQL Server Database Administrator

Button specific code


I have 2 submit buttons on my page. Right now, the only way to run the code behind with razor is to to If(IsPost). Since I have 2 buttons, how would I destinguish between the two in post? Is there a way to request a button that sent a post request?  

Getting list of users reporting from specific Manager from Active Directory


Dear All,

I am have requirement like displaying all the user information reporting to specific manager from Active Directory.

Please help me regarding this.



Create web site specific to mobile device, how to detect?



I have a website that is written in .Net 2.0 which uses all the nice rich functionality of the web (Ajax, javascript etc..).  However I have noticed that the site does not display very well on mobile devices. 

So therefore I would like to create a more streamlined version of my site that is better tailored to these devices.  However how do detect that the user has come to the site via a mobile device and how can i redirect them to my tailored page

Many thanks in advance

May i use the collapse and expand feature (like tree menu) in Report ?


HI all,

May i use the collapse and expand feature (like tree menu) at Report iam using the Report viewer  Control for displaying the Report on my Asp.net Page .


I have number records and each record have detail as i clicked or expand the record then details will be shown is it possible with report viewer control 
If any one have experince before please share the ideas.


Best Regards

Display homepage node along with child nodes


If the first Sitemap node is your homepage/default and all other nodes are supposed to be children / grandchildren of the first sitemap node in a web.sitemap, how do I set up my web.sitemap to enable me to display my cssFriendlyMenu with the homepage node along with the nodes that are 1 level down from it at the same time as in :

Home   Products   Services   About us


...or is it not possible to have the first sitemap node displayed along with the nodes that are 1 level down from it?  Do I need to have a different starting node rather than my homepage node?

Patterns in Practice: Internal Domain Specific Languages


Jeremy Miller explains how internal Domain Specific Languages can help you craft code that is easier to read and write. His bag of tricks to improve your programming includes extension methods, fluent interfaces, object extensions and use of the semantic model.

Jeremy Miller

MSDN Magazine January 2010

Bugslayer: Minidumps for Specific Exceptions


This installment of Bugslayer covers the use of ADPlus to create a minidump of your Microsoft .NET Framework 2.0 pro¬cesses on specific exceptions.

John Robbins

MSDN Magazine November 2006

Add an empty line in Gridview on specific dayofweek


Hey all,

Havin quite a bit of trouble with this one.  I have a bunch of days that I worked in my database...mostly monday-friday and some saturdays.  What I want the gridview to do is add an empty line between each sunday and monday so that it seperates out my work weeks and makes it easier to read in the gridview.  I got some help here a few days ago on how to clone the db etc and I have all that working properly but I can't seem to wrap my head around how to do add these empty lines in the proper spots.  Here is my code so far:

private DataTable AddEmptyRow()
        DataTable originalDataTable = GetItems();
        DataTable newDataTable = originalDataTable.Clone();
        DateTime testdate = Convert.ToDateTime("7/20/2010");

            for (int i = 0; i < originalDataTable.Rows.Count; i++)
                DayOfWeek day = testdate.DayOfWeek;

                if (day == DayOfWeek.Sunday)
                    DataRow newDataRow = newDataTable.NewRow();



ImageURL SiteMap Node


Hi Can anyone tell me how i can add the ImageURL from a sitemap into a navigation menu, i had this working with webforms but cannot get it to work with mcv

var sbMenuHelper = new StringBuilder();

sbMenuHelper.Append("<ul class='cssMenu'>");

var topLevelNodes = SiteMap.RootNode.ChildNodes;
foreach (SiteMapNode node in topLevelNodes)
    if (SiteMap.CurrentNode == node)
        sbMenuHelper.AppendFormat("<a href='{0}'>{1}</a>", node.Url, helper.Encode(node.Title));

return sbMenuHelper.ToString();

        description="Contact Us"

Autoscroll down to a specific line on the webpage



I wonder about how this autoscroll is working on a page. For example when entering a page that I have set up named "test.aspx",

I want to 'autoscroll' down to a specific textrow that I have so that textrow exactly will be on the very top of the browser window.


I wonder how you do this task? Thanks! 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend