View Complete Post
Hi,
Most of you probably know the excellent MVVM WPF TreeView article by Josh Smith (http://www.codeproject.com/KB/WPF/TreeViewWithViewModel.aspx).
Using the Family Tree demo (Text Search), can someone explain me how to bind a control's property (let's say, a TextBlock's Text property) to the selected item's Name property (PersonViewModel.Name) in the treeview? In essence, if the user clicks on "Sarah Applifunk", the TextBlock would show "Sarah Applifunk". Then if the user clicks on Maurice Winkleford, the TextBlock would update as such.
Of course I would like the TextBlock to look somehow like this:
<TextBlock Text="{Binding SelectedPerson.Name}" />
This *used* to work in my application using the IsSynchronizedWithCurrentItem="True" using lists, but the TreeView is somewhat more complex, isn't it?
Joe
I'm using cssfriendly control adapter for menu. My asp.net menu control's datasource is a sitemap file I'm using which contains all the urls.
I have the following questions:
Please help!
Thanks,
Moneka
Visual Studio 2005 introduces a new model that lets you define your own project templates and starter kits, something developers have been requesting for some time. Here Matt Milner shows you how to consume, create, and customize these templates.
Matt Milner
MSDN Magazine January 2006
I want to apply a css class to the level 1 menu item (parent) when it or any or it's children are selected.
I've looked at MSDN documentation and any number of examples and walkthroughs but I haven't come up with a way of managing this. I was thinking something like this might work but the style is not being applied to the parent. To further complicate matters, if I try to apply a css style to StaticSelectedStyle it doesn't pick it up at all.
Menu Markup:
<StaticSelectedStyle Font-Bold="True" ForeColor="#3333CC" />
Code Behind:
protected void MenuItemClick_NavMenu(Object sender, MenuEventArgs e)
{
MenuItem parentItem = e.Item.Parent;
if (parentItem != null)
parentItem.Selected = true;
}
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) { &nb
Hello,
I am wanting to create a dashboard page with several data view web parts which dynamically populate depending on what item is selected in a separate web part (drop down form or just a list of links). Can someone please point me to a tutorial or documentation on how to pass data between web parts or to a DVWP? I have searched for a few hours and not been able to find anything useful.
Jon
I am trying to do this with many issues of data binding doubling the amount and not setting selectedValue on dropdownlist. I have read some posts and they help but I am missing a crucial piece. My problem is that my dropdownlist is doubling the amount of records for the dropdownlist. Instead of "YES;NO;SELECT A VALUE", I am getting "YES;NO;SELECT A VALUE;YES;NO;YES;NO". My database is correct with the UPDATE part but the rebind after update is failing horribly.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If IsPostBack Then If Session("ACTIVETAB").ToString() = Session("SUBCONTRACTSATABNO").ToString() Then BindData() End If Else End If End Sub Public Function loadlookups(ByVal id As String, ByVal e As System.Web.UI.WebControls.ListViewItemEventArgs) As DataTable Select Case id Case "ddlCertReceived" dt = GetLookupTable("SubcontractsA", "Sub 1 Cert Received") Dim ddlCertReceived As DropDownList = _ CType(e.Item.FindControl("ddlCertReceived"), DropDownList) ddlCertReceived.DataSource = dt ddlCertReceived.DataTextField = "lup_text"
hi,
i hope i can explain this the right way.
i'm using sharepoint services 3.0 and sharepoint designer
i have to create this senario:
the employee need to fill in a new item form to request for absence or vacation days.
for this i use the Absence and Vacation Schedule template. a good one!
but the thin is i have to modify the "new item form" that when the user open the "new item form" it has to get the id from the employe and join it to the id of his manager. so when the employee fill in the form it can only go to the employe his manager for approval. the purpose for this senario is that the employee dont get a chance to send his request to another manager or to the HR department without an aproval.
is there a workflow for it. or how can i join the employee id with the manager id?
and how can i create a web part that counts the vacation days of an employe and also display how many days he has left so he knows how many days he can request for?
hope some1 can help me with this
thnx
Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend