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

Drag and Drop Rows Not Working

4 Answers 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 01 Nov 2013, 09:45 AM
Hello,

I'm following the code example from : http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx

I have set up a ClientSettings tag and set the various flags as appropriate.  Drag and drop is not working on my grid.  Any ideas? I've pasted my RadGrad tag below.

Thanks in Advance!

<telerik:RadGrid
    ID="dgWorkflowItems"
    runat="server"
    ClientIDMode="Static"
    AutoGenerateColumns="False"
    EnableEmbeddedSkins="False"
    EnableNoRecordsTemplate ="True"                      
    Visible="True"
    Skin="bdbk"
    OnRowDrop="dgWorkflowItems_OnRowDrop"
    OnPreRender="dgWorkflowItems_OnPreRender"
    OnNeedDataSource="dgWorkflowItems_OnNeedDataSource">
     
    <ClientSettings AllowRowsDragDrop="true" EnableRowHoverStyle="false" >
        <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />
        <ClientEvents OnRowDropping="onRowDropping" />
    </ClientSettings>
 
    <MasterTableView TableLayout="Fixed">
        <NoRecordsTemplate >
           <div style="height:30px;">No Contributions found for this meeting.</div>
        </NoRecordsTemplate>
        <Columns>
            <telerik:GridBoundColumn DataField="ContributionKey"
                Visible="False"
                DataType="System.Int32"
                HeaderText="ContribKey" UniqueName="ContribKey">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn
                UniqueName="CheckForSubmit"
                HeaderText="Submit"
                HeaderStyle-Width="3em"
                HeaderTooltip="Select items to submit for review and click the submit button below."
                />
            <telerik:GridBoundColumn HeaderText="Subject/Bookmark"
                UniqueName="SubjectBookmark"
                DataField="Description"
                ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn
                DataField="Status"
                UniqueName="Status"
                HeaderText="Status">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn
                HeaderText="Document"
                UniqueName="Document"
                HeaderStyle-Width="6em"
                DataField="DocumentName"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn
                HeaderText="Instructions"
                UniqueName="Instructions"
                DataField="Instructions">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn
                HeaderText="Contributor"
                DataField="Contributor"
                UniqueName="Contributor"
                ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn
                DataField="ContributionType"
                UniqueName="ContributionType"
                Visible="False"
                >
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

4 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 02 Nov 2013, 12:39 AM
I figured it out... DnD works when not in ClientIDMode="static".  My guess is that's a bug.  :-)

Thanks!
0
Viktor Tachev
Telerik team
answered on 05 Nov 2013, 04:36 PM
Hi Richard,

Please note that setting ClientIDMode of RadControls to Static is not supported.Static ClientIDMode is recommended to be used only for static controls. RadControls use complex hierarchies of child controls and templates and Static ClientIDMode will break their functionality. You should use AutoID mode especially when Ajax requests are performed by the controls.

Also have in mind that if the RadGrid has ClientIDMode="Static" none of the client side row specific events will fire as stated in this article.

I hope this information would be helpful to you.

Regards,
Viktor Tachev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Richard
Top achievements
Rank 1
answered on 05 Nov 2013, 04:55 PM
Thanks, Viktor. 
It's a good explanation and it's very reasonable why static is not supported.

I would make the case, though, that the Control should show an error if the user tries to use an invalid value. 

Thanks, again!
Rich
0
Viktor Tachev
Telerik team
answered on 08 Nov 2013, 12:46 PM
Hi Richard,

Thank you for the suggestion.

If you would like you could add it as a feature request in our Ideas & Feedback Portal here. There it could be seen and voted for by other users. The more votes it has the highest priority it gets. If it gets popular enough it will probably be included in a future version of RadControls.

Regards,
Viktor Tachev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or