pittsfield-jew

The first post says it all Shalom, This is the home of the Pittsfield Jew. Sure its neat to read about Jews in Brooklyn who are very observant but how about a not so observant Jew who lives in the Mid West?

Friday, June 05, 2009

continuing theme

For Jonny the continuing theme is programming in ASP.NET

Jonny is up to page 134 of One Man Running. He just finished reading the reviews of that other bok.

Jonny rode his bike to Hollywood and then rode to the Hilton. Later he ride back to the pleasure palace for the final 2 mile leg of the 6 mile journey. Both Hollywood and the Hilton are 2 miles away from Jonny's home. In addition, Hollywood and the Hilton and 2 miles apart.

Jonny read all his jewish blogs today.

Here is the code Jonny wrote to modify the gridview based on the field name instead of the index number. For example if you wanted to get select student_name from student you would do something like, where gv is a gridview

string text_var = gv.selectedrow.cells(1).text, Jonny apologizes to those who prefer hard to maintain code, that keeps you employed.

Public Sub setGridViewText(ByVal gv As GridView, _
ByVal field As String, ByVal fieldVal As String)
Dim dcfc As DataControlFieldCollection = gv.Columns
Dim rtnval As String = ""
For Each dcf As DataControlField In dcfc
If dcf.HeaderText = field Then
gv.SelectedRow.Cells(dcfc.IndexOf(dcf)).Text = fieldVal
End If
Next
End Sub

as in
dim hwf as new helperWebForm
string text_var = hwf.getGridViewText(gv, "student_name")
or
hwf.setGridViewText(gv, "student_name", "mr. genius")

0 Comments:

Post a Comment

<< Home

 
Listed on BlogShares