| | |
datagrid functionality
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2006
Posts: 22
Reputation:
Solved Threads: 0
Hi,
I'm working on a new project and I would like to use VB.Net in Visual Studio 2005. I'll import data in a row/column format.I've been playing around w/ the datagrid control a little and I've gotten my data to import, but I'm not sure if this control has the functionality I need.
One of the columns contains cubic feet. The user needs to be able to take away any number of cubic feet from a row. Cubic feet is related to the trailor that the product will go into because the trailor can only hold "X" cubic feet. When some of the cubic feet are removed other records in that row will be affected and have to change accordingly. The cubic feet that gets removed will be stored somewhere else (an array maybe) along w/ the corresponding values that will be taken away from that same row (i.e. dollars, weight...).
Any insite, advise, or help in general is greatly appreciated.
Thanks,
David
I'm working on a new project and I would like to use VB.Net in Visual Studio 2005. I'll import data in a row/column format.I've been playing around w/ the datagrid control a little and I've gotten my data to import, but I'm not sure if this control has the functionality I need.
One of the columns contains cubic feet. The user needs to be able to take away any number of cubic feet from a row. Cubic feet is related to the trailor that the product will go into because the trailor can only hold "X" cubic feet. When some of the cubic feet are removed other records in that row will be affected and have to change accordingly. The cubic feet that gets removed will be stored somewhere else (an array maybe) along w/ the corresponding values that will be taken away from that same row (i.e. dollars, weight...).
Any insite, advise, or help in general is greatly appreciated.
Thanks,
David
•
•
Join Date: Aug 2006
Posts: 22
Reputation:
Solved Threads: 0
Thanks for replying preetham.
I'm not sure what I'm going to use to store my data yet. Is SQL server something that comes with Visual Studio 2005? I'm really not clear on this.
With the datagrid I need to be able to let the user manipulate the data in each individual cell by subtracting a certain amount from it. The amount that is subtracted will be moved and stored somewhere else and the cell on the datagrid should show what is left. Is this something that can be done with the datagrid?
Thanks,
David
I'm not sure what I'm going to use to store my data yet. Is SQL server something that comes with Visual Studio 2005? I'm really not clear on this.
With the datagrid I need to be able to let the user manipulate the data in each individual cell by subtracting a certain amount from it. The amount that is subtracted will be moved and stored somewhere else and the cell on the datagrid should show what is left. Is this something that can be done with the datagrid?
Thanks,
David
•
•
Join Date: Jul 2007
Posts: 6
Reputation:
Solved Threads: 0
•
•
•
•
Thanks for replying preetham.
I'm not sure what I'm going to use to store my data yet. Is SQL server something that comes with Visual Studio 2005? I'm really not clear on this.
With the datagrid I need to be able to let the user manipulate the data in each individual cell by subtracting a certain amount from it. The amount that is subtracted will be moved and stored somewhere else and the cell on the datagrid should show what is left. Is this something that can be done with the datagrid?
Thanks,
David
I think you should be able to do it with Access database. Only part of the code below:
Dim cf1, cf2, cf3, cf4, cfr1, cfr2 As Double
Dim ccf1, ccf2, ccfr1, ccfr2 As DataGridViewCell
Private Sub CalculateCubic1()
If grdClublic.Rows.Count > 0 Then
rowindex = grdCublic.CurrentCell.RowIndex
Dim row As DataGridViewRow = grdCublic.Rows(rowindex)
ccf1 = row.Cells(0)
ccf2 = row.Cells(1)
ccf3 = row.Cells(2)
ccf4 = row.Cells(3)
ccfr1 = row.Cells(4)
ccfr2 = row.Cells(5)
crecno = row.Cells(6)
cf1 = CDbl(ccf1.Value)
cf2 = CDbl(ccf2.Value)
cf3 = CDbl(ccf3.Value)
cf4 = CDbl(ccf4.Value)
cfr1 = CDbl(ccfr1.Value)
cfr2 = CDbl(ccfr2.Value)
end sub
private sub CalcCubic2()
call CalcCubic1()
cfr1 =cf2 - cf1
cfr2=cf4-cf3
end sub
Then update your database and refill your grid. Every time a value is changed the database would need to be updated and the cfr1 and cfr2 (representing the remaining cubic feet) would stay current.
I hope this helps
Scott
•
•
Join Date: Jul 2007
Posts: 14
Reputation:
Solved Threads: 0
Do you need to edit the stored values? Or could you use a calculated field in your datatable? i.e.
VB.Net Syntax (Toggle Plain Text)
mtblDocs.Columns.Add("Overflow", GetType(Double)) ' Capacity is trailer capacity ' CubicM is the number of Cubic metres required mtblDocs.Columns("Overflow").Expression = "CubicM-Capacity"
•
•
Join Date: Aug 2006
Posts: 22
Reputation:
Solved Threads: 0
Thanks for the replies and code!
Ranx,
I'm still in the beginning stages of this program, so I'm not completely sure how its going to work yet.
Data will be brought in from a mainframe on a daily basis. The logic will have to work through the data from the mainframe. Based on several criteria, the logic will pick which orders to send to a truck to be shipped. There will be 4 different trucks at any given time that hold different types of orders, so there will be much going on. Some orders will be completely sent to a truck, but some will be partially sent which will leave some of that order to be shipped the next day.
The orders that have been selected to ship will be sent back into the mainframe and when the data comes back the next day it will show what wasn't selected from the previous day as well as new orders.
So, to answer your question, hopefully, once the data has been gone through it won't necessarily have to be stored. The orders that have been assigned to a trailor will need to be printed out in some sort of a report. And if a trailor was only partially filled it will have to be stored in the database to be filled later. The data on the datagrid will need to be updated as the orders are selected, so that the user will know how much is left.
I hope that answers your questions. But let me know if it doesn't and I'll try to explain better.
Thanks,
Dave
Ranx,
I'm still in the beginning stages of this program, so I'm not completely sure how its going to work yet.
Data will be brought in from a mainframe on a daily basis. The logic will have to work through the data from the mainframe. Based on several criteria, the logic will pick which orders to send to a truck to be shipped. There will be 4 different trucks at any given time that hold different types of orders, so there will be much going on. Some orders will be completely sent to a truck, but some will be partially sent which will leave some of that order to be shipped the next day.
The orders that have been selected to ship will be sent back into the mainframe and when the data comes back the next day it will show what wasn't selected from the previous day as well as new orders.
So, to answer your question, hopefully, once the data has been gone through it won't necessarily have to be stored. The orders that have been assigned to a trailor will need to be printed out in some sort of a report. And if a trailor was only partially filled it will have to be stored in the database to be filled later. The data on the datagrid will need to be updated as the orders are selected, so that the user will know how much is left.
I hope that answers your questions. But let me know if it doesn't and I'll try to explain better.
Thanks,
Dave
![]() |
Similar Threads
- Enabling checkbox functioanlity in datagrid (C#)
- Printing the datagrid control (ASP.NET)
- Eteamz like functionality (PHP)
- Use of DataGrid (ASP.NET)
- Remove link frame around picture in Datagrid (ASP.NET)
- Linking to E-mail through datagrid (ASP.NET)
Other Threads in the VB.NET Forum
- Previous Thread: COM/ActiveX components
- Next Thread: Background program that runs straight away
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access add arithmetic array assignment basic binary bing box button buttons center code combobox component connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel file-dialog firewall folder google hardcopy image images isnumericfuntioncall listview login math memory mobile module ms mssqlbackend mysql navigate net networking opacity output pan peertopeervideostreaming picturebox picturebox1 port print printpreview problemwithinstallation project record reports" reuse save savedialog serial sorting sqldatbase storedprocedure string temp text textbox timer toolbox updown upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet view vista visual visualbasic visualbasic.net visualstudio web wpf xml





