Sunday, November 30, 2003

New Organization to the Site

I took the weekend and reorganized the site a little. As the result of this I have a few new categories that I created. Please pass on to anyone that may be interested. I was trying to order things and make it a little easier to find things. 

 

General Stuff

General Stuff RSS Feed

 

DataGrid Programming

DataGrid Programming RSS Feed

 

InfoPath Tips and Tricks

InfoPath Tips and Tricks RSS Feed

 

Windows Forms Tips and Tricks

Windows Forms Tips and Tricks RSS Feed

 


7:21:40 PM    
comment [] trackback []

Accessing Casted Controls

Let’s start with a DataGrid that looks like the following

If we wanted to retrieve the value that a user selects from the drop down list control shown in Column 4 into a value. We would use the following code.

' Gets the value the dropdown control in the fourth column
Dim drop As DropDownList
drop = CType(e.Item.Cells(4).Controls(1), DropDownList)currentquantity = drop.SelectedValue

The above code is creating a local copy of the control using a cast. Once the local copy is created you can access the standard controls defined for the control.


4:38:04 PM    
comment [] trackback []