Sending information on RowDrop server side event

2 posts, 0 answers
  1. Giovanni Soldi
    Giovanni Soldi avatar
    3 posts
    Member since:
    Feb 2009

    Posted 10 Jan 2011 Link to this post


    I'm trying to send more information to process on the server side when a RadGrid Row is dropped. The issue is that the default postback event is very limited. You can't for example pass a simple string with a value. Right now the only solution I can think of is cancelling the RowDrop event in the client side and do another postback this time with my data passed in. Does anyone know another way to do it?

    Seems very limited that you can have only a destination HTMLElement and a destination DataItem. Would be cool another argument let's say for passing arbitrary data.
  2. Vasil
    Vasil avatar
    1604 posts

    Posted 10 Jan 2011 Link to this post

    Hello Giovanni,

    You can pass values through a hidden field. See the code snippets bellow:

    <asp:HiddenField runat="server" ID="HiddenField1" Value="Default" />
    <telerik:RadCodeBlock runat="server" ID="RadCodeBlock1">
      <script type="text/javascript">
        document.getElementById('<%=HiddenField1.ClientID%>').value = "Some text set on client";
    <telerik:RadGrid ID="RadGrid1" runat="server" onrowdrop="RadGrid1_RowDrop">
    protected void RadGrid1_RowDrop(object sender,
             Telerik.Web.UI.GridDragDropEventArgs e)
        String passedValue = HiddenField1.Value;

    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.
Back to Top