Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
76 views
Hi,

I would really like to be able to use MoveUp.gif and MoveDown.gif for my row ordering functionality. I need to know if there is a specific string I should use for ImageURL (similar to Edit/Update/Delete) or if I need to copy those files from their skin folder into my app folder structure and refer to them as I would any other URL.I have looked all over the demos and documentation but haven't found anything specific.

Any and all help greatly appreciated,
B
Raj
Top achievements
Rank 1
 answered on 12 Apr 2012
4 answers
97 views
Hi,

i have a grid with 5 link button's in a row. When i export to excel i need this data in excel. But when i set

 

 

 

 

 

 

<ExportSettings IgnorePaging="True" ExportOnlyData = "true" OpenInNewWindow="true" >

 


I get empty data in my link button columns.  When i set

 

 

<ExportSettings IgnorePaging="True" ExportOnlyData = "false" OpenInNewWindow="true" >

 


i get header and other junk images in the excel sheet.

I have tried setting the text as shown below:

 

 

protected void grid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)

 

{

 

 

 

 

 

foreach (GridDataItem __item in grid.Items)

 

{

 

 

 

 

 

 

LinkButton eventIDLinkbutton = __item["EventID"].Controls[0] as LinkButton;

 

 

 

 

 

__item[

 

"EventID"].Text = eventIDLinkbutton.Text;

 

}

}

But the EventID column is still empty. Could you please help me? Should i rebind the radgrid?

Ash
Top achievements
Rank 1
 answered on 12 Apr 2012
1 answer
225 views
Hi,

Have a smiley day..

I am using radgrid with gridtableview in detailtables. I need to move rows up / down within that gridtableview.

