8 Answers, 1 is accepted
0
Richard Slade
Top achievements
Rank 2
answered on 28 Mar 2011, 01:48 PM
Hello,
Please could you be more specific about what you would like to achieve. For reference, the help topic on programatically binding to hierarchy data can be found here.
Look forward to hearing back from you
Richard
Please could you be more specific about what you would like to achieve. For reference, the help topic on programatically binding to hierarchy data can be found here.
Look forward to hearing back from you
Richard
0
KawaUser
Top achievements
Rank 2
answered on 28 Mar 2011, 01:52 PM
How do you type in the column and commit the information to the DB?
Thank you,
Chuck
Thank you,
Chuck
0
Richard Slade
Top achievements
Rank 2
answered on 28 Mar 2011, 01:55 PM
Hello,
As long as the column allows editing, then you can click to edit a cell just as you would in the Master Template.
Commiting the data to the database will depend on how you are dealing with your databadse. E.g. Via an ORM, table adapters etc...
Regards,
Richard
As long as the column allows editing, then you can click to edit a cell just as you would in the Master Template.
Commiting the data to the database will depend on how you are dealing with your databadse. E.g. Via an ORM, table adapters etc...
Regards,
Richard
0
KawaUser
Top achievements
Rank 2
answered on 28 Mar 2011, 05:50 PM
I commit it to the database on the cell end edit event using SQL update.
Thanks,
Chuck
Thanks,
Chuck
0
Accepted
Hello KawaUser,
Thank you for writing.
I am still not sure that I understand your requirement. In case you want to update sql database, please find detailed description how to do that in the following msdn article.
If this does not help, please provide us with more details of your exact scenario and your goals.
Best wishes, Martin Vasilev
the Telerik team
Thank you for writing.
I am still not sure that I understand your requirement. In case you want to update sql database, please find detailed description how to do that in the following msdn article.
If this does not help, please provide us with more details of your exact scenario and your goals.
Best wishes, Martin Vasilev
the Telerik team
0
KawaUser
Top achievements
Rank 2
answered on 05 May 2011, 06:00 PM
I want to do something similar to this, but for the template.
How do I call the template column?
ANSWER:
How do I call the template column?
If DataGridReject.CurrentColumn.HeaderText = "ADMIN FEE" Then Dim header = DataGridReject.CurrentColumn.Name If e.Value Is Nothing Then ElseIf e.Value.ToString = "1" Then Dim updateString As String = "UPDATE REJECT_REPORT SET " + header + " = '1' WHERE REJECT_ID = '" + rejectID + "'" conn.Open() Dim comm = New SqlCommand(updateString, conn) comm.ExecuteNonQuery() conn.Close() ElseIf e.Value.ToString = "0" Then Dim boxValue As Integer = 0 Dim updateString As String = "UPDATE REJECT_REPORT SET " + header + " = '0' WHERE REJECT_ID = '" + rejectID + "'" conn.Open() Dim comm = New SqlCommand(updateString, conn) comm.ExecuteNonQuery() conn.Close() End If End IfANSWER:
If DataGridReject.Templates(0).CurrentColumn.HeaderText = "MATERIAL_NO" Then Dim MATERIAL As String = "" End If0
Hello KawaUser,
Thank you for sharing your code with us.
As far as I understand you have managed to find a solution for your requirement. Feel free to write me back if you have any additional questions.
Greetings,
Martin Vasilev
the Telerik team
Thank you for sharing your code with us.
As far as I understand you have managed to find a solution for your requirement. Feel free to write me back if you have any additional questions.
Greetings,
Martin Vasilev
the Telerik team
0
KawaUser
Top achievements
Rank 2
answered on 10 May 2011, 04:04 PM
Yes, I have figured this problem out. I wanted to programatically edit the cells. This is the code inside the datagrid_cellendedit sub routine.
If DataGridReject.Templates(0).CurrentColumn.HeaderText = "MATERIAL_NO" Then Dim rejectID = DataGridReject.CurrentRow.Cells(2).Value.ToString Dim revision = DataGridReject.CurrentRow.Cells(3).Value.ToString Dim materialUpdateStr As String = "exec spRR_UPDATEPARTSLISTMATERIAL '" + rejectID + "', '" + revision + "', '" + e.Value.ToString + "'" conn.Open() Dim comm = New SqlCommand(materialUpdateStr, conn) comm.ExecuteNonQuery() conn.Close() End If