Multiple DataGrids On One Form?

Oct 6, 2009

I'm developing a Windows Forms app that will be used to update information on 2 database tables.The 2 tables are related, so the ID fields in them will correspond. In the app, I'm using 2 DataGridView controls. THe first (Status Rules) is DataBound to a DataSet and visible when the application loads. The other (Status Flags) is empty and hidden. The user will select an ID field from the RulesGrid which will fire up a connection to the database and display the entry in the Status_Flags table that has the same ID as the value of the cell the user clicked.I thought of using a standard conditional SELECT statement to do this, but the Flags grid isn't displaying any data. My code Follows:

Private Sub RulesGrid_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles RulesGrid.CellClick
Dim conn As New SqlConnection('ConnectionString)
Dim sql As String = "SELECT * FROM ctblMKA_Status_Flags WHERE intStatusID = '" & RulesGrid.CurrentCell.Value & "'"[code].....

View 3 Replies


ADVERTISEMENT

Multiple Datagrids Filtering On Selection?

Mar 22, 2009

this is the wrong forum because I am quite new to this :S and I am actually unsure what this fits under. I am using Visual Studio 2008 windows form in .vb so I am taking a guess at it being Visual Basic 6.0Well the question is this. On a form I have 3 Datagrids. The first one shows information about a case including client name and ID. The second shows a table that contains all the jobs registered to the company by the clients. lient can have up to 8 Jobs. The third is a list of all case numbers that clients have

View 4 Replies

Updating Link Table With Values From Multiple DataGrids

May 1, 2009

I am trying to update a link table with values from multiple datagrids, the field types in the link table are numbers and the value selected from the datagrids are also numbers. I am getting the following error:
The OleDbParameterCollection only accepts non-null OleDbParameter type objects, not String objects.
In line : cmdCompany.Parameters.Add("@COMPANY_ID")

Dim ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|aop29.mdb"
Dim cmdCompany As OleDbCommand
Dim cmdReceiver As OleDbCommand
Dim CompanySQL As String
[Code] .....

View 7 Replies

Accommodate Two Datagrids From Two Different Tables On Same Form?

Aug 25, 2009

how to accommodate two datagrids from two different tables on same form as only one binding navigator bar is shown on the top of the form.

View 4 Replies

VS 2005 Pick Up All Datagrids In A Form?

Feb 18, 2010

I have lots of datagrids on one form. However, the datagrid controls are all on different tabpages and tablelayoutpanels.

How can i programmatically "pick" up all the datagrid in one form, even though they are child controls of other controls?

[Code]...

View 1 Replies

VS 2010 Parent-Child Form Using DataGrids

Aug 5, 2011

I am trying to create a simple parent-child form in VB2010. I use a datagridview for each table/datasource and each is bound to the parent/child table and each table grid fills correctly. What I want is the parent-child relation to enforce filling the child table with only rows that fulfill the current row on the parent. I have created a DataRelation in the form load, but it will not permit a relation between tables in 2 different datasets. If I attempt to place both tables in a single dataset and define the PK-FK relation in the SQL Server I cannot create 2 separate datagrids from the same dataset.

View 2 Replies

Open A Form Built In Datagrids It Connects Again To The Development DB

Jul 28, 2009

I am working with two databases stored in SQL server 2005, with VB.Net 2005. Database 1 - is the DevelopmentDB and Database 2 - LiveDB. I have two front-ends one connecting to the DevelopmentDB and the other connecting to the LIVEDB.

Now, I have a problem with the live front end. After publishing, it accepts me to log on with the Live username and password..(it connects to the LiveDB) Note: The two front ends i.e., for Development and Live have different usernames and passwords.
So, I get connected to LiveDB, however, when I open a form built in Datagrids it connects again to the DevelopmentDB.I have checked the connection strings its connecting to the Live. This is not an application or database problem. The reason being I tested it on another PC and when I logged on with my credentials it was fine. I was connected to the live database and all the forms were displaying accurate data. Therefore, my conclusion is that this is not the front end or backend problem.

View 7 Replies

.net - CSV Export Class For Datagrids In Silverlight

May 5, 2012

I have been trying to export some datagrids in Silverlight to excel, but have been unsuccesful so far. So now I am just trying to get them to export as a csv file that can then be opened in excel. I have a class created to export the datagrids and it does export and save a csv file. However, the csv file contains no data.

Imports System.IO
Public Class clsExportData
'Public Shared Sub Export(dg As DataGrid)

[Code]....

View 1 Replies

Print Gridviews, Datagrids, Or Datatables?

Oct 4, 2010

I'm looking for a solution to implement in web apps where I have the option to see a print preview or print either a gridview, datagrid, or datatable or export it to word or excel. What's the best method to do this or has someone written a class that does this, and does it well (I've seen many examples, but many still have errors)?

View 1 Replies

Display Two Datagrids With Datatable - Drag A One Row In Another Grid

Apr 26, 2010

I have an aplication using asp.net 2.0 . In this application i dispaly two datagrids with datatable. I want To drag a one row in another grid.

View 5 Replies

Get Code To Work To Populate Textboxes And Datagrids?

Feb 15, 2012

I am creating a form application that should display information from one dataset into individual textboxes (ie. system name, system id, location name, location id). The textboxes populate upon the selection of a pair of cascading combo boxes. So, the user first selects a system name from the first combobox, then that selection will populate the second combo box for the locations of that system. (This means that each system may have more than one location.) Once the location is selected, each of the 4 textbox should populate with the corresponding data but I'm not quite sure how to write the code..

[Code]...

View 5 Replies

.net - Loading And Saving Data In WPF Using The MVVM Pattern And DataGrids

Jan 4, 2011

How do i fill my ObservableCollection(of Monitors) with data so that I can save it in an MVVM friendly manner. I normally use a FileNumber to load a DataSet using a DataAdapter and pass the monitors table via monitorDT - should I be loading it differently? How do I save the changes? Right now I have the following for loading data:

[Code]...

View 1 Replies

.net - Loading And Saving Data In WPF Using The MVVM Pattern And DataGrids?

Jan 13, 2011

How do i fill my ObservableCollection(of Monitors) with data so that I can save it in an MVVM friendly manner. I normally use a FileNumber to load a DataSet using a DataAdapter and pass the monitors table via monitorDT - should I be loading it differently? How do I save the changes?Right now I have the following for loading data:

Public Class Monitors
Inherits ObservableCollection(Of Monitor)
Public Shared Function LoadMonitors(ByVal monitorDT As DataTable) As Monitors

[code]....

View 3 Replies

Fun With Datagrids, Checkbox Checked Not Detected Until Selection Changed?

Dec 8, 2011

I have a datagrid that has a checkbox column and it all works fine and dandy except I'm not sure what the proper way to handle this situation is. When I check one or more checkboxes then loop through to find which ones were checked if I didnt move the selected cell before clicking go it will not detect the last checkbox checked. However if I change selection it does. Problem is I dont want to change selection, I tried unsBelow is the code I'm using to find which checkbox is checked. This will msgbox me the text in the second column of all the rows checked except the last one I checked

For
Each
chk_s In

[code]....

View 4 Replies

[2008] Drag & Drop Between 2 Datagrids Between 2 MDI Child Forms

Feb 11, 2009

Drag & Drop Between 2 Datagrids Between 2 MDI Child Forms Ive been working on this project of mine for some time now... though im not involved in IT in my current company, im just trying to help to at least have their system computerized (they are still doing it manually by paper & calculator)... I have one problem though which made me stick for 2 days (and still counting) without progress... How To Drag & Drop Between 2 Datagrids Between 2 similar MDI Child Forms my apologies, im not that adept in VB.net programming...

View 1 Replies

Forms :: Drag & Drop Between 2 Datagrids Between 2 MDI Child Forms

Feb 11, 2009

Ive been working on this project of mine for some time now... though im not involved in IT in my current company, im just trying to help to at least have their system computerized (they are still doing it manually by paper & calculator)... I have one problem though which made me stick for 2 days (and still counting) without progress...How To Drag & Drop Between 2 Datagrids Between 2 similar MDI Child Forms

View 16 Replies

Multiple Forms - Declare And Instantiate Second Form On Program Start - Use Button Simply To Show Form?

Jan 14, 2010

I have a program that uses two forms. The program opens to the Main form, and the user can navigate to the other form from the Main form through use of a button. Here's the way I've currently written it: When the Main form loads, it declares and instantiates the other form during the load procedure. When the user presses a button, the second form is displayed by means of the ShowDialog method. On the second form, there is a Return to Main Screen button which closes the second form, bringing the user back to the Main form.

So, here's the structure of the code:

Code:
Public Class frmMainForm

Dim frmSecondForm As New SecondForm

Private Sub btnSecondForm_Click(blah, blah, blah) Handles blah, blah, blah

[CODE]...

Here's my reasoning: Originally, I wrote the code so that a new instance of the second form was created every time the button was pressed. The problem was that whatever data was displayed on the second form, previously, was lost when the user returned to it a second time. Since the user would be switching back and forth between these forms, frequently, I needed that data to persist.

What is the best practice for accomplishing this:

1) Declare and instantiate the second form on program start, as I have done, and use the button simply to show the form?

2) Declare and instantiate the second form each time the button is pressed but maintain the variables on the Main form and pass them ByRef to a custom constructor for the second form? Is this even possible?

