Good day guys I need help for adding rows in datagrid where the rows to be added are equal to the number of rows copied from excel. I can copy the data but it displays only the first row from excel on the last row of datagrid but if I add let's just say 4 rows in datagrid 4 rows are copied from excel. What I want is to add rows equal to the rows copied from excel to datagrid. If possible I f it can add another row just like when you put data in a row it will …

Member Avatar
Member Avatar
+0 forum 14

Hi, I'm trying to create cascading comboboxes, and my code isn't working. I've looked at other threads and I don't know why it isn't working properly. The first combo box displays System Names and the second combobox should populate the all Locations of that specific system chosen. When I run my application, the first combobox populates without any duplicates just as it shoud but when I select a System Name from it, the location combo box populates just one entry and doesn't allow a drop down of all the other location names. Here's my code: [CODE] '---Form_Load Dim con As …

Member Avatar
Member Avatar
+0 forum 3

is there a way to search database viwable in datagrid view by selecting rows through a combo box, values trough a text box and display resoult in label? here is the code that doesnt work: Private Sub Command1_Click() 'populate datagrid trough textboxes DBGrid1.Columns(0).Text = Text1.Text Text1 = "" DBGrid1.Columns(1).Text = Text2.Text Text2 = "" ! DBGrid1.Columns(2).Text = Text3.Text Text3 = "" DBGrid1.Columns(3).Text = Text4.Text Text4 = "" DBGrid1.Columns(4).Text = Text5.Text Text5 = "" DBGrid1.Refresh End Sub Private Sub Command4_Click() 'button for search 'MsgBox ("Your Name is " & Text6.Text) With Data1.Recordset If Combo1.Text = "id" Then Label6 = ("[id]like" & …

Member Avatar
Member Avatar
+0 forum 1

namespace gridStudent { public partial class Form2 : Form { public Form2(DataGridView dgvFromFom1) { foreach (DataGridViewColumn dc in dgvFromFom1.Columns) { dataGridView1.Columns.Add(dc.Name, dc.HeaderText); } foreach (DataGridViewRow dr in dgvFromFom1.Rows) { Object[] newRow = new object[dr.Cells.Count]; for (int i = 0; i < newRow.Length; i++) { newRow[i] = dr.Cells[i].Value; } dataGridView1.Rows.Add(newRow); } } private void Form2_Load(object sender, EventArgs e) { } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { } } } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace gridStudent { public partial class Form1 : Form { public Form1() { …

Member Avatar
Member Avatar
+0 forum 5

Hello, I have my VB 6.0 Application and make a Exe and I hosted it on my windows server 2000 it gives me error 'Could not access network location \\mynetworkpath'. earlier when there was Datepicker control was used then also there was error coming but I had registered MSCOMCTL2.dll and that issue was resolved. One thing I have noticed that when I use Datagrid in my application then I am getting error. I have also tried with creating a fresh VB application with only one form having ONLY DATAGRID control with no back side code and made exe and hosted …

Member Avatar
+0 forum 0

Hi guys, I'm running into an issue that's really frustrating me. It's probably the most common newbie oversight, causing me to get the dreaded NullReferenceException. I've encountered it many times before, but this time it's got me stumped. I'm filling a Datagrid with a table from a database. I'm able to get the data, and I put it into a class, which is then added to a List<T>, with each new object added a new element of the list. Once the list is built, I bind it to the DataGrid as an ItemsSource.. and that's where I encounter my issue. …

Member Avatar
Member Avatar
+0 forum 3

hi, I want to spent the values of textbox to datagridview from another form and that after a click on the button add, help me please

Member Avatar
Member Avatar
+0 forum 4

Hello,I am Vanen,from Mauritius Island,new to c# and vs. I am getting difficulties while saving values from my datagrid to database. If possible,option for selecting all the rows and option for selecting which rows to save to database from the datagrid. Can someone guide me?please! Thanks in advance.

Member Avatar
Member Avatar
+0 forum 4

Hello Friends, I'am an application s/w programmer, was working on Classic VB&ASP(with limited knowledge of .net and c#),now working on SSRS Reports, tasked with designing a two-form application to be deployed on Intermec CN70 device (OS-Microsoft Windows Embedded Handheld 6.5) more specifications [here](http://www.intermec.com/products/cmptrcn70a/index.aspx) The required application on successful login(username/password), provide the user with an option to either select the **StockOnHand** or **StockCounting** forms. StockOnHand form need to have a textbox1 which reads itemcode from barcode scanner(built in device),and displays the itemname in textbox2, UnitofMeasure in textbox3 and the corresponding item stocks in multiple warehouses should be displayed in a grid …

Member Avatar
+0 forum 0

I have 2 forms , form one has a datagrid with 10 columns form 2 has a listview box with 4 columns i want to populate the listview columns with 4 of the values from a row in the datagrid when the row is selected and the 'add ' button selected. i am fairly new to this so trying to get more understanding. How do i specify which cell goes to which column in the listview? how do i specify which columns values i want to send to the listview? i am sending value from "FORM A to FORM B" …

Member Avatar
Member Avatar
+0 forum 1

Hello, how to get id of selected row or clicked cell row in datagrid in vb6.0? Thanks

Member Avatar
Member Avatar
+0 forum 1

[](http://www.)how does a datagrid for example when you enter a data and it automatically update/enter at the datagrid when you click the next textbox? please i need a clear explanation tnx XD

Member Avatar
Member Avatar
+0 forum 1

How could I change the column header of the Data Grid to center or right but not left as default? [Pls pay attention, We are talking 'bout Data Grid here, recently I always receive answers for Data Grid View instead :( ] I just want to re-align the header only, not the whole column. There's another topic discussed bout this already but it's not working in my case. Could somebody help me? Here is my code: [CODE]Public Class Form1 Private Sub DataGrid1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles DataGrid1.Paint Dim row As Integer Dim p As Point Dim …

Member Avatar
Member Avatar
+0 forum 4

I am confuse about datagrid or table. How do you use grids like explorer, IDM, utorrent uses. are they using data grid or table or something i dont know. cant seem to get it? will post picture if required.

Member Avatar
Member Avatar
+0 forum 3

Experts, Please forgive me if this is a dumb question. 1)I am developing an application that needs data to be displayed in a grid format. 2)I need the ability to edit multiple records inline 3) I need the ability to use custom validations on rows being edited. 4)I am not much concerned about add/delete functions 5) I should be able to define custom form elements(like buttons) and pass values from data grid to perform certain actions. 6) if a row is being edited inline, I need all values from all columns to be available to create a custom validation and …

