|
I got it did something like
<br />
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick<br />
Dim myrow As Array<br />
Dim mydatarow As DataRow<br />
mydatarow = DS.Tables(0).Rows.Item(e.RowIndex)<br />
myrow = mydatarow.ItemArray<br />
Dim mydata As String<br />
mydata = myrow.GetValue(0)<br />
MsgBox(mydata)<br />
End Sub<br />
its giving me what I want
|
|
|
|
|
I m beginner to VB.Net.
Can some one help me in the syntax for Ternary Operator in VB.Net.
Regards,
LEE
|
|
|
|
|
The nearest is the IF.. THEN.. ELSE..
Bob
Ashfield Consultants Ltd
|
|
|
|
|
There is no ternary operator in VB.NET. The closets equivilent is the IIf[^] function.
|
|
|
|
|
VB 2008 does have a true ternary operator with an alternative use of the existing keyword 'If':
result = If(somecondition, iftrue, iffalse)
this is equivalent to the C# code:
result = somecondition ? iftrue : iffalse;
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
VB to Java Converter
Java to VB & C# Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: convert VB, C#, or Java to C++/CLI
|
|
|
|
|
Whenever my flyout window is displayed on website then it will display backgroud dropdown list box into that flyout.
Means flyout window also show dropdownlist of that page also,
so how to display flyout without dispaying that dropdownlist control.
please help me
|
|
|
|
|
What is a flyout ? You should be asking in the ASP.NET forum.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Please ignore.
Does it matter what I write here? Someone just has to say something about it.
|
|
|
|
|
Hi all....
--> How will i make an auto-completion textbox from a standard textbox? But don't tell me to create your own control.....!!
J A Nasir K
|
|
|
|
|
Jamal Abdul Nasir wrote: But don't tell me to create your own control.....!!
OK, in that case, I guess the answer is, pray.
Or you could read the article I link to in my sig. See if at the end of that, you're capable of using google to find this[^], as I did.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
There is another way out...
You can use combo box and set the drpupdown style to 'Simple'
May be this will help...
Good luck
|
|
|
|
|
Hi,
For autocomplete textbox set the Autocomplete Mode to Suggest Append'
n Autocomplete Source to Custom Source n in text changed event of text box add the text of text box to the autocomplete Custom Source.
So when u type in text box it will suggest u n append the text in ur textbox
Hope it will help u
Best Of Luck!
The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth
|
|
|
|
|
Have 5 - I have been working with these things for ages and never actually investigated the autocomplete options. I was of the same opinion as CG , Thanks
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Can any expert help me how do i create Active X Control in VB.net
(In VB 6.0 , We can create Active X Control that genetate .ocx control and then we deploy it to produce .cab file and .html file.
we can use it on web page directly. I need to same work with VB.Net and asp.net)
Issue is only how to create Active X in VB.Net 2005
Any Help will be apreciated
Thanks in Advance
|
|
|
|
|
Check this:
http://www.vbdotnetheaven.com/UploadFile/dsandor/ActiveXControlInVBdotNET04112005081747AM/ActiveXControlInVBdotNET.aspx
Regards,
Dave
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|
|
Dim ress As [Assembly] = [Assembly].GetExecutingAssembly
Dim strimg As Bitmap = CType(Bitmap.FromStream(ress.GetManifestResourceStream("statuses.bmp")), Bitmap)
ImageList1.Images.AddStrip(strimg)
I have added image statues.bmp to resource already, but it still error like that "Value of null is not valid stream"
So, how can i do?
Socheat
|
|
|
|
|
You need to work out GetManifestResourceStream. It actually scopes your folder structure I believe, so if it's in a folder called Bitmaps, it's going to be Bitmaps.statuses.bmp, and perhaps even has your root namespace at it's head.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi
i am using data grid and i want to update it when user change i but the fallowing command in button to save update but it did not work and it give error massage
Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(DataAdapter1)
Dim CmdB As New OleDb.OleDbCommandBuilder(DataAdapter1)<br />
DataAdapter1.Update(DataSet1, "Section")<br />
<br />
the error messge (Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.)
|
|
|
|
|
Hello,
This error comes up when the Select statement does not return any Primary key column.
The SelectCommand must return at least one primary key or unique column. If none are present, an
InvalidOperation exception is generated, and the commands are not generated.
For more details on this, you may refer to the given MSDN Link:
http://msdn.microsoft.com/en-us/library/tf579hcz.aspx[^]
I hope this helps.
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
thanks i put the primery key but it give me error in update statment
please help if you can
|
|
|
|
|
This doesn't seem like it should be hard but all I get is a blank form. Is there an error in my syntax? I checked, the file does exist at that location and it does contain text.
Imports System
Imports System.IO
Imports System.Text
Public Class Form3
Public Class Test
Public Shared Sub Main()
Dim path As String = "c:\temp\mytest.txt"
If File.Exists(path) = False Then
' Create a file to write to.
Dim sw As StreamWriter = File.CreateText(path)
sw.WriteLine("Hello")
sw.WriteLine("And")
sw.WriteLine("Welcome")
sw.Flush()
sw.Close()
End If
' Open the file to read from.
Dim sr As StreamReader = File.OpenText(path)
Do While sr.Peek() >= 0
Console.WriteLine(sr.ReadLine())
Loop
sr.Close()
End Sub
End Class
End Class
-Live long and prosper
|
|
|
|
|
Hello,
I have checked the working of the code and everything seems to be working.
I get a file created with text in it and also get the strings written in OutPut Window.
However, I am not sure what exactly you are looking for. If I am assuming correctly, are you
looking to write the text on the form or what. Can you explain the things in detail?
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
Add a label to your form. Then do this
label.Text = File.ReadAllText(path)
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I can see nothing wrong with your code but then again I am a C# developer not a VBer (anymore). However the one thing I will point out is to dispose of your streams. In C# there's a nice using statement but in VB I presume you'll have to do something like the following:
Dim sr As StreamReader = File.OpenText(path)
Do While sr.Peek() <> -1
Console.WriteLine(sr.ReadLine())
Loop
sr.Close()
sr.Dispose()
I doubt it. If it isn't intuitive then we need to fix it. - Chris Maunder
|
|
|
|
|
hi
is their is away to check the first three letter from string
|
|
|
|