Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
263 views
Hello,
I want to execute some when the client click on "Add New Record".
I'm build a template column. I need set text properties of this control by default "7".
If the client want to change it then it's allowed to change.

Source Code : 
<telerik:RadGrid ID="grdSettlement" runat="server" AllowFilteringByColumn="True" CellSpacing="0" DataSourceID="SqlDataSource1" GridLines="None" AllowAutomaticDeletes="True" AllowAutomaticUpdates="True" AutoGenerateColumns="False" AllowAutomaticInserts="true" OnInsertCommand="grdSettlement_InsertCommand">
 
Column Source Code :
 
<telerik:GridTemplateColumn DataField="NO" FilterControlAltText="Filter NO column"
                HeaderText="NO" SortExpression="NO" UniqueName="NO" DataType="System.Int64">
                <InsertItemTemplate>
                    <telerik:RadNumericTextBox runat="server" ID="No">
                    </telerik:RadNumericTextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <%# Eval("NO") %>
                </ItemTemplate>
            </telerik:GridTemplateColumn>


So, for this I want to set the text of RadNumericTextBox "7".
Help me to Solve this...
Shinu
Top achievements
Rank 2
 answered on 13 Apr 2012
0 answers
73 views
Hello, I have been trying to add a list with the following items

NAME
ADDRESS
SITE
So basically i created a List<string> srs  = new List<string>(); and bind it to the RadListView, but i dont understand how all that javascript and what other things i need to make this list draggable to a RadEditor, for example when the user drags NAME into the RadEditor it should add
[[NAME]] to the editor so it will look like this

The customer [[NAME]] has bought 10 items and they will be shipped to [[ADDRESS]] .

Thats how i need it to read in the editor so , if i drag NAME it should add that [[NAME]], this is to create templates. But to be honest.. I dont quite understand what i need from this example, i am lost. Any help would be much appreciated (to many things to track, javascript, etc.. and all those functions with the music stuff confuses me). I am new to the developing workd so would appreciate a simpler example.

http://demos.telerik.com/aspnet-ajax/listview/examples/itemdragdrop/defaultcs.aspx 
Edwin
Top achievements
Rank 1
 asked on 13 Apr 2012
0 answers
94 views
I have linked RadAjaxLoadingPanel with the button and radgrid to upload a excel sheet.

When i click the button it should validate the excel sheet and throw message if it is a invalid file.

but if i use RadAjaxLoadingPanel the button click doesn't show me the validation message which is written in javascript.

Please help me.
Manoj
Top achievements
Rank 1
 asked on 13 Apr 2012
1 answer
205 views
Hello,

Is it possible to use an image (diagonal lines) as the background for the Modal feature on a RadWindow?

I have tried this option below, however it does not work:

.TelerikModalOverlay
{
    background-image: url('icons/modalBackground.png') !important;
    background-repeat: repeat !important;
    filter: alpha(opacity=50) !important;
    opacity: .50 !important;
    -moz-opacity: .50 !important;    
}

Any suggestions on how to achieve this?

Regards,

Steve
Steve
Top achievements
Rank 1
 answered on 12 Apr 2012
0 answers
81 views
I have a file explorer using asyncupload. I added a radconfirm when the user closes the upload window letting them know that that action would cancel any files being uploaded. The problem is that if the user clicks cancel instead of ok in the confirm window when they return to the upload window all the uploaded files have been canceled. Is there a way to prevent this? Here is the function I use:

function OnClientLoad(oExplorer, args) {
            var oWindowmanager = oExplorer.get_windowManager();
            function resetUploadWindow(oWindow, args) {
                if (oWindow.get_id().endsWith("Upload")) {
                    function onClientBeforeClose(sender, arg) {
                        function callbackFunction(arg) {
                            if (arg) {
                                sender.remove_beforeClose(onClientBeforeClose);
                                sender.close();
                            }
                        }
                        arg.set_cancel(true);
                        radconfirm("Warning: If you close this window before the file(s) have completed uploading and before clicking the upload button, the file(s) will not be saved. Do you want to close the upload window?", callbackFunction, 400, 100, null, "Warning");
                    }
                    oWindow.add_beforeClose(onClientBeforeClose);
                }
            }
            oWindowmanager.remove_show(resetUploadWindow);
            oWindowmanager.add_show(resetUploadWindow);
        }

Thanks!
Jed
Top achievements
Rank 1
 asked on 12 Apr 2012
1 answer
78 views
Hi,

I need to identify the row expanded or collapsed on the client side when the client events "GroupExpanding" or "GroupCollapsing" is called.

<ClientSettings AllowGroupExpandCollapse="true">
                <ClientEvents OnGroupExpanding="GroupExpanding" OnGroupCollapsing="GroupCollapsing" />
            </ClientSettings>   

        function GroupExpanding(sender, eventArgs) {
            alert("GroupExpanding is fired");
        }

        function GroupCollapsing(sender, eventArgs) {
            alert("GroupCollapsing is being fired");
        }
Please let me know how do i identify the row index that was expanded/collapsed, i checked the documentation and found nothing regarding this.

Thanks and regards,
Damodar
Richard
Top achievements
Rank 1
 answered on 12 Apr 2012
4 answers
80 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
102 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
229 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
273 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?