473,589 Members | 2,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TreeView control checked based on if records exist

OK, here's my setup. I have a treeview control that is populated with
records from a Product table, and it allows "checking". This is used for my
automatic notification system. Say a particular Product is sold, any users
who have that boxed checked will get a notification. So my (shortened)
database layout is as such:

Product Table
ProductID (PK)
ProductName

User Table (the users of the program)
UserID (PK)
UserName

User_mm_Product Table (keeps track of what users want to me notified of
sales for which products)
UserProductID (PK)
UserID (FK)
ProductID (FK)

So what I have been trying to do is populate a datatable that contains
ProductID, ProductName (this is the only field that shows in the TreeView),
UserID, and UserProductID. It shows one record for each record in the
Product Table (Left outter join). Then I can cycle through each of these
records one at a time - if the item is checked and UserID already exists, do
nothing - if the item is unchecked and UserID is Null, do nothing. If the
item is checked and UserID is Null, I need to INSERT a record into
User_mm_Product . If the item is unchecked and UserID is not null, I need to
delete the record for the current UserProductID.

Anyways, I keep getting a constraint error, probably because its trying to
populate UserID and UserProductID's with Null values when I .Fill the
datatable. Just looking for suggestions if their's an easier way to do this
or if I'm on the right track. Below is the stored procedure I created to
populate the datatable.

Thanks,
Ryan

SELECT P.ProductName, P.ProductID, U.UserID, U.UserProductID

FROM Product AS P LEFT OUTER JOIN

(SELECT ProductID, UserID, UserProductID

FROM User_mm_Product

WHERE (UserID = @UserID)) AS U ON P.ProductID = U.ProductID
Jul 5 '06 #1
7 3670
Ryan,

If you want to use a datatable to update, forget than a select procedure
with a join.

Just select two tables and set them in a dataset. If the dataset has already
its relations in the dataset, than you can use in version 2005 the designer
to create a strongly typed dataset with the wizard for that. The than
created dataset has its constrains and relations.

Without that you can have a look at this example.

http://www.vb-tips.com/default.aspx?...e-a16566bd6c9f

Just guessing but I hope it helps,

Cor

"Ryan" <Ty****@newsgro ups.nospamschre ef in bericht
news:e5******** ******@TK2MSFTN GP04.phx.gbl...
OK, here's my setup. I have a treeview control that is populated with
records from a Product table, and it allows "checking". This is used for
my automatic notification system. Say a particular Product is sold, any
users who have that boxed checked will get a notification. So my
(shortened) database layout is as such:

Product Table
ProductID (PK)
ProductName

User Table (the users of the program)
UserID (PK)
UserName

User_mm_Product Table (keeps track of what users want to me notified of
sales for which products)
UserProductID (PK)
UserID (FK)
ProductID (FK)

So what I have been trying to do is populate a datatable that contains
ProductID, ProductName (this is the only field that shows in the
TreeView), UserID, and UserProductID. It shows one record for each record
in the Product Table (Left outter join). Then I can cycle through each of
these records one at a time - if the item is checked and UserID already
exists, do nothing - if the item is unchecked and UserID is Null, do
nothing. If the item is checked and UserID is Null, I need to INSERT a
record into User_mm_Product . If the item is unchecked and UserID is not
null, I need to delete the record for the current UserProductID.

Anyways, I keep getting a constraint error, probably because its trying to
populate UserID and UserProductID's with Null values when I .Fill the
datatable. Just looking for suggestions if their's an easier way to do
this or if I'm on the right track. Below is the stored procedure I
created to populate the datatable.

Thanks,
Ryan

SELECT P.ProductName, P.ProductID, U.UserID, U.UserProductID

FROM Product AS P LEFT OUTER JOIN

(SELECT ProductID, UserID, UserProductID

FROM User_mm_Product

WHERE (UserID = @UserID)) AS U ON P.ProductID = U.ProductID


Jul 5 '06 #2
Hi Ryan,

Thank you for posting.

I don't think you need to put the two tables Product and User_mm_Product
into one table using join selection.

Instead, you could create a dataset and add two datatables into it. You
may add a data relation between the two datatables in the dataset. Then you
could use the data relation to see whether one record in the parent table
has corresponding records in child table.

Below is the steps of my solution.
1. Create a DataSet(e.g DataSet1) and pull the two tables(Product and
User_mm_Product ) from Server Explorer to the DataSet designer, which will
add two DataTables(Prod uct and User_Product) and two
TableAdapters(P roductTableAdap ter and User_mm_Product TableAdapter).

