"The other question is still valid. Can i have a control embeded in a windows form datagrid.? e.g. can i have a dropdown list in a cell in a datagrid? so whenever i click a cell in a specific column in the grid it transforms to a dropdown list from which i can choose something , and my choice become the new cell value?"
Yes you can!!
The DataGrid, just like a form has a Controls Collection, that can...
User Profile
Collapse
-
-
How to DataBind Custom Properties (ones you have made yourself?)
I have created a very simple custom control (called AxResurveySnore d) with two properties, the properties looks like this:
...Code:Public Property ReSurveyed() As Boolean Get ReSurveyed = picResurved.Visible End Get Set(ByVal ReSurveyed As Boolean) picResurved.Visible = ReSurveyed End Set End Property Public -
End Edit of a DataGrid so that it updates it’s DataSource
When you make changes to a DataGrid a picture of a Pencil appears on the right hand side. As I understand it, the DataSource is not updated until you move off that row and the Pencil disappears.
If one of my users were to close the form without remembering to press the “Update Database” button then the changes would be lost. So I wrote a procedure for the On Closing Event that checks for Modified rows, and if there are it prompts... -
DataGrid new row event
Is it possible to "catch" a new row event in a DataGrid? A user adds a new row in a DataGrid that would create a new row in the DataGrid's DataSource. I want to "catch" that event. Is that possible?
My problem is that I show two column from a DataTable of 4 columns by using TableStyles. When the user enters those two values, I have to enter some default values for the other two columns via a New Row Event.
... -
Ahh... I see what you mean. Not really what I was looking for but it might do the trick. Thank you so much for looking into this for me!...Leave a comment:
-
------------------------------------------------------------
No... I did set the focus to the next control in my original code like this:
Panel1.Controls (i).Focus()
Where 'i' is an iterated integer that went through each of the controls. What I was hoping to find out was for a given control which control would I need to set the focus to next? Which is the next control with in the TabIndex?...Leave a comment:
-
Thanks so much for looking at this!
No... it is a timesheet programme. The idea is to make it as easy as possible for people to fill in their times. So once they have entered the time they got into work in one Custom Controls (in effect a TextBox), it moves straight to the next box (which would have the next number in the Tabindex) eg when you went for lunch.
By using the TabIndex I wanted to bypass writting extra code...Leave a comment:
-
Tabbing Through Controls
I would like to Programmaticall y move from one control to another following the TabIndex. If the user were to fill the maximum length of any one of a number of TextBoxs they would automatically be moved to the next TextBox.
I have written this, and it works. It loops through each control until it finds the TabIndex + 1. But there must be a better way. Any ideas?
[CODE=vb] Private Sub MoveToNextContr ol(ByVal Sender...
No activity results to display
Show More
Leave a comment: