Click here to Skip to main content
15,071,581 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have drawn the lines from the Visual Basic Power Pack. One is Horizontal and other is Vertical (like x-axis and y-axis) And now I want to add points on it from datagridview(which have two columns x-axis and y-axis). How can i draw points on it?
Posted
Comments
[no name] 10-Jul-14 1:08am
   
Put table inside item template and write css for x and y axis, you can include border-right or border-left for cell with 1px solid gray; just a idea.
Thanks7872 10-Jul-14 2:52am
   
What if its Winform?
Thanks7872 10-Jul-14 2:52am
   
Stop posting similar question over and over again about drawing line. Its Abuse.
Yellow_Flash 10-Jul-14 3:08am
   
Its not just putting a line. I want to insert points on these lines which is bothering me and i am asking again!
Thanks7872 10-Jul-14 3:29am
   
And that is not allowed here on Codeproject.
Yellow_Flash 10-Jul-14 5:34am
   
okay
Sorry for disturbance

1 solution

easiest way is following step as I think

1) Add control array of label if number of dots are not fixed.
2) Add two textbox for co-ordinates entry e.g. textX, textY
3) Add in there textchanged event, enter following code

textX.location = New System.Drawing.Point(Val(txtX.Text) , textX.location.Y)
 Collapse | Copy Code
textY.location = New System.Drawing.Point(textX.location.X,Val(txtY.Text))

try this and reply.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900