Search results for query: *

  1. A

    Treeview Control bound to a sqladapter

    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...
  2. A

    sql adapter transaction problem

    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...
  3. A

    Delete rows from datatable based on another datatable

    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?
  4. A

    ListBox Question

    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...
  5. A

    datagrid right click menu

    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...
  6. A

    Change text color to bold

    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...
  7. A

    Format DataGrid at design time

    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?
  8. A

    Data grid on cell text change event

    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?
  9. A

    SqlDataAdapter Update Does not work

    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...
  10. A

    DataGrid on Click

    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...
  11. A

    Editable Grid

    How can I create a editable data grid in vb.net?
  12. A

    Custom Property in MenuItem

    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...
  13. A

    Get a control handle by control name

    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?
  14. A

    Menu Object in VB.net

    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
  15. A

    Object reference not set to an instance of an object.

    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...
  16. A

    Structures

    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...
  17. A

    DisplayMember and ValueMember

    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...
  18. A

    Virtual Functions in VB.net

    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 ?
  19. A

    IsNull 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...
Back
Top