Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
84 views
Hello,
I'm adding new node on client side. When users presses Escape key, I have to delete new node. How do I do that? NodeEdited event wont fire in this case.
3 years ago you promised here to implement this event but nothing has changed.
Thank you.
Plamen
Telerik team
 answered on 02 Dec 2011
1 answer
66 views

I am using the scrolling functionality of the grid in order to load more records if the user scrolls to the bottom of the page.I have taken the examples from the site and changed the data source.  Now when I scroll to the end the grid does not show the additional records.  In the code behind AjaxRequest I can see that the page size is increasing every time i reach the bottom of the page but no loader image shows up and the grid does not show the additional records.

Here is the code
Thank you

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
     RadGrid1.PageSize = 15 + RadGrid1.PageSize;
     RadGrid1.Rebind();
}
 
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
 
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
      <script type="text/javascript">
          function HandleScrolling(e) {
              var grid = $find("<%=RadGrid1.ClientID %>");
              var scrollArea = document.getElementById("<%= RadGrid1.ClientID %>" + "_GridData");
              if (IsScrolledToBottom(scrollArea)) {
                  var currentlyDisplayedRecords = grid.get_masterTableView().get_pageSize() * (grid.get_masterTableView().get_currentPageIndex() + 1);
                  //if the visible items are less than the entire record count      
                  //trigger an ajax request to increase them   
                  if (currentlyDisplayedRecords < 100)
                  { $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("LoadMoreRecords"); }
              }
          }
          //calculate when the scroll bar is at the bottom   
          function IsScrolledToBottom(scrollArea) {
              var currentPosition = scrollArea.scrollTop + scrollArea.clientHeight;
              return currentPosition == scrollArea.scrollHeight;
          }
      </script>
    </telerik:RadCodeBlock>
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
      <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
          </UpdatedControls>
        </telerik:AjaxSetting>
      </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="25">
      <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border: 0;" />
    </telerik:RadAjaxLoadingPanel>
 
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
      AllowSorting="True" AllowPaging="True" PageSize="15" Width="97%" GridLines="None">
       
      <PagerStyle Visible="False" />
       
      <MasterTableView Width="99%" TableLayout="Fixed" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst"
        DataSourceID="SqlDataSource1" PageSize="15">
      </MasterTableView>
       
      <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100px" />
        <ClientEvents OnScroll="HandleScrolling" />
      </ClientSettings>
    </telerik:RadGrid>
 
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnection %>"
  SelectCommand="SELECT DisplayName FROM SP_Messages"></asp:SqlDataSource>
</asp:Content>

Mira
Telerik team
 answered on 02 Dec 2011
0 answers
56 views
Hi,

When I drag any images or any control onto the 'radupload' the path of the dragged images/control is being displaced as the path in the radupload control.

Can any one please help me on....

how to prevent the drag of images or any control on to the radupload control.


Thanks in advance !
Prasad
Top achievements
Rank 1
 asked on 02 Dec 2011
2 answers
112 views
Hi,

I have a question: the Radgrid is bound to wcf data service in the client-side. The data is displayed correctly. But when hit the Edit link, there is no response. I have set the EditMode to InPlace. My aspx code is as following:
<telerik:RadGrid ID="RadGrid1" runat="server" Width="700px" AllowSorting="true"   AllowPaging="true"
                 pagesize= "10"  AutoGenerateColumns="false"  OnItemCreated="g_ItemCreated"> 
    <MasterTableView   AllowNaturalSort="true" DataKeyNames="parm_id" AllowAutomaticUpdates="false" EditMode="InPlace" >
        <Columns>
             <telerik:GridBoundColumn DataField="id" UniqueName="ID" HeaderText="ID"
                ItemStyle-Width="200px" AllowSorting="true" ShowSortIcon="true" SortExpression="ID asc" ReadOnly="true" Display = "false"/>
            <telerik:GridBoundColumn DataField="name" UniqueName="Name" HeaderText="Name"
                ItemStyle-Width="200px" AllowSorting="true" ShowSortIcon="true" SortExpression="Name asc" ReadOnly="true"  />
             <telerik:GridNumericColumn                                      DataField="Score"                                      DataType="System.Int32"                                      HeaderText="Score"                                                                              UniqueName="Score"
                                   >                                               </telerik:GridNumericColumn>             <telerik:GridCheckBoxColumn UniqueName="ActiveFlag" HeaderText="Is Active" DataField = "active_flag" />             <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderText="">             </telerik:GridEditCommandColumn>         </Columns>     </MasterTableView>   <ClientSettings >         <ClientEvents OnDataBinding="OnDataBinding" OnRowDataBound="OnRowDataBound"   />         <DataBinding Location="WcfDataService1.svc"  >         <DataService TableName="Student"  />         </DataBinding>  </ClientSettings> </telerik:RadGrid>

