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

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

Keybinding gesture wont capture in treeview, SHIFT+Down

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :WPF


In a treeview I have this





KeyBinding Gesture=&qu

View Complete Post

More Related Resource Links

How to multi select items in WPF Treeview using Shift Button


I have a requirement where i have to create a WPF Treeview, bind it to a dataset.
Then i have to provide functionality for user to select nodes either using Ctrl or multi select using Shift button.

I am able to write code to do all the tasks above except multi select using Shift button.
Following is my XAML for Treeview.

<TreeView Name="tvOutput" ItemsSource="{Binding}" Height="200" VerticalAlignment="Top" MouseMove="tvOutput_MouseMove" DragLeave="treeView_DragLeave" SelectedItemChanged="Tree_SelectedItemChanged">
                                <!-- This Style binds a TreeViewItem to a Node. -->
                                <Style TargetType="{x:Type TreeViewItem}">
                                    <Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
                                    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
                                        <Trigger Property="IsEnabled" Value="True">
                                            <Setter Prop

JQuery Treeview plugin is not working with Ajax page load in ie8


Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.

Any idea?

Thanks in advance.

Going Places: Gesture Magic


Windows Mobile 6.5 is the first version of the OS to expose gesture support to developers. Marcus Perryman explains how five touch screen gestures are handled, detailing message routing, the physics engine and some handy tips and tricks.

Marcus Perryman

MSDN Magazine February 2010

Paradigm Shift: Design Considerations For Parallel Programming


This article presents an overview of the motivation behind new techniques that decompose problems into independent pieces for optimal use of parallel programming.

David Callahan

MSDN Magazine October 2008

Form Filler: Build Workflows to Capture Data and Create Documents


Learn how to create a workflow that uses InfoPath forms and other office documents for passing data to targeted activities and for use in Office documents.

Rick Spiewak

MSDN Magazine June 2008

TreeView Help


Why the label.text is not showing the correct result after clicking three time on treeview.

I have TreeView1 and TreeView2 on my webpage and a label1
TreeView1 a list of items and TreeView2 contains another list of items

Now the first time I click on TreeView1 on the first item which is "Hello" label1.text show me Hello
the second time when I click on TreeView2 on the first item which is "World" label1.text show me World
the third time I clicked on TreeView1 on the first item again which is "Hello" label1.text show me World.  label1.text suppose to show me Hello, right?

What could be the problem what am I missing?

protected void TreeView1_SelectedNodeChanged1(object sender, EventArgs e)
Label1.Text = TreeView1.SelectedValue;
protected void TreeView2_SelectedNodeChanged(object sender, EventArgs e)
Label1.Text = TreeView2.SelectedValue;

Treeview: Select all children if Parent is selected etc...



I'm using a Treeview with  ShowCheckBoxes="All" , so basically I have a tree with all CheckBox Nodes. I'm using the TreeView inside an update panel, and populate the Tree code behind dynamically.

My requrements are the following:

1) Select all the children if parent is selected,

2) When parent is selected, and if we de-select a child, set parent unselected

3) Track if new nodes were selected and previously selected nodes were de-selected (becasue I need to update the database according to the selections in the Tree)

For above 1, I do the following:

protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
        foreach (TreeNode node in TreeView1.Nodes)
            TreeNodeCollection col = node.ChildNodes;
            //select all children when the parent is checked
            if (col != null && node.Checked)

Treeview problems in Update panel



I tried using this code, on a Treeview inside an update panel, which is populated dynamically in code behind. 

However, it doesnt give me the required functionality.

Following is my aspx code for the TreeView and the TreeView populating logic:


<div id="treelist">
<asp:UpdatePanel ID="UpdatePanel1&quo

Adding Accelerometer to Detect Shake Gesture




Capture event from HierarchicalDataSource


