|
I asked for the Binding portion, I apologize for not getting back with you. I honestly dont know why you are having an issue with this because it looks correct, it looked correct before, and unless you changed it Im sure it's still correct. What you are doing is one of the most basic functions of ADO.NET.
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
Thank you for reassuring me I wasn't a dummy .
I attached the entire form class just in case there was an issue with the data binding portion or something else.
I have one other resource looking it over. If he can't find the problem then I'm being forced to use one of my complementry support intances.
Thank you,
Quecumber256
|
|
|
|
|
in my project is asp.net with c# project but my vss schedular is asp.net with vb.net.
Every this schedular is running on night 12.00am .
In that schedular i have somany doc files and excel files,.pdf files.
So while schedular running time html paths and actual document paths but some times it automatically stopped then i want do if any document contains problem then schedular ignore's that document and goes to next document.For this i want code. Iam sending some of the classes of the my project.
public function get vss connection()
Public Function PopulateProject() As Boolean
Private Function PopulateSubProject(ByVal sParent As String, ByVal ItemIsDeleted As Boolean) As Boolean
Private Function Traverse(ByVal sProjectPath As String, ByVal SWFPath As String)
Private Function PopulateFiles(ByVal sParentID As Long, ByVal sProjectPath As String, ByVal sFolderPath As String) As Boolean
Private Sub InsertMenuRights()
Private Sub InsertDocNames()
Private Sub CreateFolder(ByVal Path As String)
Private Function GetNWExt(ByVal FileName As String) As String
Public Sub Conversion()
Private Function GetHTMLPath(ByVal FilePath As String)
Private Sub DocToHTML(ByVal FilePath As String, ByVal HTMLPath As String)
Private Sub PptToHTML(ByVal FilePath As String, ByVal HTMLPath As String)
Private Sub PDFToHTML(ByVal FilePath As String, ByVal HTMLPath As String)
Private Sub ExcelToHTML(ByVal FilePath As String, ByVal HTMLPath As String)
Private Function GetTPath(ByVal DocPath As String)
Private Function GetTruncPath(ByVal HTMPath As String)
where i will mention code in this classes.Please send me code as soon as possible my id is samsun125@gmail.com.
samrama
|
|
|
|
|
You expect people from the forum to write your code? Perhaps you should try to start to write your own code, then if you run into specific problems ask a question and we will try to help you with your questions.
Ben
|
|
|
|
|
srinivassam wrote: Please send me code as soon as possible my id is samsun125@gmail.com.
Please send me $50,000 as soon as possible. Your code will follow.
Another rentacoder buyer is about to be very disappointed...
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi guys
The problem im having is datagridview rowindex matches the binding dataset.table index, as long as I don't click on one of the column headers to change the datagridview sort order. can anyone help me getting rowindex to be the same no matter if i sort the DGV or not.
Thanks in advance
Robbo
|
|
|
|
|
You normally wouldn't care about the row index in the DGV. What are you trying to do with it?
|
|
|
|
|
Hi Dave
thanks for your reply.
basically my DGV has only a few bound columns and what i intend to do is retrieve further data from table based on the select DGV row.
so if rowindex 0 is selected from the grid i want to be able to talk to the table based on the same index making sure its the same record. i dont want to add more bound columns in the grid because there are too much.
any tips or advice would be appreciated.
Robby
|
|
|
|
|
vbbeg wrote: what i intend to do is retrieve further data from table based on the select DGV row.
OK. Then you're looking for the SelectedRows or SelectedCells. They return a DataGridViewRow and DataGridViewCell respectively. These will contain the data that the user clicked on, regardless if the DGV is bound or not, sorted or not.
Private Sub DGV1_SelectionChanged(blah, blah) Handles DGV1.SelectionChanged
For Each row As DataGridViewRow In DGV1.SelectedRows
For Each cell As DataGridViewCell In row.Cells
Debug.Write(cell.FormattedValue.ToString() & " | ")
Next
Debug.WriteLine(String.Empty)
Next
End Sub
Each DataGridViewCell object knows which DataGridViewRow contains it, through its OwningRow property. If the user clicks on any cell, the OwningRow property of that cell will give you the DataGridViewRow that the user clicked in. Using that, you can get the ID column of the row and use that value any way you want.
For Each cell As DataGridViewCell In DGV1.SelectedSells
Debug.WriteLine(String.Format("Cell Data: {0} Parent Row ID: {1}", _
cell.FormattedValue.ToString, _
cell.OwningRow.Cells("IDColumnName").FormattedValue.ToString))
Next
|
|
|
|
|
Thank for your patience dave.
I just need clarification on something.. realisticly what im trying to do is clone a record and rewrite columns so that essentially its not a duplicated record after all when its written to a table but I havent been able to work that out. (any advice you can give me will save you reading below and helping me along where im at right now)..
so imagine in my DGV i have surname , firstname , address . if i select a particular record showing these columns and rows respectively i want to additionally go to the table and also get "phone number" etc.
i guess what im asking is based on the DGV selection how can i go to the table and pickout the rest of the fields i need for that same row of data selected in the DGV.
e.g. SELECTED ROW IN DGV(IN BOLD)
[SURNAME]-[FIRSTNAME]-[ADDRESS]
CHAN,...........ALEX,.......mamre drive.............[AT INDEX 0}
Bloggs,.......JOE,.......2 Hollywood st , hollywood..INDEX 1
if i sort this by FIRSTNAME IN DESCENDING. it would be
[SURNAME]-[FIRSTNAME]-[ADDRESS]
Bloggs,.........JOE,.....2 Hollywood st , hollywood... INDEX 0
CHAN,.............ALEX,.....mamre drive .....................INDEX 1
im trying to use the below line
where "i" is the row number coming from DGV select row index.
dim value as string
value = ds.tables("customers").rows(i).item("phone")
* if i use the index from the DGV after i sort it it doesnt return the correct record to match the phone number...
just a reminder.. If i dont sort the DGV at all. I can use the DGV.index and use it here :
dim value as string
value = ds.tables("customers").rows(i).item("phone") it WORKS CORRECTLY. its just after i sort the DGV that I cant get
ds.tables("customers").rows(i).item("phone") to return the correct row from the table..
sorry about this dave .. thanks for your patience.
Robbo
|
|
|
|
|
You do not need the row number at all. Once you have to DataGridViewRow, you have the ENTIRE record that was clicked on. Every field that the grid was bound to in is that row object. So
Dim phone as String = cell.OwningRow.Cells("phone").Value
gives you the Phone column of the row that was clicked on. The example, of course, assumes that the Value property in that column returns a String. You'll have to change it to match whatever you're expecting.
You don't need to go to the table to get the rest of the fields.
|
|
|
|
|
If you didn't retrieve all the data you wanted in the first fetch, you need to change the first fetch to include the primary key in the table you bound the DGV to. When the use clicks on a row, you grab the PK value from the DataRow object and use that value in a second request to get the columns you need specifying the PK in the WHERE clause of the SQL SELECT.
|
|
|
|
|
Thankyou Dave. I think now where getting somewhere. ill let you know how i go later on . thanks champ.
|
|
|
|
|
Hi
I am trying to add *.dll files as a reference in VB.NET 2005 but am recieveing the message as 'A reference (Path) could not be added please make sure that the file is accessible and that it is a valid assembly or COM components'.
Help me to proceed......
Thanks,
Nanda
|
|
|
|
|
hi,
if you want to add reference to project:
go in solution explorer and you will find Reference and click right on Reference and choose Add Reference and after that you can choose your reference
hope it helped.
|
|
|
|
|
Hi,
am recieving the error message while adding the reference(i can't able to add that dll), please help in this
Error message:
'A reference (Path) could not be added please make sure that the file is accessible and that it is a valid assembly or COM components'.
Thanks,
Nanda
|
|
|
|
|
You're getting this error message because your trying to add a reference to a .DLL that is not COM-based, just like the message says.
In order to use the functions in that .DLL, you do NOT add a reference to it. You call the functions through P/Invoke. Define the function headers in your code using the Declare statement and setting up the arguments that the function is expecting. For example, to call the Win32 Beep function found in kernel32.dll :
Declare Function Beep Lib "kernel32.dll" (ByVal frequency As Integer, ByVal duration As Integer) As Boolean
Then later in your code:
Dim r As Boolean
' Make a sound at 4000Hz, for 250 millisecond (1/4 second)
r = Beep(4000, 250)
|
|
|
|
|
am new 2 vb
1. i want a value to be entered through a text box
2. store it in an array
3. input text length should be exactly ten
4. first four should be charachter next four integers last two charachters
5. how to achieve all this in vb6.0
6. please help me at de earliest
2nd question
1. i got a listbox filled with a table entry.
2. when i click it de corresponding row should be displayed in data grid
3rd question
1. if i enter a value in text box. supposing a name "devx" is given in de textbox i should retrieve all de rows that has de name as devx
tell me how 2 do from scratch coz i really dono much bout vb please help me
my tools are vb6.0 and access
with DAO connection
|
|
|
|
|
daredevil_beware16 wrote: tell me how 2 do from scratch coz i really dono much bout vb please help me
First of all, txt speak just makes you look like an idiot
Second of all, we're here to help people trying to program. People who say 'I don't know anything, so tell me from scratch how to do these tasks', don't get much help.
Third, VB6 is a dead language, and a terrible one. Microsoft withdrew all support some time ago, why would you learn this intead of VB.NET ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
see Christian Graus if u know give me de answer am in need of it.. else leave it.. don come here to mock got it i relly hate it...........
|
|
|
|
|
I am trying to help, seriously. Your question is just annoying, because of how you typed it. others will tell you the same, or just ignore you. We're not 12 years old here.
And, VB6 *is* a dead language. Why are you learning it ? I suspect it's a class, in which case, you really need to do your own homework.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hey CG did you note him Name DAREDEVIL.
Ha Ha Ha !!!!!
Regards,
Satips.
|
|
|
|
|
Which country u belong to?
I think u need to learn from the book first.Then tell us the specific problem.
|
|
|
|
|
Hey Nilish, He is from United States.
Did you note his name aah? " daredevil beware "
Regards,
Satips.
|
|
|
|
|
actually christian i rellay wanna study vb so only want some help dude so kindly adjust....
|
|
|
|