mpatram 0 Newbie Poster

Hi All,

I m working on a TabControl in Vb.Net. Its having 4 tabpages. like Tab1, Tab2, Tab3, Tab4. On Tab1 I m having a checkBox.

My requirement is when checkBox.Checked=True it will enable the Tab2. How can I go for this?

Note: I m not selecting the Tab2


Plz give me few sugestion

Thanks

mpatram 0 Newbie Poster

Hi All,

I m working on a vb.net application. Having a form with treeview & datagrid control. My requirement is that I'll populate the treeview control from a SQL server table. I made this one.

The next task is to populate the datagrid control (another SQL Server Table) from a TreeNode Selection. I m not able to find any solution for this. can any one plz help me.

My code for populating the treeview from sql server table is given below

in Form_load
Dim strConn As String = "Server=BACKUPAEC;Database=DASE;Trusted_Connection=yes;" 'Connection String
Dim objConn As New SqlConnection(strConn) 'Conection Object

'Dataset Objects
Dim objDS As New DataSet
Dim objDS1 As New DataSet

'DataAdapters
Dim daMEquip1 As New SqlDataAdapter("SELECT distinct GroupName FROM MasterEquipmentConfig", objConn)
Dim daMEquip2 As New SqlDataAdapter("SELECT GroupName, EquipmentName, EquipmentID FROM MasterEquipmentConfig", objConn)

'Fill Dataset
daMEquip1.Fill(objDS, "MasterEquipmentConfig")
daMEquip2.Fill(objDS1, "MasterEquipmentConfig")

objConn.Close() 'Close Connection

Dim nodeGroup, nodeEquip As TreeNode
Dim rowGroup, rowEquip As DataRow

For Each rowGroup In objDS.Tables("MasterEquipmentConfig").Rows
nodeGroup = New TreeNode
nodeGroup.Text = rowGroup("GroupName")
nodeGroup.ForeColor = Color.Blue
TreeView1.Nodes.Add(nodeGroup)


For Each rowEquip In objDS1.Tables("MasterEquipmentConfig").Rows
If rowGroup("GroupName") = rowEquip("GroupName") Then
nodeEquip = New TreeNode
nodeEquip.Text = rowEquip("EquipmentName")
nodeGroup.Nodes.Add(nodeEquip)
End If
Next
Next

objDS.Dispose()
objDS1.Dispose()
daMEquip1.Dispose()
daMEquip2.Dispose()
objConn.Close()
objConn.Dispose()

mpatram 0 Newbie Poster

Hi All,

I m working on a vb.net application. Having a form with treeview & datagrid control. My requirement is that I'll populate the treeview control from a SQL server table. I made this one.

The next task is to populate the datagrid control (another SQL Server Table) from a TreeNode Selection. I m not able to find any solution for this. can any one plz help me.

My code for populating the treeview from sql server table is given below

in Form_load
Dim strConn As String = "Server=BACKUPAEC;Database=DASE;Trusted_Connection=yes;" 'Connection String
Dim objConn As New SqlConnection(strConn) 'Conection Object

'Dataset Objects
Dim objDS As New DataSet
Dim objDS1 As New DataSet

'DataAdapters
Dim daMEquip1 As New SqlDataAdapter("SELECT distinct GroupName FROM MasterEquipmentConfig", objConn)
Dim daMEquip2 As New SqlDataAdapter("SELECT GroupName, EquipmentName, EquipmentID FROM MasterEquipmentConfig", objConn)

'Fill Dataset
daMEquip1.Fill(objDS, "MasterEquipmentConfig")
daMEquip2.Fill(objDS1, "MasterEquipmentConfig")

objConn.Close() 'Close Connection

Dim nodeGroup, nodeEquip As TreeNode
Dim rowGroup, rowEquip As DataRow

For Each rowGroup In objDS.Tables("MasterEquipmentConfig").Rows
nodeGroup = New TreeNode
nodeGroup.Text = rowGroup("GroupName")
nodeGroup.ForeColor = Color.Blue
TreeView1.Nodes.Add(nodeGroup)