2. Right-click the User_mm_Product TableAdapter and select Configure
command. In the configuration wizard, add the where clause "where UserID =
@userid" to the select sql statement. Press Finish button.

3. Add a TreeView control(e.g treeView1) and two buttons(e.g button1 and
button2) on a form.

4. Fill the two datatables and populate the treeView1 with the data in the
DataTable Product in the handler for the button1 click event. Insert or
delete records in DataTable User_mm_Product according to the check status
of treenodes in treeView1.

The following is a sample code in the form.

DataSet1 dataset = new DataSet1();

// fill the two datatables and populate the treeView1
private void button1_Click(o bject sender, EventArgs e)
{
DataSet1TableAd apters.ProductT ableAdapter productAdapter = new
DataSet1TableAd apters.ProductT ableAdapter();
productAdapter. Fill(dataset.Pr oduct);

DataSet1TableAd apters.User_Pro ductTableAdapte r
userproductAdap ter = new DataSet1TableAd apters.User_Pro ductTableAdapte r();
userproductAdap ter.Fill(datase t.User_Product, 1);

DataRelation relation = new DataRelation("r elation1",
dataset.Product .Columns["ProductID"],
dataset.User_Pr oduct.Columns["ProductID"]);
dataset.Relatio ns.Add(relation );

ConstructTreeVi ew();
}
// method to populate treeView1
private void ConstructTreeVi ew()
{
this.treeView1. CheckBoxes = true;

TreeNode node;
for (int i = 0; i < dataset.Product .Rows.Count; i++)
{
node = new TreeNode();
node.Text = dataset.Product[i]["ProductID"].ToString() + "
" + dataset.Product[i]["ProductNam e"].ToString();
// assign the value of the ProductID field to the node's Tag
node.Tag = dataset.Product[i]["ProductID"];

if
(dataset.Produc t.Rows[i].GetChildRows(" relation1").Len gth 0)
{
node.Checked = true;
}
else
{
node.Checked = false;
}
this.treeView1. Nodes.Add(node) ;
}
}
// insert or delete data in User_mm_Product table according to
check status in the treeView1
private void button2_Click(o bject sender, EventArgs e)
{
TreeNode node;
for (int i = 0; i < this.treeView1. Nodes.Count; i++)
{
node = this.treeView1. Nodes[i];
if (node.Checked)
{
if
(this.dataset.P roduct.FindByPr oductID(Convert .ToInt32(node.T ag)).GetChildRo w
s("relation1"). Length == 0)
{
// add your code to insert a new record in
User_mm_Product
}
}
else
{
if
(this.dataset.P roduct.FindByPr oductID(Convert .ToInt32(node.T ag)).GetChildRo w
s("relation1"). Length 0)
{
// add your code to delete the record in
Use_mm_Product
}
}
}
}

Hope this helps.
If you have anything unclear, please don't hesitate to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =============== =============== =
=============== =============== ===============
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.

=============== =============== =============== =============== =============== =
=============== =============== ===============
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 6 '06 #3
Linda,

I assume this was by accident but your code does not compile in by instance
Visual Basic Express.

:-)

Cor

"Linda Liu [MSFT]" <v-****@online.mic rosoft.comschre ef in bericht
news:VW******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hi Ryan,

Thank you for posting.

I don't think you need to put the two tables Product and User_mm_Product
into one table using join selection.

Instead, you could create a dataset and add two datatables into it. You
may add a data relation between the two datatables in the dataset. Then
you
could use the data relation to see whether one record in the parent table
has corresponding records in child table.

Below is the steps of my solution.
1. Create a DataSet(e.g DataSet1) and pull the two tables(Product and
User_mm_Product ) from Server Explorer to the DataSet designer, which will
add two DataTables(Prod uct and User_Product) and two
TableAdapters(P roductTableAdap ter and User_mm_Product TableAdapter).

2. Right-click the User_mm_Product TableAdapter and select Configure
command. In the configuration wizard, add the where clause "where UserID =
@userid" to the select sql statement. Press Finish button.

3. Add a TreeView control(e.g treeView1) and two buttons(e.g button1 and
button2) on a form.

4. Fill the two datatables and populate the treeView1 with the data in
the
DataTable Product in the handler for the button1 click event. Insert or
delete records in DataTable User_mm_Product according to the check status
of treenodes in treeView1.

The following is a sample code in the form.

DataSet1 dataset = new DataSet1();

