|
|
hi all,
i have a datagridview and a contextmenustrip in my program. ContextMenuStrip is attached to Datagridview. At run time when i right click on DataGridView, contextMenu is appear. But there are little problem. How can i determine the row number, for which ContextMenu appear ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Hi,
Its very simple handle the click event of gridview
The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth
|
|
|
|
|
hi,
i already try this event.
but click event of gridview, there are no RowIndex Property is attached.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Ok
But have u tried mouse click event?
The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth
|
|
|
|
|
hi v,
once again, i want to told you that i already try this event and there are no rowindex property for this event.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
-->try this:
me.text=me.datagridview.currentrow.index+1
--> hope this will work but with right click. customise it for your self.
J A Nasir K
|
|
|
|
|
Hi,
I have a login page which takes the username and password and connects to the Oracle database. The login details are same as oracle db login details. If the user attempts 5 invalid logins to the application, the user id gets locked in both the application and the database. However, if the user is typing the same wrong invalid password consecutively for 5 times, the user id is not getting locked in the database. This means for the same set of userid and password, the post back is not working. Can you please explain and give a solution? We are using ASP.NET 1.0 with VB.NET. Thanks in advance!
|
|
|
|
|
hi aaraaayen
You should be Posting this in a ASP Forum. OK lets look at your Problem
aaraaayen: Wrote
However, if the user is typing the same wrong invalid password consecutively for 5 times, the user id is not getting locked in the database
Ok, try to Debug your Application, place a Break point from the moment you submit the user input and try to Enter incorrect credentials 5 times as you said and see where it goes wrong because we cannot tell whats wrong until we see your code. but as i said, try to debug and see where it fails and ask a Question based on the failing line and then it will be simple to help you
thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Can i load an RTF File(Text + images) to Crystal Reports.
I am looking for it from long time
Plz provide some help...
Jats
|
|
|
|
|
I don't use CR, but the last I heard (2 years ago,) images in Rich Text was not supported.
|
|
|
|
|
hi my friends ..
I user vb.net 2008
the project was working as good .. thene this problem happened ,, without any changes
then the project return to works by it self ,,, i didn't do any thing for it
then after one month from working on the solution .. suddenly the problem return again ..
any one know how to solve it ..
The type initializer for 'Solution.Module1' threw an exception
jooooo
|
|
|
|
|
This means that your code is broken. If you give us the rest of the stack trace we may have a better idea, but ultimately, it has to do with a constructor, I would say.
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 )
|
|
|
|
|
Thanks my friend ..
I found an error on some of variables and solve it ..
really thanks
jooooo
|
|
|
|
|
Hi I need some help,
I am reflecting all the properties in a class, that's fine, it works but I need the values of that actual class or instance.
Here's what i have so far.
Dim pi As PropertyInfo()
Dim m As MemberInfo
Dim reflectedTypes As Type = Nothing
Dim myInstance as New MyClass()
reflectedTypes = GetType(MyClass)
pi = reflectedTypes.GetProperties(
(BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.Public))
For Each m In pi
Debug.Print(String.Format("{0} : {1}", m.Name, "i want the value here"))
Next m
Reason why i need the values is the class might change by other developers & im making a backup feature, that "saves" this class's properties to a txt file.
Any help would be appreciated. thanks
eni9ma
|
|
|
|
|
Dear Friends,
I have created web services in VS2003 using VB.NET as language. Problem is that now I want to publish the web services. Please tell me the way.
Looking for your reply's. Thanks in advance.
Regards,
Zeeshan Ahmed Memon.
|
|
|
|
|
You just host it on a web server, using IIS
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 )
|
|
|
|
|
--> How to delete an uncommited row from a datagridview..?
J A Nasir K
|
|
|
|
|
Hi Nasir,
We can remove an uncommitted row using VB.Net in the following way.
BEGIN CODE
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
If dataGridView1.Rows(dataGridView1.CurrentRow.Index).IsNewRow <> True Then
dataGridView1.Rows.Remove(dataGridView1.CurrentRow)
End If
End Sub
END CODE
This will check to see if the row you are trying to delete is a new row or not. If not then it will remove the code.
Hope this helps
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
--> Your code does'nt work. I did the same functionality (which you suggested to me) in one line....
J A Nasir K
|
|
|
|
|
Hi, everybody.
I've been just started learning VBA programming.
And what I want to know is how to get a character width and the entire width of the text in a cell of Excel Worksheet.
I mean charaters of all languages such as English, Japanese and so on.
Please help me to resolve it.
Thanks!
|
|
|
|
|
Erhm, I don't think this is possible using VBA, however you can create a dll which contains that functionality using .net and then call a function within that dll which contains the functionality.
To get the length of a string, use the MeasureString function of the Graphics object. Pass a string and a font, and the size of the string will be returned.
Good luck
|
|
|
|
|
Dear Keilholz.
Thank you for your attention.
I hope you know I'm a beginner in programming in VBA, but only have a knowledge about c++ programming.
Can you show me a little code block about using MeasureString?
Is it possible to get a character width by using it?
Thanks.
|
|
|
|
|
Yup...
<br />
Font fArial = new Font("Arial", 10.0f, FontStyle.Bold, GraphicsUnit.Pixel);<br />
SizeF stringSize = Graphics.MeasureString("W", fArial);<br />
Console.WriteLine("String width is : {0}", stringSize.Width.ToString());<br />
Note : The code above is .NET (C#) code, not VBA
|
|
|
|
|
That's really helpful.
Thanks a lot.
|
|
|
|