Hi,
i am new to C#,
i have a multiselection treeview, where if i select a nodes with ctrl and shift corresponding nodes will be copied to another treenode,
i want to unselect the childnode selection with ctrl and shift if parent node is selected.
i think of disablin the mouse click event inside that treenode if parent node is selected?
[code=c]
private void treeViewMS1_Aft erSelect(object sender, TreeViewEventAr gs e)
{
MyKeyEvent kEv = new MyKeyEvent();
bool kControl2 = (ModifierKeys == Keys.Control);
bool kShift2 = (ModifierKeys == Keys.Shift);
bool mClick = (MouseButtons == MouseButtons.Le ft);
// bool parent =IsP
if (e.Node.Text == "WeldDataFi le")
{
if ((kControl2) && (mClick))
{
// OnKeyAction(thi s, kEv);
//Here i have to disable mouse event till i copy that selected node to another treeview
}
else if ((kShift2) && (mClick))
{
//OnKeyAction(thi s, kEv);
//Here i have to disable mouse event till i copy that selected node to another treeview
}
}
}
[/code]
Can anybody plz help me in this regards, its urgent
i am new to C#,
i have a multiselection treeview, where if i select a nodes with ctrl and shift corresponding nodes will be copied to another treenode,
i want to unselect the childnode selection with ctrl and shift if parent node is selected.
i think of disablin the mouse click event inside that treenode if parent node is selected?
[code=c]
private void treeViewMS1_Aft erSelect(object sender, TreeViewEventAr gs e)
{
MyKeyEvent kEv = new MyKeyEvent();
bool kControl2 = (ModifierKeys == Keys.Control);
bool kShift2 = (ModifierKeys == Keys.Shift);
bool mClick = (MouseButtons == MouseButtons.Le ft);
// bool parent =IsP
if (e.Node.Text == "WeldDataFi le")
{
if ((kControl2) && (mClick))
{
// OnKeyAction(thi s, kEv);
//Here i have to disable mouse event till i copy that selected node to another treeview
}
else if ((kShift2) && (mClick))
{
//OnKeyAction(thi s, kEv);
//Here i have to disable mouse event till i copy that selected node to another treeview
}
}
}
[/code]
Can anybody plz help me in this regards, its urgent
Comment