// fill the two datatables and populate the treeView1
private void button1_Click(o bject sender, EventArgs e)
{
DataSet1TableAd apters.ProductT ableAdapter productAdapter = new
DataSet1TableAd apters.ProductT ableAdapter();
productAdapter. Fill(dataset.Pr oduct);

DataSet1TableAd apters.User_Pro ductTableAdapte r
userproductAdap ter = new DataSet1TableAd apters.User_Pro ductTableAdapte r();
userproductAdap ter.Fill(datase t.User_Product, 1);

DataRelation relation = new DataRelation("r elation1",
dataset.Product .Columns["ProductID"],
dataset.User_Pr oduct.Columns["ProductID"]);
dataset.Relatio ns.Add(relation );

ConstructTreeVi ew();
}
// method to populate treeView1
private void ConstructTreeVi ew()
{
this.treeView1. CheckBoxes = true;

TreeNode node;
for (int i = 0; i < dataset.Product .Rows.Count; i++)
{
node = new TreeNode();
node.Text = dataset.Product[i]["ProductID"].ToString() + "
" + dataset.Product[i]["ProductNam e"].ToString();
// assign the value of the ProductID field to the node's Tag
node.Tag = dataset.Product[i]["ProductID"];

if
(dataset.Produc t.Rows[i].GetChildRows(" relation1").Len gth 0)
{
node.Checked = true;
}
else
{
node.Checked = false;
}
this.treeView1. Nodes.Add(node) ;
}
}
// insert or delete data in User_mm_Product table according to
check status in the treeView1
private void button2_Click(o bject sender, EventArgs e)
{
TreeNode node;
for (int i = 0; i < this.treeView1. Nodes.Count; i++)
{
node = this.treeView1. Nodes[i];
if (node.Checked)
{
if
(this.dataset.P roduct.FindByPr oductID(Convert .ToInt32(node.T ag)).GetChildRo w
s("relation1"). Length == 0)
{
// add your code to insert a new record in
User_mm_Product
}
}
else
{
if
(this.dataset.P roduct.FindByPr oductID(Convert .ToInt32(node.T ag)).GetChildRo w
s("relation1"). Length 0)
{
// add your code to delete the record in
Use_mm_Product
}
}
}
}

Hope this helps.
If you have anything unclear, please don't hesitate to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =============== =============== =
=============== =============== ===============
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.

=============== =============== =============== =============== =============== =
=============== =============== ===============
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 6 '06 #4
Hi Cor,

Ok, I will provide a sample code written in VB.NET.

Dim dataset As DataSet1 = New DataSet1()

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim productAdapter As DataSet1TableAd apters.ProductT ableAdapter =
New DataSet1TableAd apters.ProductT ableAdapter()
productAdapter. Fill(dataset.Pr oduct)

Dim userproductAdap ter As
DataSet1TableAd apters.User_Pro ductTableAdapte r = New
DataSet1TableAd apters.User_Pro ductTableAdapte r()
userproductAdap ter.Fill(datase t.User_Product, 1)

Dim relation As DataRelation = New DataRelation("r elation1",
dataset.Product .Columns("Produ ctID"),
dataset.User_Pr oduct.Columns(" ProductID"))
dataset.Relatio ns.Add(relation )

PopulateTreeVie w()

End Sub

Private Sub PopulateTreeVie w()
TreeView1.Check Boxes = True

Dim node As TreeNode
For i As Integer = 0 To dataset.Product .Rows.Count - 1
node = New TreeNode()
node.Text = dataset.Product .Rows(i)("Produ ctID").ToString () & "
" & _
dataset.Product .Rows(i)("Produ ctName").ToStri ng()
node.Tag = dataset.Product .Rows(i)("Produ ctID")

If (dataset.Produc t.Rows(i).GetCh ildRows("relati on1").Length >
0) Then
node.Checked = True
Else
node.Checked = False
End If

TreeView1.Nodes .Add(node)
Next
End Sub

Private Sub Button2_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button2.Click
Dim node As TreeNode
For i As Integer = 0 To TreeView1.Nodes .Count - 1
node = TreeView1.Nodes (i)
If (node.Checked) Then
If (dataset.Produc t.FindByProduct ID(CType(node.T ag,
Int32)).GetChil dRows("relation 1").Length = 0) Then
' add your code to insert a new record into
User_mm_Product table
End If
Else
If (dataset.Produc t.FindByProduct ID(CType(node.T ag,
Int32)).GetChil dRows("relation 1").Length 0) Then
' add your code to delete the record in User_mm_Product
table
End If
End If
Next
MessageBox.Show (message)

