|
My requirement is on button click the cursor should be focused in the particular cell of the datagridview control.
Presently on button click i am selecting the required cell and when i click on that cell the cursor is focusing to that cell..... but i need this focus should be on button click itself.
Please help me on this
Thancks in advance
PraveenKumar Palla
|
|
|
|
|
So you want to position the cursor over a particular cell? Have you tried getting the cell coordinates in screen coordinates and then call Cursor.SetPosition?
(this is all assuming you're using Windows Forms, not some web-based grid)
|
|
|
|
|
thanks for the soon reply
there is no property "cursor.setposition"
"cursor.current" is there
i tried like
dgvlasers.cursor=cursor.current;
but no use;
so help me on this.
|
|
|
|
|
Point cellLocation = dgvlasers.Rows[0].Cells[0].ContentBounds.Location;
Point cellLocationInScreenCoordinates = dgvlasers.PointToScreen(cellLocation);
Cursor.Position = cellLocationInScreenCoordinates;
|
|
|
|
|
Me again..I have a small database program that moves through the records in the database using buttons labelled Previous and Next. It is connected to an SQL Server which stores the data.
The database stores records of cars I want to add a pictureBox that I want to show the picture of the current car that Im viewing and change everytime I click on the Next or Previous button and correspond to the new record shown...
NY1 done that b4 plz let me know....
Is this chair taken
|
|
|
|
|
Bonsta wrote: NY1 done that b4 plz let me know....
Don't be childish and type like that; it will only discourage people from answering your question.
Your question sounds like you're trying to load images from a database and display them in a picture box. Is that right? If so, this has been asked and answered many times before[^].
|
|
|
|
|
A component I made has a property which has only sense when read in hexadecimal.
I wish the property grid of the component, at design time, show this property in hexadecimal, not in decimal.
Something like this:
<br />
[ Name: | MyComponent ] br />
[ MyProperty: | 0x30010080 ] br />
Can someone tell me how to do this ?
FDK
|
|
|
|
|
Hello,
Is it a readonly property?
Do you have an additional int property for the input at designtime?
All the best,
Martin
|
|
|
|
|
Not readonly. But the problème will be the same, because I want it to be displayed in hexadecimal.
I dont understand your second question.
FDK
|
|
|
|
|
Hello,
You can not have a property which takes int value as input and shows a HEX string as output.
You have only the possibility to have two properties one readonly and one for the input, or like the other suggestion only a string property which converts the input to int value!
All the best,
Martin
|
|
|
|
|
I am a bit surprise and a bit disappointed.
But I have to admit that your solution is good and simple.
Thanks.
FDK
|
|
|
|
|
Hello,
FDK2 wrote: I am a bit surprise and a bit disappointed.
That happens to me every day, minimum once!
FDK2 wrote: But I have to admit that your solution is good and simple.
:->
FDK2 wrote: Thanks.
Mais, c'est avec plaisir !
P.S.: Got my '5' for the feedback!
All the best,
Martin
|
|
|
|
|
<myint>.ToString("X")
Paul
|
|
|
|
|
I know this.
This do not answer to my question.
FDK
|
|
|
|
|
You stated that you wished to show the property value 'in hexadecimal, not in decimal'.
How are you storing the property value within your application? If, as you suggest, you are storing it as an integer then you can get the hexadecimal representation of this number by calling ToString("X") on an integer variable containing the value.
|
|
|
|
|
Sorry. My english is probably not good enough. :s
So imagine you have conceived a component on which you have an integer property.
You will see this property in the property grid, at design time.
But the value will be displayed in decimal format.
I want to see it in hexadecimal format.
FDK
|
|
|
|
|
You can continue to store the value of the property internally as an integer. However, you should make the public property declaration of type String. When reading the value, convert the internal integer value to a string representing its value in hex format using the code I previously supplied. When setting the value, parse the hex string and convert the value back to an integer.
Paul
|
|
|
|
|
Same simple and good solution than martin#
So thanks.
FDK
|
|
|
|
|
Hello Friends of the forum
I have a LAN with a Domain of windows 2003 server.
As I can make to block the use via automation of Directory it Activates with C#
the use of Windows Messenger, winamp.
But alone of certain IPS.
Example
1923.168.1.15 blocked winamp, excel
192.168.1.16 blocked messenger, winword
thank you
>Hola Amigos del foro
>Tengo una LAN con un Dominio de windows 2003 server.
>Como puedo hacer para bloquear el uso via automatizacion de Active Directory con C#
>el uso de Windows Messenger, winamp.
>Pero solo de determinadas IPS.
>Ejemplo
>1923.168.1.15 bloqueado winamp, excel
>192.168.1.16 bloqueado messenger, winword
>gracias
|
|
|
|
|
|
How to convert html file to xml file?
Karthick
|
|
|
|
|
Karthi_jpk wrote: How to convert html file to xml file?
Change the extension!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
1) I think you should read the forum guidelines.
2) I doubt you will get any response based on the subject.
|
|
|
|
|
which country are you from ???
I hope not from India..There was a big issue about this in Launge.
Anyway read guidelines.And try to be polite and give a proper subject title....And then we might help you...
hv fun
|
|
|
|
|
alas the joke about changing the file extension is correct in regards to information provided in the question.
what exacting are you trying to achieve?
|
|
|
|