This is a migrated thread and some comments may be shown as answers.

Inserting Template field data of RADGRID

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
rohit
Top achievements
Rank 1
rohit asked on 20 Jan 2011, 10:13 PM
Here in my code, I am inserting bound field data, can anyone send me code samplefor how to insert Template field data.(TextBox)

Public Sub InsertData() 
For Each item As GridDataItem In GD_Prod.Items
    Dim str0 As String = item("port_recipe_num").Text
    Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("FConnectionString").ConnectionString)
            Dim cmd As New SqlCommand("P_FN_PR_InsertGridData", con)
            cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@PL_Recipe_Number", SqlDbType.Char).Value = str0
      con.Open()
            cmd.ExecuteNonQuery()
con.Close()
Next
End Sub

Thanks In Advance.

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 25 Jan 2011, 12:50 PM
Hello Rohit,

To implement the desired functionality, you can find the control in the grid cell and extract its value:
Dim txtBox As TextBox = item["TemplateColumnUniqueName"].FindControl("TextBox1")
Dim str As String = txtBox.Text

I hope this helps.

Best wishes,
Mira
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
rohit
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or