End Sub

Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =============== =============== =
=============== =============== ===============
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.

=============== =============== =============== =============== =============== =
=============== =============== ===============
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 6 '06 #5
Linda,

Even that this is codetranslator translated C# code, it this confirm the
standard of the newsgroup.

To take one what I mean.
>Dim userproductAdap ter As
DataSet1TableA dapters.User_Pr oductTableAdapt er = New
DataSet1TableA dapters.User_Pr oductTableAdapt er()
Dim userproductAdap ter As New DataSet1TableAd apters.User_Pro ductTableAdapte r

:-)

However there is (probably I did not check it) nothing wrong with the code
you are suplying.

Thanks,

Cor
"Linda Liu [MSFT]" <v-****@online.mic rosoft.comschre ef in bericht
news:Pj******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hi Cor,

Ok, I will provide a sample code written in VB.NET.

Dim dataset As DataSet1 = New DataSet1()

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim productAdapter As DataSet1TableAd apters.ProductT ableAdapter =
New DataSet1TableAd apters.ProductT ableAdapter()
productAdapter. Fill(dataset.Pr oduct)

Dim userproductAdap ter As
DataSet1TableAd apters.User_Pro ductTableAdapte r = New
DataSet1TableAd apters.User_Pro ductTableAdapte r()
userproductAdap ter.Fill(datase t.User_Product, 1)

Dim relation As DataRelation = New DataRelation("r elation1",
dataset.Product .Columns("Produ ctID"),
dataset.User_Pr oduct.Columns(" ProductID"))
dataset.Relatio ns.Add(relation )

PopulateTreeVie w()

End Sub

Private Sub PopulateTreeVie w()
TreeView1.Check Boxes = True

Dim node As TreeNode
For i As Integer = 0 To dataset.Product .Rows.Count - 1
node = New TreeNode()
node.Text = dataset.Product .Rows(i)("Produ ctID").ToString () & "
" & _
dataset.Product .Rows(i)("Produ ctName").ToStri ng()
node.Tag = dataset.Product .Rows(i)("Produ ctID")

If (dataset.Produc t.Rows(i).GetCh ildRows("relati on1").Length >
0) Then
node.Checked = True
Else
node.Checked = False
End If

TreeView1.Nodes .Add(node)
Next
End Sub

Private Sub Button2_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button2.Click
Dim node As TreeNode
For i As Integer = 0 To TreeView1.Nodes .Count - 1
node = TreeView1.Nodes (i)
If (node.Checked) Then
If (dataset.Produc t.FindByProduct ID(CType(node.T ag,
Int32)).GetChil dRows("relation 1").Length = 0) Then
' add your code to insert a new record into
User_mm_Product table
End If
Else
If (dataset.Produc t.FindByProduct ID(CType(node.T ag,
Int32)).GetChil dRows("relation 1").Length 0) Then
' add your code to delete the record in User_mm_Product
table
End If
End If
Next
MessageBox.Show (message)

End Sub

Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =============== =============== =
=============== =============== ===============
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.

=============== =============== =============== =============== =============== =
=============== =============== ===============
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 6 '06 #6
Thanks for the code, Linda. I think I can simplify it by creating the
dataset using the designer during design-time, but this makes a lot of
sense. I've probably been getting carried away creating views and stored
procedures on the SQL backend where I could do the same just by taking a
look at the data existing in the dataset.

Ryan

"Linda Liu [MSFT]" <v-****@online.mic rosoft.comwrote in message
news:Pj******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hi Cor,

Ok, I will provide a sample code written in VB.NET.

Dim dataset As DataSet1 = New DataSet1()

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim productAdapter As DataSet1TableAd apters.ProductT ableAdapter =
New DataSet1TableAd apters.ProductT ableAdapter()
productAdapter. Fill(dataset.Pr oduct)

Dim userproductAdap ter As
DataSet1TableAd apters.User_Pro ductTableAdapte r = New
DataSet1TableAd apters.User_Pro ductTableAdapte r()
userproductAdap ter.Fill(datase t.User_Product, 1)

Dim relation As DataRelation = New DataRelation("r elation1",
dataset.Product .Columns("Produ ctID"),
dataset.User_Pr oduct.Columns(" ProductID"))
dataset.Relatio ns.Add(relation )

PopulateTreeVie w()

End Sub

Private Sub PopulateTreeVie w()
TreeView1.Check Boxes = True

