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

[Solved] RadGrid with Column Reorder

3 Answers 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Wei En
Top achievements
Rank 1
Wei En asked on 02 Jul 2014, 06:56 AM
The below code allow me to highlight/select the text fields in my RadGrid to allow me to Ctrl+C(copy) or Ctrl+v(paste), but I'm unable to Move the Column as i have already set the AllowColumnsReorder="true" ReorderColumnsOnClient="true".

Its Urgent... Someone please help.

Below is my code.

<telerik:RadGrid ID="ResultRadGrid" runat="server" AutoGenerateColumns="false"
           AllowSorting="True" GridLines="None" Skin="Office2007" OnSortCommand="ResultRadGrid_SortCommand">           
          <MasterTableView AllowMultiColumnSorting="true" TableLayout="Fixed">
            <Columns>
              <telerik:GridTemplateColumn>                    
                <HeaderTemplate>
                  <label id="completelbl"></label>
                  &nbsp;<input id="SelectALLCB" type="checkbox" onclick="CheckAllDataGridCheckBoxes('MassChangeChkbx',this.checked)">
                </HeaderTemplate>
                <ItemTemplate>
                  <asp:CheckBox ID="MassChangeChkbx" runat="server" />
                    <asp:Label ID="DetailLbl" runat="server"></asp:Label>
                    <a id="lnkCopy" href='<%#DataBinder.Eval(Container,"DataItem.id")%>' onclick="return confirm('Confirm copy?')"
                      onserverclick="CtnrTripDetail_Copy" runat="server">
                      <img id="Img1" src="..\..\image\copy.png" width="15" height="15" border="0" alt="Copy exact"
                        runat="server"></a> <a id="A1" href='<%#DataBinder.Eval(Container,"DataItem.id")%>'
                          onclick="return confirm('Confirm copy with reverse address?')"  onserverclick="CtnrTripDetail_CopyRA"
                          runat="server">
                          <img id="Img2" src="..\..\image\copy.png" width="15" height="15" border="0" alt="Copy reverse address"
                            runat="server"></a>
                    <asp:Label ID="DMWTLbl" runat="server"></asp:Label>
                    <asp:Label ID="ESNLbl" runat="server"></asp:Label>
                    <asp:Label ID="RedFlagLbl" runat="server"></asp:Label>
                </ItemTemplate>
              </telerik:GridTemplateColumn>
              <telerik:GridBoundColumn HeaderText="JobNo" DataField="jobno" AllowFiltering="true" ColumnGroupName="jobno" 
                                        SortExpression="jobno" UniqueName="jobno" >
              </telerik:GridBoundColumn>
              <telerik:GridBoundColumn HeaderText="Account" DataField="accode" AllowFiltering="true" ColumnGroupName="accode" 
                                        SortExpression="accode" UniqueName="accode">
              </telerik:GridBoundColumn>
            </Columns>
          </MasterTableView>
          <SortingSettings SortedBackColor="#FFF6D6" EnableSkinSortStyles="false"></SortingSettings>
          <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" ClientEvents-OnGridCreated="onGridCreated">
          </ClientSettings>

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Jul 2014, 07:42 AM
Hi Wei En,

I have tried your code and it works fine. Make sure you have all the clientside functions definition written. Please check this demo Grid - Column/Row Resize/Reorder and check with your code.

Thanks,
Princy
0
Wei En
Top achievements
Rank 1
answered on 02 Jul 2014, 08:27 AM
Thank Princy for your prompt reply.

I still unable to do it i get only either i can move the column  by removing  ClientEvents-OnGridCreated="onGridCreated"or i can highlight/select the text to copy and paste in other area by adding ClientEvents-OnGridCreated="onGridCreated".

Could there be other code that is blocking this? how can i send you my aspx file?

Thanks 
0
Princy
Top achievements
Rank 2
answered on 03 Jul 2014, 04:52 AM
Hi Wei En,

I'm not sure what you are writing in OnGridCreated event. Can you please paste your code for the event so that I may replicate the issue.

Thanks,
Princy
Tags
Grid
Asked by
Wei En
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Wei En
Top achievements
Rank 1
Share this question
or