I have a custom hierarchical data source based on the msdn example (http://msdn.microsoft.com/en-us/library/system.web.ui.hierarchicaldatasourcecontrol.aspx).  An event can be raised in the DataSourceView.  If that occurs, I want to display a message on the web page.

The example is that I have a page with a TreeView control which uses a custom hierarchical datasource.  If the user selects a node that they are not allowed to select, the underlying datasource will throw and error.

I want to capture this and add a message to the page.  The Page_Error event is raised, but there are no eventargs.

Anybody know how to capture such an event? 

An alternative approach, although not quite specific enough, is to set a flag during the datasource load event (indicating the datasource is loading) and test for this flag in the Page_Error routine.

file upload in Create User Wizard Created User event with UpdatePanel Tag wont work?



In my Create User Wizard1 Created User Wizard Event, I am collecting extra information from text boxes and allowing

the user to uplad a file.



I have put the Submit button within an Update Panel Tag but since I have done this it does not work.

Is there a way round it. In this situation would you use a trigger.?


<br />

  <asp:UpdatePanel ID="UpdatePanel2" runat="server">

  <asp:Button ID="StepNextButton" runat="server"  CommandName="MoveNext"  align="middle"
                                            Text="Submit my Profile" />

Textbox text populated by Session Variable wont update into SQL with new text


Hi everyone, I have what I think is a weird issue. I send text from one page to another via Session Variable. When page 2 loads, the text box has the session text set, but if the user changes the text and clicks the button, the SQL database is update with the original session text. If I remove the redirect from the page 2 button_Click method, then, the page refreshes with the textbox reverting to the session text and thr SQLDataSource has the session text added to it.

Why would the button click cause the textbox refresh with the text from the pageLoad before updating the data source?


Partial Class _1
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Session("UpdateProd") = "Have some text here to send to a textbox on page 2"
    End Sub
End Class

Partial Class _2
    Inherits System.Web.UI.Page


(Imperfect) Solution to TreeView Postback / Client-Side Node Selection Issue


I've seen this question posted on all corners of the web... "How do I disable "AutoPostBack" on the ASP.NET 2.0 TreeView control?!"  Unfortunately, most of the answers either don't work, miss the point (don't work right), or boil down to "You can't do it."  I happen to know that this behavior worked perfectly in the IEWebControls TreeView that Microsoft released as an add-on prior to ASP.NET 2.0, however.  So I set out to find a solution for the ASP.NET 2.0 TreeView issue.

In a nutshell, the behavior that I and others are looking for is to have a TreeView rendered in a page that allows the user to expand, contract, and select nodes within the TreeView without causing a PostBack to the server.  This implies two things: (1) the most recently-selected node should be recorded as the currently-selected node [i.e., at PostBack time, the most-recently selected node is actually represented as the SelectedNode]; and (2) the selected node should exhibit the SelectedNodeStyle as specified in the TreeView declaration.

It appears that the TreeView engineers saw only two possible outcomes from selecting a leaf node in a tree: (1) immediately posting back to the server, or (2) immediately navigating to another web page.  They apparently did not consider option (3) just allowing selection in-place on the client, while waiting for a click on so

How to capture ReportViewer Mouse Events


I have a ReportViewer which I'm pulling into a C# WPF project, and would like to be able to capture the row a user clicks on in the reportViewer, but have had no success tapping into the mouse event handlers.   Does anyone know how to accomplish this?  

This MSDN link seems to imply that ReportViewer(winforms) supports mouse click events such as Click, DoubleClick..etc.  http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.reportviewer_events.aspx, but I've not had any luck.

If mouse events are not currently supported, does anyone know when they will be, and whether properties such as SelectedItem or SelectedIndex would also be exposed?

Thanks for the help.

Issue with Web capture webpart configuration


I have a requirement to display a specific are of page.
I think we can do it by using web capture webpart. when i try to modify the properties of webcapture webpart it prompts an message"Cannot create or modify Web Capture. Make sure that your browser supports ActiveX controls , that you have enabled them, and that you have installed the Web Capture ActiveX control".
I have installed "owc11" coponent but of no use. i am using IE 7...

can anyone please suggest how to solve this issue?


Asp.Net Treeview Drag n Drop


Hello all

How to make asp.net treeview drag and drop enabled on web. I am unable to find any javascript and there is not any event to make treeview drag and drop enabled.

Kindly suggest me how to use drag and drop facility in treeview.

I don't want to use any third party utility.

waiting for reply..........


Thanks in advance

TreeView control:


I want to bind a treeview control so that it display exactly like outlook inbox. How can I do that? 

Note: All data are coming from a single sql table even though you can create to statement to get the child and parent. Please help 

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