Someone could help me? Thanks in advance.

Lynn
Top achievements
Rank 1
 answered on 02 Dec 2011
0 answers
37 views
Hi,
  I want to show the next available time slot to the user. I.e., If user enters start date time as 12-02-2011 :09:00:00 with the length of 30minutes, we have to find out the time slot available for the given date time with 30minutes length, if there is no time slot available at the given time we need to show the next available time slot it may be some other date or some other time but the next available time slot should be greater or equal to 30minutes length.
Maddela
Top achievements
Rank 1
 asked on 02 Dec 2011
9 answers
331 views
I am using Q3 2008 radmenu.

In the drop down menus, on the left, there is a spot there for if I want an image. I don't want an image, so how can I remove that extra space to the left of the text that is reserved for a menu image?

thanks.
Princy
Top achievements
Rank 2
 answered on 02 Dec 2011
1 answer
66 views
could anyone tell me how to set focus to radalert ok button on server side
Shinu
Top achievements
Rank 2
 answered on 02 Dec 2011
1 answer
71 views
Hi
i don´t know if i must write this thread in this forum or in tooltip's forum. but here go!!

i want put custom radtooltip  in the radcombobox's items with radtooltipmanager or radtooltip.
help please
Princy
Top achievements
Rank 2
 answered on 02 Dec 2011
3 answers
142 views
Either grid on this page will, instead of exporting the grid and it's data, give me an export of the entire aspx page. 
I have no idea what is going on with.  Things work fine with the export on the other pages, at least I do get an excel file.

