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

[Solved] How to Move Row up and Down.

3 Answers 300 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Victor
Top achievements
Rank 1
Victor asked on 20 Feb 2008, 07:24 PM
I am using Prometheus Rad Grid. i have Image Button in Grid to move up and down. Can any one help me out how to do row up and down in prometheus..i have seen some threads for that but none is working out..

Thank You
 

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 25 Feb 2008, 12:25 PM
Hello Victor,

Here is an example:
http://www.telerik.com/community/code-library/submission/b311D-bcdkac.aspx

Kind regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Victor
Top achievements
Rank 1
answered on 26 Feb 2008, 08:57 AM

Thanks For the Reply but i did manage to do move up and down with Prometheus with out Ajax and now i want to do with ajax.

Here i am sending you few code line,
In Rad Grid I added ImageButtons to move up and down and its working fine but now i want to do it with ajax.with click of move up and move down Imagebutton from the grid.

Problem is how to Assign Unique Name of ImageButton to AJAX ControlID

<telerik:RadGrid ID="RadGridAlternateWording" runat="server" GridLines="Both" AutoGenerateColumns="False"   
 
 
 
 
 
 
 
 
 
 
Skin="Telerik" MasterTableView-EditMode="InPlace"   
 
 
 
 
 
 
 
 
 
 
Width="500px" ShowHeader="false" OnNeedDataSource="RadGridAlternateWording_NeedDataSource"   
 
 
 
 
 
 
 
 
 
 
OnItemCommand="RadGridAlternateWording_ItemCommand"   
 
 
 
 
 
ondeletecommand="RadGridAlternateWording_DeleteCommand"   
 
 
 
 
 
onupdatecommand="RadGridAlternateWording_UpdateCommand">   
 
 
 
 
 
 
 
 
 
 
<ValidationSettings CommandsToValidate="PerformInsert,Update" />   
 
 
 
 
 
 
 
 
 
 
<MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="AlternateWordingID"   
 
 
 
 
 
 
 
 
 
 
HorizontalAlign="Left" AutoGenerateColumns="False" CommandItemSettings-AddNewRecordText="Add Alternate Wording"   
 
 
 
 
 
 
 
 
 
 
CommandItemSettings-RefreshText="">   
 
 
 
 
 
 
 
 
 
 
<Columns>   
 
 
 
 
 
 
 
 
 
 
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"   
 
 
 
 
 
 
 
 
 
 
HeaderStyle-Width="10px"/>   
 
 
 
 
 
 
 
 
 
 
<telerik:GridBoundColumn DataField="AlternateWordingID" HeaderText="ID" ReadOnly="True"   
 
 
 
 
 
 
 
 
 
 
HeaderStyle-Width="0px" UniqueName="AlternateWordingID" Visible="False"/>   
 
 
 
 
 
 
 
 
 
 
<telerik:GridBoundColumn DataField="WordingNumber" HeaderText="Number" ReadOnly="True"   
 
 
 
 
 
 
 
 
 
 
HeaderStyle-Width="0px" UniqueName="WordingNumber" Visible="False"/>   
 
 
 
 
 
 
 
 
 
 
<telerik:GridBoundColumn Visible="true" DataField="WordingText" HeaderText="Text"   
 
 
 
 
 
 
 
 
 
 
HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="380px" UniqueName="WordingText"/>   
 
 
 
 
 
 
 
 
 
 
<telerik:GridButtonColumn HeaderStyle-Width="10px" ConfirmText ="Are you sure you want to delete this record" ButtonType="ImageButton"   
 
 
 
 
 
CommandName ="delete" ImageUrl="~/images/Delete.gif" />   
 
 
 
 
 
 
 
 
 
<telerik:GridButtonColumn HeaderStyle-Width="5px" UniqueName="MoveUp" ButtonType="ImageButton" 
   
ImageUrl="~/images/ArrowUp.gif" CommandName="MoveUp" /> 
   
<telerik:GridButtonColumn HeaderStyle-Width="5px" ButtonType="ImageButton" ImageUrl="~/images/ArrowDown.gif" 
   
CommandName="MoveDown" /> 
 
 
 
 
</Columns>   
 
 
 
 
 
 
 
 
 
 
</MasterTableView>   
 
 
 
 
 
 
 
 
 
 
</telerik:RadGrid> 
 
 
 
 
 
 
 
 
 
 
 
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">   
 
 
 
 
 
 
 
 
 
 
<AjaxSettings>   
 
 
 
 
 
 
 
 
 
 
<telerik:AjaxSetting AjaxControlID="RadGridAlternateWording">   
 
 
 
 
 
 
 
 
 
 
<UpdatedControls>   
 
 
 
 
 
 
 
 
 
 
<telerik:AjaxUpdatedControl ControlID="RadGridAlternateWording" />   
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<telerik:AjaxUpdatedControl ControlID="MoveUp"/>  
 
 
 
 
 
 
</UpdatedControls>   
 
 
 
 
 
 
 
 
 
 
</telerik:AjaxSetting>   
 
 
 
 
 
 
 
 
 
 
<telerik:AjaxSetting AjaxControlID="SubmitButton">   
 
 
 
 
 
 
 
 
 
 
<UpdatedControls>   
 
 
 
 
 
 
 
 
 
 
<telerik:AjaxUpdatedControl ControlID="RadGridAlternateWording" />   
 
 
 
 
 
 
 
 
 
 
 
 
<telerik:AjaxUpdatedControl ControlID="MoveDown" /> 
 
 
 
 
 
 
</UpdatedControls>   
 
 
 
 
 
 
 
 
 
 
</telerik:AjaxSetting>   
 
 
 
 
 
 
 
 
 
 
</AjaxSettings>   
 
 
 
 
 
 
 
 
 
 
</telerik:RadAjaxManager>   
 
 
 
 

This code gives error of
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). after adding ajax.

0
Sebastian
Telerik team
answered on 26 Feb 2008, 09:41 AM
Hi Victor,

Can the cause of the issue be related to using server code blocks without wrapping them in RadCodeBlock? Review this article from the online documentation which elaborates on this subject:

http://www.telerik.com/help/radcontrols/prometheus/?ajxRadScriptBlockRadCodeBlock.html

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Victor
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Victor
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or