What I am trying to do is reorder a set of questions. What i pull into the grid is the
intQuestionID, strQuestion and the intOrder
What I want to be able to do is drag and drop and reorder the questions, do you have an example of doing this only server side using the Radgrid_rowDrop.
<tr>
<td align="left"><telerik:RadGrid ID="myRad" runat="server" ClientSettings-AllowRowsDragDrop="true" ClientSettings-Selecting-AllowRowSelect="true"
ClientSettings-Selecting-EnableDragToSelectRows="false">
<MasterTableView AutoGenerateColumns="false" DataKeyNames="intQuestionId">
<HeaderStyle ForeColor="White" CssClass="backColor" BackColor="Steelblue" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
<Columns>
<telerik:GridDragDropColumn HeaderStyle-Width="18px"></telerik:GridDragDropColumn>
<telerik:GridBoundColumn DataField="strQuestion" HeaderText="Question"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="IntOrder" HeaderText="Order"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid></td>
</tr>
Protected Sub ddlQuestions_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlQuestions.SelectedIndexChanged
Dim catId As String = ddlQuestions.SelectedValue
If catId = "0" Then
ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "OpenWindow", "PickCategory();", True)
Else
FillGrid()
End If
End Sub
Private Sub FillGrid()
Dim CatId As String = ddlQuestions.SelectedValue
Dim itemCount As Integer = 0
sql = "Select intQuestionId, strQuestion, intOrder from tblSRPQuestion where intCategoryID = " & CatId
myDataTable = New DataTable
myDataTable = getData(sql)
myRad.DataSource = getData(sql)
myRad.DataBind()
End Sub
Protected Sub myRad_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs) Handles myRad.RowDrop
End Sub