I have 2 tables in a SQL database, Categories and SubCategories. I want a treeview to be constructed from them basically Categories being the parent nodes and SubCategories being the child nodes. I want the user to add a new node, add a new child node to an existing parent node, also delete a...
Hi I have the following code
Dim cb As New SqlCommandBuilder(_sqladapter)
_sqladapter.UpdateCommand = cb.GetUpdateCommand()
_sqladapter.InsertCommand = cb.GetInsertCommand()
_sqladapter.DeleteCommand = cb.GetDeleteCommand()
_sqladapter.Update(_dataset.Tables(_tablename))
the above code works...
I have one datatable say DataTable1 that has some rows of data. DataTable2 also has some rows of data (less than or equal to DataTable1 rows). I need to delete those rows from DataTable1 which are already present in DataTable2 is there a simple way to do that?
I have to listboxes The use select items from first list box and then clicks on one button and they are removed from the first listbox and added to the second one. I was trying the following code
Dim item As control
For Each item In ListBox1.SelectedItems
'If item.Selec Then...
I have a datagrid that has a right click menu to remove certain items from the grid. When someone right clicks on the grid and selects this menu item, the CurrentRowSelected for the grid comes back as 0. If I click on any item in the grid then do a right click remove company then it works. Is...
I have a text box named txtName I have a label corresponding to it named lbl_txtName. I have a much wider collection of such items. BAsically what I want to do is if the user doesnt enter anything in the textbox, then label text lbl_<NAME OF THE CONTROL> should be made red. I look through my...
I always forget how to do this. Does someone know how to format a datagrid at design time with all the formatting and then at run time just supply a datasource to it?
What is the event to identify the change of text in a datagrid cell? Also how does it work? does it compare the old value and new value or even if one character is changed it will fire the event?
I have a datagrid in which the user can change any data. I also have a save button which when pressed I execute the following code
Dim cb As New SqlCommandBuilder(_sqladapter)
_sqladapter.UpdateCommand = cb.GetUpdateCommand
_sqladapter.Update(dataSet.Tables(_tablename))
When I move out from...
I have a datagrid and I have implemented the on click as
Private Sub grdDataGrid1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles grdDataGrid1.Click
'Some code here
End Sub
now whenever I click on the datagrid the clicks are registered randomly. Not every...
Is it possible to add a custom property to the MenuItem something called as say FunctionName where I am going to store a function name to be executed when the button is clicked.?
If not then I will maintain a array where I can store the menu name and function name. Is it possible to get a...
I wish to set focus to a control (may be textbox, combobox, listbox etc) in a form. I wish to do this by the control name so basically something like
GetControl(ControlName).Focus()
is there a function to do that?
Hi,
Is there a menu object in VB.net which I can loop through and decide which menu item is to be shown to the user (Depending on the access) on the main window?
Adwait
I have added the following property to a Custom Form Control. However I get an error called "Object reference not set to an instance of an object." when I see the HasErrors property in the Property Window. I think it has to do with the ErrorMessages array and ErrorMessage.Length function because...
If I have a structure
Structure ABC
Dim A As Integer
Dim B As Integer
Dim C As String
End Structure
Dim _struct() As Structure
Instead of saying
_struct(0).A = 1
_struct(0).B = 1
_struct(0).C = "Value"
How can I say something like
_struct(0) = (1, 1, "Value") (this syntax gives...
While binding data for a listbox or combobox, we use the DisplayValue and DisplayMember method. Instead of specifying column names in the datatable, can I specify column indices?
For example is it possible to say
ListBox1.DisplayMember = 0
ListBox1.ValueMember = 1
instead of...
I am new to .net. As far as I know all the functions are virtual (by default) in VB .net. If I want a few functions not to be virtual, what do I need to do? Also do I need to specify "overrides" for a virtual function in VB .net ?
I am sorry I am new to vb.net I am working on some code written in C# I check for some variables if they are null. In vb I used to use variable = vbNull in C# I am using IsNull(Variable) but vb.net doesnt have the IsNull. Instead the IDE tells me to use IsDBNull is this same as IsNull? Or whats...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.