If anyone has any ideas, I would appreciate the feedback.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RMAGenerator.aspx.cs" Inherits="ECSMT.RMAGenerator" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>JDE RMA Grid Creation</title>
    <script src="/Scripts/modernizr-2.0.6.min.js" type="text/javascript"> </script>
    <style>
       section 
            {
                background: #cfdbe6;
                margin: 20px;
                padding: 5px;              
                border-radius: 10px;
                box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
                background: cfdbe6;
                width: 95%;
                color: #696969;
                font-size: 12px;
            }
        section h1 {font-size: 16px; font-weight: bold; color:Navy }
        section h2 {font-size: 12px; font-weight: bold; text-decoration: underline}
        .MyImageButton
        {
            cursor: hand;
        }
        .EditFormHeader td
        {
            font-size: 14px;
            padding: 4px !important;
            color: #0066cc;
        }
 
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgrdRMA">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgrdRMA" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rbtnAppend">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rbtnAppend"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="rgrdRMA" LoadingPanelID="RadAjaxLoadingPanel1" ></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
<%--                <telerik:AjaxSetting AjaxControlID="rbtnExport">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rbtnExport"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="rgrdExpXl" LoadingPanelID="RadAjaxLoadingPanel1" ></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>--%>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" Width = "100%" Height="100%">
        </telerik:RadAjaxLoadingPanel>
            <h3>RMA Generator</h3>
            <h1>CEI:<asp:Label ID="lblCEI" runat="server" Text="0"></asp:Label>
            CMT:<asp:Label ID="lblCMT" runat="server" Text="0"></asp:Label></h1>
            <h3><asp:Label ID = "lblCustInfo" runat="server" Text="Customer Information" ></asp:Label></h3>
 
            <telerik:RadGrid ID="rgrdRMA" runat="server" GridLines="Both" Skin="Windows7" AllowPaging="False" AllowSorting="false"
                AutoGenerateColumns="False"  OnNeedDataSource="rgrdRMA_NeedDataSource" OnUpdateCommand="rgrdRMA_UpdateCommand"
                 OnInsertCommand="rgrdRMA_InsertCommand"  OnDeleteCommand="rgrdRMA_DeleteCommand" ShowStatusBar="true">
                <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="RowNumber"
                         AutoGenerateColumns="False" EditMode="InPlace" >
                    <Columns>
                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                        </telerik:GridEditCommandColumn>
                        <telerik:GridDropDownColumn DataField="LastDispo" DataSourceID="SqlDataSource1"
                            HeaderText="LastDispo" ListTextField="DescOne" ListValueField="LastDispo"
                            UniqueName="LastDispo" >
                        </telerik:GridDropDownColumn>
                        <telerik:GridDropDownColumn DataField="LITM" DataSourceID="SqlDataSource2"
                            HeaderText="LITM" ListTextField="DSC" ListValueField="LITM"
                            UniqueName="LITM" >
                        </telerik:GridDropDownColumn>
                        <telerik:GridNumericColumn UniqueName="ReturnQty" SortExpression="ReturnQty" HeaderText="ReturnQty"
                        DataField="ReturnQty" />
                        <telerik:GridDropDownColumn DataField="ReturnEquipNum" DataSourceID="EquipmentForReceipt"
                            HeaderText="ReturnEquipNum" ListTextField="BigDescrip" ListValueField="ReturnEquipNum"
                            UniqueName="ReturnEquipNum" >
                        </telerik:GridDropDownColumn>
                        <telerik:GridBoundColumn UniqueName="ReturnSerialNum" SortExpression="ReturnSerialNum" HeaderText="ReturnSerialNum"
                            DataField="ReturnSerialNum" ReadOnly="true"  />
                        <telerik:GridBoundColumn UniqueName="IncomingLocCode" SortExpression="IncomingLocCode" HeaderText="IncomingLocCode"
                        DataField="IncomingLocCode" />
                        <telerik:GridDropDownColumn DataField="ShipToAddr" DataSourceID="ShipTosFilteredByCMT"
                            HeaderText="ShipToAddr" ListTextField="ShipToAddr" ListValueField="ShipToAddr"
                            UniqueName="ShipToAddr" >
                        </telerik:GridDropDownColumn>
                        <telerik:GridNumericColumn UniqueName="ReplacementQty" SortExpression="ReplacementQty" HeaderText="ReplacementQty"
                        DataField="ReplacementQty" />
                        <telerik:GridNumericColumn UniqueName="ReplacementEquipID" SortExpression="ReplacementEquipID" HeaderText="ReplacementEquipID"
                            DataField="ReplacementEquipID" />
                        <telerik:GridBoundColumn UniqueName="OutgoingLocCode" SortExpression="OutgoingLocCode" HeaderText="OutgoingLocCode"
                            DataField="OutgoingLocCode" />
                        <telerik:GridBoundColumn UniqueName="RequestedShipDate" SortExpression="RequestedShipDate" HeaderText="RequestedShipDate"
                            DataField="RequestedShipDate" ReadOnly="true"/>
                        <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" ButtonType="LinkButton" Text="Delete" />
                    </Columns>
                 </MasterTableView>
            </telerik:RadGrid>
 
 
             <asp:Table ID="tblControls" runat="server" Width="100%">
                <asp:TableRow  Width = "100%">
                    <asp:TableCell Width="20%" HorizontalAlign="Right" >
                        <h1>Append RMA Product For</h1>
                    </asp:TableCell>
                    <asp:TableCell Width="30%" HorizontalAlign="Right" >
                        <telerik:RadComboBox ID="rcmbProduct" Runat="server" Width="100%" AutoPostBack="true" ></telerik:RadComboBox>
                    </asp:TableCell>
                    <asp:TableCell Width="10%" HorizontalAlign="Left" >
                        <telerik:RadButton ID="rbtnAppend" runat="server" Text="Append" OnClick="rbtnAppend_Click" AutoPostBack="true"></telerik:RadButton>
                    </asp:TableCell>
                    <asp:TableCell Width="40%" HorizontalAlign ="Justify">
                        <telerik:RadButton ID="rbtnExport" runat="server" Text="Export"  OnClick="rbtnExport_Click" AutoPostBack="true"></telerik:RadButton>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow >
                    <asp:TableCell Width="20%" HorizontalAlign="Center" >
                        <asp:Label ID="lblCurPC" Text="Current PC:" runat="server"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell Width="20%" HorizontalAlign="Center" >
                        <asp:Label ID="lblCurPCType" Text="Current PC Type:" runat="server"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell Width="20%" HorizontalAlign="Center" >
                        <asp:Label ID="lblCurScreenSKU" Text="Current Screen SKU :" runat="server"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell Width="40%" HorizontalAlign ="Center">
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
 
            <telerik:RadGrid ID="rgrdExpXl" runat="server" GridLines="Both" Skin="Windows7" AllowPaging="False"
                AutoGenerateColumns="False" OnNeedDataSource="rgrdExpXl_NeedDataSource"  >
                <MasterTableView Width="100%" AutoGenerateColumns="False" >
                    <Columns>
                        <telerik:GridBoundColumn DataField="LastDispo" HeaderText="" UniqueName="LastDispo" />
                        <telerik:GridBoundColumn DataField="LITM" HeaderText="" UniqueName="LITM" />
                        <telerik:GridNumericColumn UniqueName="ReturnQty" HeaderText="" DataField="ReturnQty" />
                        <telerik:GridBoundColumn DataField="ReturnEquipNum" HeaderText="" UniqueName="ReturnEquipNum" />
                        <telerik:GridBoundColumn UniqueName="ReturnSerialNum" HeaderText="" DataField="ReturnSerialNum" />
                        <telerik:GridBoundColumn UniqueName="RequestedShipDate" HeaderText="" DataField="RequestedShipDate" />
                        <telerik:GridBoundColumn DataField="LITM" HeaderText="" UniqueName="LITM2" />
                        <telerik:GridBoundColumn DataField="ShipToAddr" HeaderText="" UniqueName="ShipToAddr" />
                        <telerik:GridNumericColumn UniqueName="ReplacementEquipID" HeaderText="" DataField="ReplacementEquipID" />
                        <telerik:GridNumericColumn UniqueName="ReplacementQty" HeaderText="" DataField="ReplacementQty" />
                        <telerik:GridNumericColumn UniqueName="ReturnQty2" HeaderText="" DataField="ReturnQty" />
                        <telerik:GridNumericColumn UniqueName="LineNumber" HeaderText="" DataField="LineNumber" />
                        <telerik:GridBoundColumn UniqueName="IncomingLocCode" HeaderText="" DataField="IncomingLocCode" />
                        <telerik:GridBoundColumn UniqueName="OutgoingLocCode" HeaderText="" DataField="OutgoingLocCode" />
                    </Columns>
                 </MasterTableView>
            </telerik:RadGrid>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:JDECommon %>"
                ProviderName="System.Data.SqlClient" SelectCommand="uspGetLastDispoForRMAGrid">
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:JDECommon %>"
                ProviderName="System.Data.SqlClient" SelectCommand="uspGetRMASKUS">
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="ShipTosFilteredByCMT" runat="server"
                ConnectionString="<%$ ConnectionStrings:JDECommon %>"
                SelectCommand= "uspGetRMAShipTos @CMT">
                <SelectParameters>
                    <asp:ControlParameter ControlID="lblCMT" Name="CMT"
                        PropertyName="Text" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="EquipmentForReceipt" runat="server"
                ConnectionString="<%$ ConnectionStrings:JDECommon %>"
                SelectCommand= "uspGetRMAOutboundEquipmentForCEI @CEI ">
                <SelectParameters>
                    <asp:ControlParameter ControlID="lblCEI" Name="CEI"
                        PropertyName="Text" />
                </SelectParameters>
            </asp:SqlDataSource>
 </form>