Member Avatar
Member Avatar
+0 forum 3

I'm a beginner to vb6.. I'm doing a attendance project. I'm using datagrid to view the details from database. i'm trying to update the database through datagrid. can any one help please.. i've searched every where data adapter is used to update. i can't find anyother sources..

Member Avatar
+0 forum 0

im doing a program in vb6.0 and im using datagrid as my table for database. i want to print selected rows in datagrid... the system im working on is inventory system printing the selected rows..help me thanxx..

Member Avatar
Member Avatar
+0 forum 2

I am new to vb.net Pls. Can someone help me on how do to display my data saved into sql server from form1 to datagridview in form2 with vb.net. Thanks in advance.

Member Avatar
Member Avatar
+0 forum 1

Private Sub one_btninsert_Click(sender As Object, e As EventArgs) Handles one_btninsert.Click For i = 0 To DataGridView1.Rows.Count - 1 Dim row1 As Integer = Val(DataGridView1.Rows(i).Cells(1).Value.ToString) Dim row2 As String = DataGridView2.Rows(i).Cells(2).Value.ToString Dim row3 As String = DataGridView2.Rows(i).Cells(3).Value.ToString Dim row4 As String = DataGridView2.Rows(i).Cells(4).Value.ToString Dim row5 As String = DataGridView2.Rows(i).Cells(5).Value.ToString Dim row6 As String = DataGridView2.Rows(i).Cells(6).Value.ToString Dim row7 As String = DataGridView2.Rows(i).Cells(7).Value.ToString Dim row8 As String = DataGridView2.Rows(i).Cells(8).Value.ToString Dim row9 As String = DataGridView2.Rows(i).Cells(9).Value.ToString Dim row10 As String = DataGridView2.Rows(i).Cells(10).Value.ToString Dim row11 As String = DataGridView2.Rows(i).Cells(11).Value.ToString Dim row12 As String = DataGridView2.Rows(i).Cells(12).Value.ToString Dim row13 As String = DataGridView2.Rows(i).Cells(13).Value.ToString Dim row14 As String …

Member Avatar
Member Avatar
+0 forum 12