Dim node As TreeNode
For i As Integer = 0 To dataset.Product .Rows.Count - 1
node = New TreeNode()
node.Text = dataset.Product .Rows(i)("Produ ctID").ToString () & "
" & _
dataset.Product .Rows(i)("Produ ctName").ToStri ng()
node.Tag = dataset.Product .Rows(i)("Produ ctID")

If (dataset.Produc t.Rows(i).GetCh ildRows("relati on1").Length >
0) Then
node.Checked = True
Else
node.Checked = False
End If

TreeView1.Nodes .Add(node)
Next
End Sub

Private Sub Button2_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button2.Click
Dim node As TreeNode
For i As Integer = 0 To TreeView1.Nodes .Count - 1
node = TreeView1.Nodes (i)
If (node.Checked) Then
If (dataset.Produc t.FindByProduct ID(CType(node.T ag,
Int32)).GetChil dRows("relation 1").Length = 0) Then
' add your code to insert a new record into
User_mm_Product table
End If
Else
If (dataset.Produc t.FindByProduct ID(CType(node.T ag,
Int32)).GetChil dRows("relation 1").Length 0) Then
' add your code to delete the record in User_mm_Product
table
End If
End If
Next
MessageBox.Show (message)

End Sub

Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =============== =============== =
=============== =============== ===============
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.

=============== =============== =============== =============== =============== =
=============== =============== ===============
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 6 '06 #7
Hi Ryan,

Thank you for your update.

Yes, you could simplify it by creating the DataSet and the data relation
using the designer during design-time.

I think it is a easier way to make use of DataSet and data relation in your
case.

If you have any other questions, please don't hesitate to contact us. It's
always our pleasure to be of assistance.

Have a nice day!
Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =============== =============== =
=============== =============== ===============
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.

=============== =============== =============== =============== =============== =
=============== =============== ===============
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 7 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
821
by: feel | last post by:
Goin' crazy with this recursive function ported from delphi... I send a string like DirA/ DirB /DirC but i get in the treeView each one in a new node.Cant get the child node....!! -DirA -DirB -DirC instead of: DirA | - DirB
2
2403
by: Srinivasa Raghavan | last post by:
Hi I am using ASP Tree View Control to display data in hiearchy fashion.I am having a checkbox next to the TreeView Node.When user checks or unchecks the nodes and click a button i am putting that count in a stringcollection which is in viewstate.The count is wrong after certain checks and click of the button.can any one explain what could be wrong.
1
2168
by: Srinivasa Raghavan | last post by:
Hi All, I have some doubts on the Treeview control and Form Authentication 1) will Form Authentication work if cookies are disabled. 2) I have problem in the following code (TreeView Control with checkbox)
8
12744
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the form. I only want to allow single selection, so using checkboxes is out of the question. It works as is, but it makes the form very cumbersome if every time that a user selects a node, the whole page has to reload. Is there a way to have a node...
3
2496
by: rolf.oltmans | last post by:
Hello, I need to populate a TreeView control from SortedList(Winforms application). I've stored ID's as key and Nodes as value. A typical TreeView in my case would like like 1 Goal 1.1 Task1 1.2Task2 1.2.1 Goal1
2
1568
by: rolf.oltmans | last post by:
Hello all, I need to place treeview control in Grid control. I need to place it in a grid because I need to show calendar against every node. Is placing a treeview in grid possible? If I need to create my own control that would include capabilities of both treeview and Grid what would I have to do? Being new to asp.net I guess I've to make a control that would inherit from treeview and grid. But would changes I've to make in my...
0
1982
by: noneya22 | last post by:
I want to use a TreeView control as a one-level, vertical navigation menu. I'm using this control currently with a SiteMapDataSource and .sitemap file. I've written code that associates an image with each TreeView node based upon a custom attribute I have included in the siteMapNode nodes of my .sitemap file. This all works as desired, including the security trimming which is especially desired behavior. The nodes of the TreeView...
2
4255
by: Ed Dror | last post by:
Hi there, Based on Microsoft ASP.NET SDK treeview control binding to northwind database (Categoried, Products) I added the following code Protected Sub TreeView1_SelectedNodeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TreeView1.SelectedNodeChanged Me.TreeView1.SelectedNode.NavigateUrl = Me.TreeView1.SelectedNode.Text + ".aspx"
0
3294
by: divya1949 | last post by:
Create a windows c# application which will Read a xml file and populate nodes in the treeview. 1 On selection of treenode display the child nodes of that node in listview control 2. Provide following view properties to listview, through View menu a. Tile b. Icon
0
7865
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8233
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
6637
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5731
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3849
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3889
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2374
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1461
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1198
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.