3) Something else?

View 5 Replies

VS 2010 : Make A Form With Multiple Buttons Opening Different Things Than Having A Form That Has Lots Group Boxes For Each Tab?

Jul 25, 2011

Is there a better way to make a form with multiple buttons opening different things than having a form that has lots group boxes for each tab. So in the begining each box will be invisible and when you click the button the corresponding group box will become visible. Is there any other way?It will be like a background image and it'll have buttons that will mask it with invisible buttons. when the button is clicked it will open the corresponding group box.

View 5 Replies

Multiple Form Declarations - Declaring Them Each Time On Each Form?

Nov 28, 2009

I have multiple forms and have multiple declarations that I need for all the forms, is there a better way than declaring them each time on each form? Can a .dll do this, if so does it require the .dll to be a seperate file than the final .exe file. Or is there someway to reference the variables on other forms?

View 2 Replies

Transferring Multiple Information From Form To Form?

Nov 3, 2011

So my question is that I have 2 list boxes in two forms aside from the main one. and I am trying to transfer what I choose in the side form to transfer to the list box.

several questions: Why does the blank list form I have in the main form create a problem when I enter a name for the list box and why does it appear in the box when I put it there? As you can see in my errors. It doesn't seem to recognize the listbox that I wanted to leave empty in the main form.