I have used the following coding snippet.. and find underlined line in the snippet
..(ie.. $find("<%= grdProgramDetails.MasterTableView.ClientID %>").selectItem(targetRow);  ....

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="GridHierarchy_DragDrop.aspx.vb" Inherits="samples.GridHierarchy_DragDrop" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title>Untitled Page</title> 
     <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">  
 
        <script type="text/javascript">    
                var _selectedRow;    
                function RadGrid1_RowSelected(sender, args)    
                {     
                    _selectedRow = $get(args.get_id());    
                }    
   
                function MoveRowUp()    
                {   
                  
                    if (_selectedRow && _selectedRow.sectionRowIndex > 0)    
                    {    
                        swapRows(_selectedRow, _selectedRow.parentNode.rows[_selectedRow.sectionRowIndex - 1])  
                       // _selectedRow.Control.swapNode(_selectedRow.Control.parentNode.rows[_selectedRow.Control.sectionRowIndex - 1]);     
                    }    
                      
                     
                }    
   
                function MoveRowDown()    
                {    
                  
                    if (_selectedRow && _selectedRow.sectionRowIndex < _selectedRow.parentNode.rows.length - 1)    
                    {    
                        swapRows(_selectedRow, _selectedRow.parentNode.rows[_selectedRow.sectionRowIndex + 1])  
                       // _selectedRow.Control.parentNode.rows[_selectedRow.Control.sectionRowIndex + 1].swapNode(_selectedRow.Control);     
                    }    
                      
                     
                }    
   
                function serializeChanges(index1, index2)    
                {    
                    var reorderInput = document.getElementById("ReorderChanges");    
                    if (reorderInput)    
                    {    
                        reorderInput.value += index1 + "," + index2 + ";";    
                    }    
                }    
                    
                function swapRows(sourceRow, targetRow)    
                {    
                   for(var i = 0; i < sourceRow.cells.length; i++)  
                   {  
                        var cellContent1 = targetRow.cells[i].innerHTML;  
                        var cellContent2 = sourceRow.cells[i].innerHTML;  
                        targetRow.cells[i].innerHTML = cellContent2;  
                        sourceRow.cells[i].innerHTML = cellContent1;  
                   }  
                   $find("<%= grdProgramDetails.MasterTableView.ClientID %>").selectItem(targetRow);  
                   serializeChanges(sourceRow.sectionRowIndex, targetRow.sectionRowIndex);  
                     
                }  
        </script> 
 
    </telerik:RadScriptBlock> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager" runat="server" /> 
   <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="All">  
        </telerik:RadFormDecorator> 
                          
        <telerik:RadMultiPage ID="RadMultiPage1" Width="530px" runat="server" SelectedIndex="0" > 
                        <telerik:RadPageView ID="RadPageView1" runat="server">  
                          
                         <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Style="width: 320px; " Skin="Vista" EnableAjaxSkinRendering="true" >   
        </telerik:RadAjaxLoadingPanel> 
 
<telerik:RadAjaxLoadingPanel ID="LoadingPanel2" runat="server" Style="width: 320px; " Skin="Vista" Direction="RightToLeft" EnableAjaxSkinRendering="true">   
        </telerik:RadAjaxLoadingPanel> 
          
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="grdProgramDetails">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="grdProgramDetails" LoadingPanelID="LoadingPanel1"/>  
                        <telerik:AjaxUpdatedControl ControlID="grdCommercialDetails" LoadingPanelID="LoadingPanel2"/>     
                          
                                         
                     </UpdatedControls> 
                     </telerik:AjaxSetting> 
                       
                     <telerik:AjaxSetting AjaxControlID="grdCommercialDetails">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="grdProgramDetails" LoadingPanelID="LoadingPanel2"/>  
                        <telerik:AjaxUpdatedControl ControlID="grdCommercialDetails" LoadingPanelID="LoadingPanel1"/>     
                          
                                         
                     </UpdatedControls> 
                     </telerik:AjaxSetting> 
                     </AjaxSettings> 
                     </telerik:RadAjaxManager> 
         
        <br /> 
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="1000" Height="550">  
           <telerik:RadPane ID="LeftPane" runat="server" Width="22px" Scrolling="none">  
                <telerik:RadSlidingZone ID="SlidingZone1" runat="server" Width="22px">  
                    <telerik:RadSlidingPane ID="RadSlidingPane1" Title="Pane1" runat="server" Width="150px">  
                        Pane 1 Content  
                    </telerik:RadSlidingPane> 
                    <telerik:RadSlidingPane ID="Radslidingpane2" Title="Pane2" runat="server" Width="150px">  
                        Pane 2 Content  
                    </telerik:RadSlidingPane> 
                    <telerik:RadSlidingPane ID="Radslidingpane3" Title="Pane3" runat="server" Width="150px">  
                        Pane 3 Content  
                    </telerik:RadSlidingPane> 
                </telerik:RadSlidingZone> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="Radsplitbar1" runat="server"></telerik:RadSplitBar> 
            <telerik:RadPane ID="MiddlePane1" runat="server" Scrolling="None">  
                <telerik:RadSplitter ID="Radsplitter2" runat="server" Orientation="Horizontal" VisibleDuringInit="false">  
                    <%--<telerik:RadPane ID="Radpane1" runat="server" Height="22px" Scrolling="none">  
                        <telerik:RadSlidingZone ID="Radslidingzone2" runat="server" Height="22px" SlideDirection="Bottom">  
                            <telerik:RadSlidingPane ID="Radslidingpane4" Title="Pane1" runat="server" Height="150px">  
                                Pane1</telerik:RadSlidingPane> 
                            <telerik:RadSlidingPane ID="Radslidingpane8" Title="Pane2" runat="server" Height="150px">  
                                Pane2</telerik:RadSlidingPane> 
                            <telerik:RadSlidingPane ID="Radslidingpane9" Title="Pane3" runat="server" Height="150px">  
                                Pane3</telerik:RadSlidingPane> 
                        </telerik:RadSlidingZone> 
                    </telerik:RadPane>--%> 
                    <telerik:RadSplitBar ID="Radsplitbar3" runat="server"></telerik:RadSplitBar> 
                    <telerik:RadPane ID="Radpane2" runat="server">  
                      
                        <div style="padding: 5px">  
                        <p> 
                  <telerik:raddocklayout id="RadDockLayout1" runat="server">  
            <table> 
                <tr> 
                    <td> 
                        <telerik:raddockzone id="RadDockZone1" runat="server" Skin="Outlook" MinWidth="500">  
                          
                        <telerik:raddock id="RadDock2" runat="server" defaultcommands="All" text=" " title="Program Details" > 
                        <ContentTemplate>                          
                            <telerik:RadGrid runat="server" ID="grdProgramDetails" OnNeedDataSource="grdProgramDetails_NeedDataSource" 
                AllowPaging="True" OnRowDrop="grdProgramDetails_RowDrop" AllowMultiRowSelection="false" Width="600" 
                PageSize="30" > 
                 <ClientSettings> 
                  
                    <Selecting AllowRowSelect="True"></Selecting> 
                    <ClientEvents OnRowSelected="RadGrid1_RowSelected"></ClientEvents> 
                </ClientSettings> 
                <MasterTableView DataKeyNames="ProgramId">  
                <NoRecordsTemplate> 
                        <div style="height: 30px; cursor: pointer;">  
                            No items to view</div> 
                 </NoRecordsTemplate> 
                  <DetailTables> 
                    <telerik:GridTableView DataKeyNames="ProgramId" AllowSorting="true" Name="grdDetailstables" CommandItemDisplay="Bottom">  
                              
                            <NoRecordsTemplate> 
                              <div style="height: 30px; cursor: pointer;">  
                            No items to view</div> 
                            </NoRecordsTemplate> 
                              
                            <CommandItemTemplate> 
                            <input type="Button" value="MoveDown" style="background-image: url('~/Images/arrow_marble_down.gif');" onclick="MoveRowDown()">  
                            <input type="hidden" name="ReorderChanges" id="ReorderChanges" runat="server" /> 
                            <input type="Button" value="MoveUp" style="background-image: url('~/Images/arrow_marble_up.gif');" onclick="MoveRowUp()">  
                              
 
                          <%--  <asp:ImageButton ImageUrl="~/Images/arrow_marble_down.gif" runat="server" ID="down" Height="40" Width="40" /> 
                            <asp:ImageButton ImageUrl="~/Images/arrow_marble_up.gif" runat="server" ID="up" Height="40" Width="40" /> 
                                     --%>                  
                            </CommandItemTemplate> 
                                      
                       
    
    
    
 
                   </telerik:GridTableView> 
                     
                 </DetailTables> 
                 <%--<Columns>    
                    <telerik:GridButtonColumn Text="Select" CommandName="Select"/>    
                    </Columns>--%> 
                </MasterTableView> 
                <SelectedItemStyle Font-Bold="true" Font-Size="Medium" ForeColor="BurlyWood" /> 
                <ClientSettings AllowRowsDragDrop="True">  
                    <Selecting AllowRowSelect="True" EnableDragToSelectRows="false"/>  
                    <%--<ClientEvents OnRowDropping="onRowDropping" />--%> 
                    <Scrolling AllowScroll="true" UseStaticHeaders="true"/>  
                </ClientSettings> 
                   
                <PagerStyle Mode="NumericPages" PageButtonCount="4" /> 
            </telerik:RadGrid> 
            </ContentTemplate> 
                            </telerik:raddock> 
                              
                            <telerik:raddock id="RadDock1" runat="server" text=" " title="Commercial Details" > 
                            <ContentTemplate> 
                            <telerik:RadGrid runat="server" ID="grdCommercialDetails" OnNeedDataSource="grdCommercialDetails_NeedDataSource" 
                AllowPaging="True" OnRowDrop="grdCommercialDetails_RowDrop" OnItemCommand="grdCommercialDetails_ItemCommand" AllowMultiRowSelection="true" 
                PageSize="30">  
                <MasterTableView DataKeyNames="CommercialId" Width="100%">  
                 <NoRecordsTemplate> 
                        <div style="height: 30px; cursor: pointer;">  
                            No items to view</div> 
                 </NoRecordsTemplate> 
                 <%-- <Columns>    
                    <telerik:GridButtonColumn Text="Select" CommandName="Select"/>    
                    </Columns>--%> 
                </MasterTableView> 
                <SelectedItemStyle Font-Bold="true" Font-Size="Medium" ForeColor="BurlyWood" /> 
                <ClientSettings AllowRowsDragDrop="True">  
                    <Selecting AllowRowSelect="True" EnableDragToSelectRows="false"/>  
                    <%--<ClientEvents OnRowDropping="onRowDropping" />--%> 
                    <Scrolling AllowScroll="true" UseStaticHeaders="true"/>  
                </ClientSettings> 
                 
                <PagerStyle Mode="NumericPages" PageButtonCount="4" /> 
                 
            </telerik:RadGrid> 
            </ContentTemplate> 
                            </telerik:raddock> 
                                                      
                        </telerik:raddockzone> 
                    </td> 
                     
                </tr> 
            </table> 
        </telerik:raddocklayout> 
                            </p> 
                              
                        </div> 
                    </telerik:RadPane> 
                </telerik:RadSplitter> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="RadSplitBar2" runat="server"></telerik:RadSplitBar> 
            <telerik:RadPane ID="EndPane" runat="server" Width="22px" Scrolling="None">  
                <telerik:RadSlidingZone ID="Radslidingzone1" runat="server" Width="22px" ClickToOpen="true" 
                    SlideDirection="Left">  
                    <telerik:RadSlidingPane ID="Radslidingcommercial" Title="Commercial" runat="server" Width="555px">  
                    <div> 
                    <h2> 
                                Commercial Details..  
                    </h2> 
                          
            </div> 
                    </telerik:RadSlidingPane> 
                    <telerik:RadSlidingPane ID="Radslidingpane6" Title="Skin" runat="server" Width="200px">  
                       <div id="ThumbsArea">  
                            <asp:RadioButtonList ID="ThumbsList" AutoPostBack="true" runat="server" RepeatColumns="2"   
                             RepeatDirection="Horizontal" OnSelectedIndexChanged="ThumbsList_SelectedIndexChanged">  
                </asp:RadioButtonList> 
            </div> 
                    </telerik:RadSlidingPane> 
                    <telerik:RadSlidingPane ID="Radslidingpane7" Title="Pane3" runat="server" Width="150px">  
                        Pane 3 Content  
                    </telerik:RadSlidingPane> 
                </telerik:RadSlidingZone> 
            </telerik:RadPane> 
        </telerik:RadSplitter> 
</telerik:RadPageView> 
</telerik:RadMultiPage> 
      
    </form> 
</body> 
</html> 
 


I have to set the clientid in the above mentioned code for that DetailTables -> GridTableView.... otherwise its selecting multiple row when moving rows.

And how to update in sql server table?...

Please give any suggestions.

thanks in advance.

regards,
maha
Raj
Top achievements
Rank 1
 answered on 12 Apr 2012
2 answers
265 views
Hi,
I have a Custom File System Provider which I use to display and upload files to a shared network drive. Display files, and download files are working fine, however, upload is not working. As per this article 

Uploading File
GetFile - Returns Stream for accessing the contents of the file item with the given Url
StoreFile - Creates a file item from a Telerik.Web.UI.UploadedFile in the given path with the given name.
ResolveRootDirectoryAsTree - Update the RadTreeView in RadFileExplorer
ResolveDirectory - Updates the RadTreeView
ResolveRootDirectoryAsTree - Updates the RadGrid
ResolveDirectory - Updates the RadGrid

In my case, its not going to GetFile and StoreFile at all. I have breakpoints and Not implemented exceptions thrown from these functions and the cursor is not getting there. When I hit the upload button, the upload dialogue shows, I can select the file and click on Upload and nothing happens. 
I appreciate any inputs.
Thanks,
Saritha
saritha78
Top achievements
Rank 1
 answered on 12 Apr 2012
1 answer
54 views
Hi,

Just wanted to know does the rotator also support ipad sliding.

Thanks,
Mahesh
Slav
Telerik team
 answered on 12 Apr 2012
1 answer
71 views
Hi,
I am trying to do live updation based the following demo.
https://demos.telerik.com/aspnet-ajax/rotator/examples/livexml/defaultcs.aspx.But after updating the xml how the radrotator showing the updated value?.I am getting the updated value.How it is possible?

Slav
Telerik team
 answered on 12 Apr 2012
1 answer
58 views
Hi,
    I have created a RadDockZone dynamically and placed inside a PlaceHolder. then i draged a RadDock into it. But the problem is when I saved the state of RadDock, DockZoneId getting null. how to get the Id of Dynamically created RadDockZone when saving the state of RadDockZone. Please Help
Thanks in Advance
Jesmon Joseph
Slav
Telerik team
 answered on 12 Apr 2012
7 answers
318 views
Hi I'm trying to use a ASP.NET RadGrid in my MVC project.  I followed the documentation to get the RadGrid to display data in my view, but I'd like to be able to use the drag and drop features.  How is the best way to implement it in MVC?  Sorry if this is a repeat question, I did search both the RadGrid and MVC grid forums but couldn't find anything that was what I was looking for.  Any help would be greatly appreciated.  Thanks!
Sri
Top achievements
Rank 1
 answered on 12 Apr 2012
1 answer
134 views
Hey,

Just out of curiosity, MVVM tools like Knockout - does Telerik controls work well with these types of frameworks?  Have you done any evaluation of this?

Thanks.
Slav
Telerik team
 answered on 12 Apr 2012
1 answer
97 views
Hi,
 In rare cases, the value in an asp.TextBox validated by the RadinputManager as a Numeric Field, is showing commas on the Server Side...

On My Master Page I have:

<telerik:RadInputManager ID="SharedInputManager" runat="server">
              
             <telerik:NumericTextBoxSetting DecimalDigits="0" BehaviorID="NoCSSNumber" InitializeOnClient="false" ReadOnlyCssClass="ReadOnlyStyleInputManager" Validation-ValidateOnEvent="Blur">
            </telerik:NumericTextBoxSetting>
  
<telerik:NumericTextBoxSetting DecimalDigits="0" BehaviorID="Number" InitializeOnClient="false" ReadOnlyCssClass="RIM_ReadOnly" EnabledCssClass="RIM_Width" FocusedCssClass="RIM_Width" HoveredCssClass="RIM_Width" InvalidCssClass="RIM_Width" Validation-ValidateOnEvent="Blur">
            </telerik:NumericTextBoxSetting>
 </telerik:RadInputManager>

//CSS is in external css file
.RIM_ReadOnly

{

 

 

background-color:#DEDEDE !important;

 

 

 

border-style:groove !important;

 

 

 

width:196px !important;

 

}

.RIM_Width

{

 

 

width:196px !important;

 

}


Then in the code-behind I set:

((NumericTextBoxSetting)SharedInputManager.GetSettingByBehaviorID("NoCSSNumber")).TargetControls.Add(new TargetInput(tbMyTextBox.UniqueID, true)); 
    
((NumericTextBoxSetting)SharedInputManager.GetSettingByBehaviorID("Number")).TargetControls.Add(new TargetInput(tbMyTextBox2.UniqueID, true));

Now, in rare cases, and only when i use the "NoCSSNumber" the textbox value server side will contain commas.
Example, on the user side, the text for tbMyTextBox is 1,000 and the text for tbMyTextBox2 is 1,000.
Then on the server side sometimes tbMyTextBox.Text is "1,000", but most of the time it is "1000". tbMyTextBox2 is ALWAYS "1000"

Why the discrepancy? What is the expected behavior? I expect it to always be "1000" on server side. And for most of my users the server-side value is 1000, but everyonce in a while it will make it to the server as 1,000 and throw an error...

Any help is appreciated.

Thanks

Andrey
Telerik team
 answered on 12 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?