|
Hi,
The very basic difference is that user/Customer can see "DisplayMember" on UI while Developer can work with "Valuemember" which is hidden behind the DisplayMember..
I would like to give u one simple example........let's say ur combobox supposed to show the Country list. when u fetch the records from DB u will select Country name along with it'd ID.(select C_ID,C_Name from country)
Now while showing these records u will show the Country Name on ur UI hance u will set "DisplayMember" of combobox to "C_Country" while doing any DB related thing u will require the ID of the selected Country hence u will set Valuemember with "C_ID"
Now u can access the ID of selected Country using SelectedValue Property of Combobox as cboCountry.SelectedValue Property
I hope this will help u...............:->
Regards,
Ritesh
|
|
|
|
|
hi,
almost 7 years later, you answer helped me understand the difference ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
15 years later... Now it helps me a lot. Thank you for this answer. Very clear and concise.
|
|
|
|
|
I want to chech whether a dataset is blank or there are any record in it ?
A sample code will be more helpful.
Thanks
|
|
|
|
|
Hi,
U can check the Dataset or Datatable whether they have any data(Rows) in it as follows..........
If Not dsNewData Is Nothing Then<br />
If dsNewData.Tables.Count > 0 Then<br />
If Not dsNewData.Tables("TableName") Is Nothing Then<br />
'If u want u can check for dsNewData.Tables("TableName").Rows.Count>0<br />
MessageBox.Show("Table has :" & dsNewData.Tables("TableName").Rows.Count & " Rows")<br />
End If<br />
<br />
End If<br />
End If
I hope this will help u..............
Regards,
Ritesh
|
|
|
|
|
I m trying to fetch rows from dataview.
Can anyone help me?
A sample code will be more helpful.
Thanks
|
|
|
|
|
Hi,
U can access the records detail from dataview as follows.......
For intRowIndex = 0 To pi_dtTable.DefaultView.Count - 1<br />
MessageBox.Show(pi_dtTable.DefaultView.Item(intRowIndex).Item("ColName"))<br />
Next
I hope this will help u...........:->
Regards,
Riesh
|
|
|
|
|
Hi Ritesh,
Thanks for your all reply.
Can you please let me know,
what have u declared these variables as:
intRowIndex
pi_dtTable
|
|
|
|
|
hello
Private inrowindex as integer
Private pi_dtTable as datatable
whatever the modifier you want use it![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
ok...
dim dv as dataview
dv.rowsfilter = "id like 'C%'
Now i want to fetch one record from this dataview..
Please remember i have done this with datatable and dataset..
Thanks in advance for your reply.
Suman Singh
|
|
|
|
|
Hi i have beening to send the following codes to a printer connected to my pc through an ethernet hub, but i could not be able to print a printer-ready data successfully. it only printed out rubbish value
Can anyone help me here?
(the printer ready data are a series of strings that contain Printer Control language which the printer can understand. It the string has been tested by sending it through a parallel port, and it proved it can be read by the same printer.)
Dim Buffer() As Byte
Dim oEncoder As New System.Text.ASCIIEncoding
Dim oEnc As System.Text.Encoding = oEncoder.GetEncoding(1252)
Buffer = oEnc.GetBytes(Chunk)
Dim client0 As New System.Net.Sockets.TcpClient("169.254.192.155","9100")
Dim stream As System.Net.sockets.NetworkStream = client0.GetStream()
stream.Write(Buffer, 0, Len(Chunk))
client0.Close()
stream.Close()
|
|
|
|
|
Hi,
Could anyone help me. I need to read through a text file to find a certain line of text that remains the same and then change it to a different line of text and save it. I am using VB 6 but having no luck.
If anyone could help it would be great.
Thanks
|
|
|
|
|
Unless the change you make is exactly the same length as what you're replacing, you'll have to read in the entire file, make the change, and write the entire file back out.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can the style/font/color of a header in a datagrid be changed selectively using VB.NET? If Yes, How?
|
|
|
|
|
Right click on the datagrid and select autoformat...
It will help you a bit...
|
|
|
|
|
Dear Sir,
I am exporting picture from a picture box to the power point slide. but when i m reaching line code
ActivePresentation.Slides.Paste
i am getting error no Run time error 429
"ActiveX Component Can't create Object".
Please help me by checking the below code.
i m giving the refence of Ms Power Point 11.0 Object Library.
Dim ppApp As PowerPoint.Application
Dim ppPresentation As Presentation
Dim ppSlides As Slide
Set ppApp = New PowerPoint.Application
ppApp.Visible = True
Set ppPresentation = ppApp.Presentations.Add
ppPresentation.Slides.Add 1, ppLayoutTitle
Clipboard.Clear
Clipboard.SetData Picture1.Image
ActivePresentation.Slides.Paste
Thanks
Murtuza Patel
|
|
|
|
|
Hey, im fairly new to VB.net and am coding a game of sorts which requires Collision detection
the way i have set it up is that whenever "pic" moves 4 functions check to see if it is in collision with "wall"
this is one of the functions, it checks to see if it has collided on the right side
Function cd1()
If (pic.Left + pic.Width) = wall.Left Then
If pic.Top < wall.Top Then
If (pic.Top + pic.Height) > (wall.Top + wall.Height) Then
'MsgBox("IT WORKS")
Dim Form10 As Form10
Dim Form1 As Form1
Form1 = New Form1
Form1.Show()
Me.Hide()
End If
End If
End If
End Function
Hand please
|
|
|
|
|
I m using wininet.dll in my vb application.
My application was working fine but some how it is giving me error that
Run-time error '435':
Can't find DLL entry point HttpsendRequestA in wininet.dll.
Any body can help me.
Thanks in advance
Jatin Mehta
|
|
|
|
|
hello, how can i validate the data entered in the data grid before sending it to the database???
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskhandlingerrorswithwindowsformsdatagridcontrol.asp
|
|
|
|
|
hi all i am doing a project in steganography
for this i need to set & retrive data (a string) to an image
plz can anyone help me with this
i would be thankful to them
|
|
|
|
|
http://www.codeproject.com/csharp/steganodotnet.asp
Steganography - Hiding messages in the Noise of a Picture
By Corinna John
http://www.codeproject.com/script/profile/whos_who.asp?id=475133
|
|
|
|
|
I want to send this to a textbox but when i put it in a button_click It doesnt work. I need to link it to the textbox but i cant fingure it out.
James Kennelly
|
|
|
|
|
You must give the focus to the control you want to send the keystrokes to. Using this method isn't recommended because it's not a completely reliable way to send keystrokes.
In order for it to work, you must give the application/control the focus, then send the keystrokes. But, in a multitasking environment like Windows, the focus can move from control to control and application to application at any time. This includes the time between when you set the focus and the time you send the keystrokes, even if SendKeys is the very next statement!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
well ginving the text box focus works i only need it for a second. But it wipes out the entire contents of the textbox because of the focus it selects all.
so had to play a game and came up with
TextBox1.Focus()
SendKeys.Send("{right}")
SendKeys.Send("{backspace}")
works so I like it!
James Kennelly
|
|
|
|