Im developing application using ASP.net + VB.net Now i want to change column width at run time. But in run time it doesn't work. This is what i did up to now. data bind in form load like this. myGrid.datasource = myDataSet.table(0) myGrid.databind() In here dataset come properly. in grid data bound event If e.Row.RowType = DataControlRowType.Header Then Dim cell As TableCell = e.Row.Cells(1) cell.Width = New Unit(200) 'I added "200px" instead of 200. But it didn't work. cell.text = "abc" 'This is working. It is show the header as abc end if in above code i added (as an …

Member Avatar
Member Avatar
+0 forum 2

Hi all. Using VB6: I have an application in which I am programmatically populating a datagrid. When I first drop the datagrid on my form, it has 2 columns by default. I can add further columns to them but I wanted to know if there was a tidy way of starting from column 1 to begin with, or do I just have to delete the first two columns and start again? This is (pretty much) my column definition loop For Each Col In RsDivisions.Fields Set c = DataGridDiv.Columns.Add(DataGridDiv.Columns.Count) With c .Visible = True .Width = 1000 .Caption = Col.Name .Alignment …

Member Avatar
Member Avatar
+0 forum 4

guys i need ur help i want to insert data directly into the sql table using c# here is my code all that i have been able to do is get the values from the table not insert them i tried to do it this way but apprently there is some thing wrong with this code plz help me out string sConnectionString = "Data Source=localhost;Initial Catalog=ScratchCardSystem2;Integrated Security=True;pooling=true"; SqlConnection objConn = new SqlConnection(sConnectionString); objConn.Open(); string query = "SELECT * FROM store_adj_note_detail_1"; SqlDataAdapter dAdapter = new SqlDataAdapter(query,objConn); SqlCommandBuilder cBuilder = new SqlCommandBuilder(dAdapter); DataTable dTable = new DataTable(); //fill the DataTable dAdapter.Fill(dTable); //the …

Member Avatar
Member Avatar
+0 forum 1

i have a table Marks_Entry into my database and i want to enter all students subject marks at a time and i am doing it through a datagrid view . i have made a list of rollno of student and one subject row so i want that user may able to enter the records through a datagridview into a database table ..and i have never worked on it so i dont know to insert datagridview and how to run thw insert query multiple times for all the row of datagrid..can anybody guide me through this

Member Avatar
Member Avatar
+0 forum 1

hi, im new in vb6 how to search in datagrid where every keyword you type wil display the record found in database? here's my code in saving pls ned help here....this is our thesis God Bless>thanks. Sub search() 'search if student is registered then With ado .ConnectionString = connectdb .RecordSource = "Select * from info where Barcode = '" & Text2 & "'" .Refresh If .Recordset.RecordCount > 0 Then Text3 = ado.Recordset!Barcode Text4 = ado.Recordset!fname Text5 = ado.Recordset!lname Text6 = Date 'student attendance check Call add End If End With End Sub Public Sub add() 'save to attendance record With …

Member Avatar
Member Avatar
+0 forum 6

I have a One Search Box where we can search the "ClientName" now this Client Name match with Database ClientMaster -> ClientName if both Equal then Give the rowindex whose ClientName is this i only want the rowindex where clientname = "";

Member Avatar
Member Avatar
+0 forum 1

im using many textboxes one button and one datagridview, i want for example, textbox1.text to be shown i first row of column one, textbox2.text to be shown on first row of column2 and so one ... when i press button1. after i press button1, textboxes to be clean and to be able to write other things in those textboxes, but the textboxes text to be shown in second row of every column and so on... im using visual basic 2008

Member Avatar
Member Avatar
+0 forum 3

Hi guys... i want to delete data from datagrid in mysql...i have also done update query using same datagrid... but i m not able to delete data... my code is <script type="text/javascript"> $(document).ready(function () { // prepare the data var data = {}; var theme = 'classic'; var source = { datatype: "json", datafields: [ { name: 'name'}, { name: 'id'} ], id: 'id', url: 'data_qualification.php', updaterow: function (rowid, rowdata, commit) { // synchronize with the server - send update command var data = "update=true&name=" + rowdata.name; data = data + "&id=" + rowdata.id; $.ajax({ dataType: 'json', url: 'data_qualification.php', data: …

Member Avatar
Member Avatar
+0 forum 2

I have the following code which prints my datagrid nicely. The problem is that it only prints the first page and cuts off everything thereafter. I know I need to implement the e.HasMorePages = True in some manner but I am unable to get that working. Here is my code: Dim x As Integer = 100 Dim y As Integer = 50 'draw headers Dim j As Integer = 1 Do While (j < Me.FrameToOrderDataGridView.Columns.Count) Dim rect As Rectangle = New Rectangle(x, y, Me.FrameToOrderDataGridView.Columns(j).Width, Me.FrameToOrderDataGridView.ColumnHeadersHeight) Dim sf As StringFormat = New StringFormat sf.LineAlignment = StringAlignment.Center sf.Alignment = StringAlignment.Center e.Graphics.FillRectangle(Brushes.LightGray, rect) …

Member Avatar
Member Avatar
+0 forum 1

I was doing xaml with vb coding in vb 2010 I create a datagrid and linked itemssource with table adapter, and also I modify a columns to checkbox datagrid columns. Problem now is I checked the checkbox value in the columns in datagrid but through button check the data grid cell also is **null**. Is there wrong? Purpose to assign a checkbox datagrid columns is loop and insert the data which is checked

Member Avatar
Member Avatar
+0 forum 4

Hello everyone! I am building a mfc dialog based application in visual c++ 6 and using mysql c api to connect to a database. What i need is a simple type of data grid to show mysql query results in a dialog. I do not need to edit, update, save etc data from the dialog. Just show them on screen. I've checked libraries such as Ultimate Grid but they seem really complicated for my needs. I would prefer using built in mfc controls but don't really know if there are any suitable. Is there anything you could suggest as a …

Member Avatar
Member Avatar
+0 forum 6

The End.