Second question is how do I get names to add in the main form list box. I believe I have the right code but I seem to be missing something else as well. I want the names to display in the main list box and the integers to add up together so I can separately figure the tax and shipping myself.

Here are some pictures and codes

Main:

Print:

Audio:

Public Class MainForm
Dim frmAudioBooks As New AudioBooks
Dim frmPrintedBooks As New PrintedBooks

[Code].....

View 39 Replies

One Form Multiple Uses

Jan 24, 2011

How would i go about creating a "Search Feature". I have all of the algorithms to do this, but at the moment it's hassle for me to have both forms, and 3 separate buttons for searching. I think its more complicated than it needs to be. I was thinking about creating a label at the top of form and using the following:

"If label1.text = "" then
......
End if"

But how would i get it to get the value of the text box from a separate form, and make form perform a separate feature, if you see what i mean.

View 14 Replies

How To Multiple Pages In .NET Form

Apr 29, 2011

I've inherited some VB.Net code that I think needs some restructuring. The project has three forms, each of which is its own Windows Form file that inherits from System.Windows.Forms.Form.The problem is that all these forms share a common navigation menu bar that does not change as the user switches between forms, and so the original programmer has duplicated the menu code in each of the three files to generate the menu on each one! I figure this can't be right.

To restructure it, I thought I would create a base form that implemented the menu, and then let the other forms inherit from that, but I ran into the problem that Windows forms already inherit from the class mentioned above, and can't inherit from another class.I noticed I can add an item called "inherited form", but is that the way to go here? The problem of creating multiple screens with a common menu bar has to be incredibly common. Is there one true way to do this? Should I use inherited forms, or should I by have just one base form and make the other screens just plain classes and not forms at all? Or something else I'm not thinking of?