</body>
<script type="text/javascript">
    Modernizr.load([{
        complete: function ()
        {
            if (!window.jQuery)
            {
                Modernizr.load('/Scripts/jquery-1.6.1.min.js');
            }
        }
    },
        {
            test: Modernizr.borderradius || Modernizr.boxshadow,
            nope: '/Scripts/PIE.js',
            callback: function ()
            {
                $('section').each(function ()
                {
                    PIE.attach(this);
                });
            }
        }]);
    </script>
 
</html>
Shinu
Top achievements
Rank 2
 answered on 02 Dec 2011
1 answer
925 views
Good Day Fellows 

i have a Dynamic Questionnaire that is created using dynamic data from the Database. My data in the Database contains the fields like 

QuestionID - Primary key
Question  - The Question Text
Answer - The Answer 
Required - This is a Validation , i used this to enable the Required validator in asp.net
DataType - This is the Datatype, it can be a Heading also. 
ReadOnly - This check if that Question is a Read-only , This happens most of the time , when it is a Calculated Field, meaning its                       values depends on other fields values.
Order -   This is the order the Questions will appear 
Section  - This is the section, So the Questions are Grouped. Normaly in Page1 you will have Questions for Section 1.......
Deleted- This is a bit Field , its either 1 or 0 , 1 is active, so this helps be to Filter only active Questions
QuestionType- This is the Type of Control the Data should be Presented with, It can be a Dropdown ,checkbox or textbox..
QT_ID - There can be many Templates of the Question , this makes sure we use the Correct Template for the Questionnaire

So with this kind of Data , i want to use know , what Telerik Control can i use to achieve this.

Thanks 
  
Frank
Top achievements
Rank 1
 answered on 01 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?