For Each rowEquip In objDS1.Tables("MasterEquipmentConfig").Rows
If rowGroup("GroupName") = rowEquip("GroupName") Then
nodeEquip = New TreeNode
nodeEquip.Text = rowEquip("EquipmentName")
nodeGroup.Nodes.Add(nodeEquip)
End If
Next
Next

objDS.Dispose()
objDS1.Dispose()
daMEquip1.Dispose()
daMEquip2.Dispose()
objConn.Close()
objConn.Dispose()

mpatram 0 Newbie Poster

Hi All,

I m working on a vb.net application. Having a form with treeview & propertygrid control. My requirement is that I'll populate the treeview control from a SQL server table. I made this one.

The next task is to populate the propertygrid from another sql server table by selecting the child nodes of treeview. I m not able to find any solution for this. can any one plz help me.

My code for populating the treeview from sql server table is given below

in Form_load

Dim strConn As String = "server=HOME\SQLEXPRESS;database=Li2ns;integrated security=true;"
Dim objConn As New SqlConnection(strConn)
Dim objDS As New DataSet

Dim daSuppliers As New SqlDataAdapter("SELECT CompanyName,SupplierID FROM Supply", objConn)
Dim daProducts As New SqlDataAdapter("SELECT ProductName, ProductID, SupplierID FROM Products", objConn)

daSuppliers.Fill(objDS, "Supply")
daProducts.Fill(objDS, "Products")

objConn.Close()

objDS.Relations.Add("SuppToProd", objDS.Tables("Supply").Columns("SupplierID"), objDS.Tables("Products").Columns("SupplierID"))

Dim nodeSupp, nodeProd As TreeNode
Dim rowSupp, rowProd As DataRow

For Each rowSupp In objDS.Tables("Supply").Rows
nodeSupp = New TreeNode
nodeSupp.Text = rowSupp("CompanyName")
' nodeSupp.ID = rowSupp("SupplierID")
TreeView1.Nodes.Add(nodeSupp)

For Each rowProd In rowSupp.GetChildRows("SuppToProd")
nodeProd = New TreeNode
nodeProd.Text = rowProd("ProductName")
'nodeProd.ID = rowProd("ProductID")
nodeSupp.Nodes.Add(nodeProd)
Next
Next

'clean up
objDS.Dispose()
daSuppliers.Dispose()
daProducts.Dispose()
objConn.Close()
objConn.Dispose()

Plz help me to solve the second task......

Thanks & Regards
MPatra
India

mpatram 0 Newbie Poster

Hi All,

I've form with two controls, one TreeView & one PropertyGrid. The treeview displays the list of equipments. when I select any node from the treeview i.e. any name from the list of equipments, then the property grid will dispaly all the attributes of that selected equipment. The property grid will retrive the selected equipments attributes from a table known as attribute table. Where user can manipulate the attributes. There is a button control named "SAVE". when user clicks on the "SAVE" button the manipulated attribute will be stored into the table.

I can able to find any solution how to link the treeview, propertygrid & database.

Can anybody plz help me.

I m trying it in VB.Net & SQL Server2005.


Thanks & Regards
Madhusudan

mpatram 0 Newbie Poster

Hi All,

I've created a registration form in VB.Net. Now I want to validate it, like if the username is previously used by some one then it wont allow to register. I can do it in ASP.Net, But I m not able to find any solution for VB.Net. If any body have any code snnipet then plz send me or give me few suggestion.

Thanks
M

mpatram 0 Newbie Poster

Yes, Bocz VB2005 express edition is fully supporting the AutoCAD programming.....

mpatram 0 Newbie Poster

Hi All,

I want to know how to start the VB.Net programming for AutoCAD customization? My requirement is I've to develope some GUI screens where the user will provide all the inputs which is needed to draw a layout. The GUI screen also caontains some user controls which I can say a template / subassembly. Generally they are some common schemes used to draw every layout. At last the user will get his/her output in AutoCAD i.e. the output is an AutoCAD drawing.

mpatram 0 Newbie Poster

Hi All,

I've some excel programs. I want to attach those programs to my vb.net application. Is it possible? If yes then How? If its possible then can the excel file be editable?