View 2 Replies

Multiple Buttons On A Web Form?

Apr 6, 2011

I have some VB.NET web forms that have multiple buttons (Submit, logout etc.) If I enter data in a textbox and want to use the submit button, if I actually click on the button it works fine but if I hit ENTER instead it appears the Logout button always takes precedence. How do I control this action as most people hit ENTER rather than actually clicking the button?

View 8 Replies

Multiple Controls In A Form?

Aug 26, 2010

When I click a cell or a row in a datagridview I want to be able to open a new form with several textboxes and comboboxes in it and to be able to edit the selected row. The only thing I managed to do so far, was to fill a texbox from the form with the info from the sellected cell using the following code.

Dim
cell As
DataGridViewCell

[Code]....

View 2 Replies

Multiple Instances Of A Form?

Sep 13, 2010

If I create a console application for example with a class named "Person" I can create an object variable with a ceratin name only once. For example:

Module
Module1
Sub

[Code]....

View 1 Replies

Multiple Instances Of The Same Form?

Mar 3, 2010

I have two forms in my application. Form 1 is a listview that is populated with unique Customer IDs. When the user double click the listview on the particular Customer ID then it loads Form2. Form2 has many listviews within it such as a listview for the Customer telephone, another listview for their addresses etc and all the data presented in Form2 listviews are based on the Customer ID that the user clicked in Form1.

So here is my question...I want the user to be able to open Form2 with that particular details of the customer but also to go back to Form1 and double click another Customer ID and opens Form2 again (such as replicating Form2) with the other Customer details.So the moral of the story is i want the user to be able to have many instances of Form2 open each time they wish to view a different Customer ID without having to close Form2 down every time.

View 3 Replies

Multiple Records On A Form?

Oct 25, 2010

I have a form that is going to displays the same field from each of my 185 records. How do I get it to show all records for that field without using a data grid. If you think of this form as a layout of a parking lot and each field is a parking spot then what I am trying to do is display the assigned parking spots. When you click on the spot I want to open a second form that I already created to display and edit that spot.

View 3 Replies

Multiple Web Browsers In One Form

Dec 18, 2009

I have an application I made to monitor IP cameras. Right now I just have a button for each camera, so that when they want to swithc to that camera, all the user has to do is click the button to switch to that camera.What I would like to do is set it up so that I have multiple web browsers on the form, each one for a camera. However, the problem is that the actual video feed is in a small section of the web page, so the user would have to scroll to the right position for each web browser to be able to see the video feed.What I want to do is configure it so that when the page loads, it automatically scrolls to the right position so the user can see the camera feed for each camera (each in it's own independent browser) without having to adjust each browser.

View 4 Replies

Use Same Form On Multiple Pages?

Mar 18, 2011

I am writing an application, and i have a user form, which will be the same for the users and the administrators. on different pages.

i want to only create the form once, and then be able to put it on two different aspx files.

i tried it with the "control" , but it then gets really complicated trying to access fields on the control from the aspx page to do the calculation, etc.

View 3 Replies

Assign A Form Multiple Designs?

Feb 14, 2012

I want to give a form two designs, one design on application startup and another when a button is pressed. Can I do this with another designer?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved