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

Row Drag & Drop is not working

0 Answers 24 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sergei
Top achievements
Rank 1
Sergei asked on 24 May 2012, 07:02 PM
   Hi, I developed a custom asp.net user control that uploads images from a client machine to the app server. I used Telerik RadGrid. The only problem I have is not being able to drag and drop rows. I have gone through the relevant documentation online and examples and was able to simulate the same behavior but the grid in my control seems to stumble over something I have not been able to figure out. I am posting a snippet here... If it s not going to help, I can send a demo asp.net web site project and the control library project. It's C# and .NET 4.0  Thank you.
<div>
  <telerik:RadGrid
            ID="grdImageGroups"
            runat="server"
            AutoGenerateColumns="False"
            ShowFooter="true"
            Height="232px"
            Skin="Office2007"
            AllowSorting="true"
            Width="237px"
            GridLines="None"
            Visible="true"
            AllowMultiRowSelection="false"
            OnItemCommand="grdImageGroups_ItemCommand"
            OnSelectedIndexChanged="grdImageGroups_OnSelectedIndexChanged"  
            OnRowDrop="grdImageGroups_RowDrop"
            OnItemDataBound="RadGrid1_ItemDataBound">
            <MasterTableView DataKeyNames="Key" ShowHeader="true" ShowHeadersWhenNoRecords="true"  >
                 <SortExpressions>
                        <telerik:GridSortExpression FieldName="Title" SortOrder="Ascending" />
                    </SortExpressions>
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="colCheck" Visible="true" ItemStyle-Width="30px" HeaderStyle-Width="30px" >
                             <ItemTemplate>
                                <asp:CheckBox runat="server" ID="chkSelectRow" onclick="CheckRow(this);" />
                            </ItemTemplate>
                            <ItemStyle Width="15px" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="colImage" DataField="OriginalImageFile" ItemStyle-Width="30px" HeaderStyle-Width="30px">  
                           <ItemTemplate>  
                            <asp:Image ID="Image1" ImageUrl='<%# Eval("OriginalImageFile") %>' Height="20px" Width="20px" runat="server"  style="height:20px; width:20px" />  
                           </ItemTemplate>  
                        </telerik:GridTemplateColumn>  
                        <telerik:GridTemplateColumn HeaderText ="Image Name" DataField="Title"   UniqueName="colCheck" ItemStyle-Width="140px" HeaderStyle-Width="140">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblTitle" Text='<%# TruncatedTitle(Convert.ToString(Eval("Title")), 25) %>' ToolTip='<%# Eval("Title") %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings  AllowRowsDragDrop="true" EnablePostBackOnRowClick="True">
                    <Selecting AllowRowSelect="true" EnableDragToSelectRows="false"  />
                    <ClientEvents OnRowDropped="RowDropped" OnRowSelected="RowSelected" OnRowDragStarted="displaymessage" />
                    <Scrolling AllowScroll="True" UseStaticHeaders="true" />
                </ClientSettings>
            </telerik:RadGrid>
<div>

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Sergei
Top achievements
Rank 1
Share this question
or