Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
52 views
HI,

http://www.telerik.com/support/kb/aspnet-ajax/editor/using-the-image-and-document-managers-outside-radeditor.aspx

in this link have Image Manager Customazation Code.

I have change trail version dll replace to License Dlls. then  Customzation Image manager is not display .  Its Showing normal image manager.

is there any dll version problem

please help me any body.
Vessy
Telerik team
 answered on 09 Oct 2012
7 answers
172 views
Hi everyone,

I have this scenario: A web page with 7 RadGrids and all of them are related with each other.
It is possible when I select one row on the first RadGrid, this RadGrid shows only the row selected?

This procedure will help me to reduce the space used on the screen and at the same time shows only the relevant information to the user.

Thanks any help.

Marcio Nascimento
Tsvetina
Telerik team
 answered on 09 Oct 2012
1 answer
80 views
Hi All,

I am facing one issue with RadCombobox. (V 2009.1.527.20).

Is it the known issue?

Details: 

Properties set:  AllowCustomText = True , EnableTextSelection = True and MarkFirstMatch = True

When the first letter typed matches an available text in the dropdown, the text is populated.
(Image 1 is attached)

The problem is that when you continue typing, even if the next characters match the first or another entry, the characters are appended to the front of the populated title making the entry entirely unintended and preventing freeform entry.  Normal expected behavior would be for the automatically suggested selection to go away and accept the user entered characters if the remaining entries do not match. 

(Please check image 2)
Nencho
Telerik team
 answered on 09 Oct 2012
3 answers
312 views
Hello,

I have an RadListBox and 3 RadEditor on my page. Now I want to Drag & Drop Items of RadListBox into RadEditor. How can I get the ID of the RadEditor on which I am Dragging and Dropping the RadListBox Item?

As per the example provide I am able to Drag Drop Items in only one Hardcoded RadEditor. Below is the JavaScript for the same

function OnClientNodeDropping(sender, args) {
        var editor = $find("<%=RadEditor1.ClientID%>");
        var event = args.get_domEvent();
        document.body.style.cursor = "default";
        var result = isMouseOverEditor(editor, event);
        if (result) {
            var itemValue = sender.get_selectedItem().get_value();
            editor.setFocus();
            itemValue = "[[" + itemValue + "]]"
            editor.pasteHtml(itemValue);
        }
        setOverlayVisible(false);
    }

Now here what I want is If I am dragging and dropping items in RadEditor1 it should be placed inside RadEditor1, If I am dragging and dropping items in RadEditor2 it should be placed inside RadEditor2.

Please let me know how can I achieve this functionality. 
Thanks in advance for your help..

Rumen
Telerik team
 answered on 09 Oct 2012
1 answer
113 views
I noticed that the OnClientTransferred event does not happen at the very end of the transfer cycle. After the event is fired, there is code being executed which selects the next item on the list. I am trying to clear the selection after transferring items over to the other side, but the code that executes afterwards selects the item anyway. Is there any way to accomplish what I'm trying to do?
Daniel
Top achievements
Rank 1
 answered on 09 Oct 2012
1 answer
135 views
Hello all...

I'm wondering if there's a provision to set the time of day default in the calendar?  Apparently it defaults to noon, and I'd like to set it to midnight so to take into account any record that occurs any time of day, rather than only after twelve noon.


Thanks for any assistance!
Angel Petrov
Telerik team
 answered on 09 Oct 2012
2 answers
240 views
I am having issues trying to figure out how to create a mega menu dynamically from SQL server.
I have a normal telerik menu working fine from SQL.  My SQL server is setup using a Parent Child to create the sub menus.

Existing

<telerik:RadMenu id="globalNavigation" runat="server"

 

EnableRoundedCorners="true"

 

EnableAjaxSkinRendering="true"

 

Skin="Telerik"

 

ExpandDelay="200"

 

ClosingDelay="50"

 

OnClientItemOpened="itemOpened"

 

CausesValidation="false"

 

EnableEmbeddedSkins="false"

 

EnableShadows="true"

 

ClickToOpen="true">

</telerik:RadMenu>

SQL Table is setup (as an example)
idMenuID  vcName     inParentID     URL 
1         Home         NULL         ~/default.aspx
2         Country      NULL         ~/Country/default.aspx 
3         Training     NULL         ~/Training/default.aspx
4         Student      NULL         ~/Student/default.aspx
11        Option A     2           ~/Country/defaultA.aspx
12        Option B    2            ~/Country/defaultB.aspx

Within the radmenu of a mega drop down it includes
<telerik:RadMenuItem Text="Products" PostBack="false">

 <Items>

 <telerik:RadMenuItem CssClass="Products" Width="640px">

 <ItemTemplate>

 <div id="CatWrapper" class="Wrapper" style="width: 435px;">

 <h3>

 Categories
<
/h3>

 <telerik:RadSiteMap ID="RadSiteMap1" runat="server" Skin="Hay" EnableTextHTMLEncoding="true">

 <LevelSettings>

 <telerik:SiteMapLevelSetting Level="0">

 <ListLayout RepeatColumns="2" RepeatDirection="Vertical" />

 </telerik:SiteMapLevelSetting>

 </LevelSettings>

 <Nodes>

 <telerik:RadSiteMapNode NavigateUrl="#" Text="Student">

 <Nodes>

 <telerik:RadSiteMapNode NavigateUrl="#" Text="ITO Student PTO" />

 <telerik:RadSiteMapNode NavigateUrl="#" Text="Review of All ITO's" />

 </Nodes>

 </telerik:RadSiteMapNode>

 <telerik:RadSiteMapNode NavigateUrl="#" Text="Decor">

 <Nodes>

 <telerik:RadSiteMapNode NavigateUrl="#" Text="Bed Linen" />

 <telerik:RadSiteMapNode NavigateUrl="#" Text="Throws" />

 <telerik:RadSiteMapNode NavigateUrl="#" Text="Curtains & Blinds" />

 <telerik:RadSiteMapNode NavigateUrl="#" Text="Rugs" />

 <telerik:RadSiteMapNode NavigateUrl="#" Text="Carpets" />

 </Nodes>

 </telerik:RadSiteMapNode>

</telerik:RadSiteMap>

 </div>

 </ItemTemplate>

 </telerik:RadMenuItem>

 </Items>

 </telerik:RadMenuItem>


This is within the Mega Drop Menu.   How would I create these item dynamically.  Would someone have an example of how to write this within the code behind or created dyanmically.

Boyan Dimitrov
Telerik team
 answered on 09 Oct 2012
3 answers
1.1K+ views
Heey Guys i got a problem ("Cannot implicitly convert type 'string' to 'Telerik.Web.UI.RadTextBox'") im tring to add some client insert edit update fucations to my grid,when i start to build it i got thist strange error here is my code if some one can help what would be awsome !!
 
<%@ Page Title="" Language="C#" MasterPageFile="~/ABBMaster.Master" AutoEventWireup="true" CodeBehind="Client.aspx.cs" Inherits="HolidayTracker.Testing.Client" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainRegionContentPlaceHolder" runat="server">
     <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
       <script type="text/javascript">
           var employeeID, currentEmployee, currentRowIndex = null;
           var employee =
           {
               EmployeeID: null,
               FirstName: null,
               LastName: null,
               Title: null,
               TitleOfCourtesy: null,
               BirthDate: null,
               Notes: null,
  
               create: function () {
                   var obj = new Object();
                   obj.EmployeeID = "";
                   obj.FirstName = "";
                   obj.LastName = "";
                   obj.Title = "";
                   obj.TitleOfCourtesy = "";
                   obj.BirthDate = "";
                   obj.Notes = "";
                   return obj;
               }
           };
  
           function getDataItemKeyValue(radGrid, item) {
               return parseInt(radGrid.get_masterTableView().getCellByColumnUniqueName(item, "EmployeeID").innerHTML);
           }
  
           function pageLoad(sender, args) {
               //employeeID = $find("<%= RadGrid1.ClientID %>").get_masterTableView().get_dataItems()[0].getDataKeyValue("EmployeeID");
               employeeID = getDataItemKeyValue($find("<%= RadGrid1.ClientID %>"), $find("<%= RadGrid1.ClientID %>").get_masterTableView().get_dataItems()[0]);
               $find("<%= LastName.ClientID %>").focus();
           }
  
           function rowSelected(sender, args) {
               //employeeID = args.getDataKeyValue("EmployeeID");
               employeeID = getDataItemKeyValue(sender, args.get_gridDataItem());
  
               currentRowIndex = args.get_gridDataItem().get_element().rowIndex;
               $find("<%= RadTabStrip1.ClientID %>").set_selectedIndex(0);
  
               MyWebService.GetEmployeeByEmployeeID(employeeID, setValues)
           }
  
           function setValues(employee) {
               $get("<%= EmployeeID.ClientID %>").innerHTML = employee.EmployeeID;
               $find("<%= LastName.ClientID %>").set_value(employee.LastName);
               $find("<%= FirstName.ClientID %>").set_value(employee.FirstName);
               $find("<%= Title.ClientID %>").set_value(employee.Title);
               $find("<%= TitleOfCourtesy.ClientID %>").findItemByText(employee.TitleOfCourtesy).select();
               $find("<%= BirthDate.ClientID %>").set_selectedDate(employee.BirthDate);
               $find("<%= Notes.ClientID %>").set_html(employee.Notes);
               $find("<%= LastName.ClientID %>").focus();
           }
           function getValues() {
               employee.EmployeeID = $get("<%= EmployeeID.ClientID %>").innerHTML;
               employee.LastName = $find("<%= LastName.ClientID %>").get_value();
               employee.FirstName = $find("<%= FirstName.ClientID %>").get_value();
               employee.Title = $find("<%= Title.ClientID %>").get_value();
               employee.TitleOfCourtesy = $find("<%= TitleOfCourtesy.ClientID %>").get_value();
               employee.BirthDate = $find("<%= BirthDate.ClientID %>").get_selectedDate();
               employee.Notes = $find("<%= Notes.ClientID %>").get_html();
               return employee;
           }
           function updateChanges() {
               MyWebService.UpdateEmployeeByEmployee(getValues(), updateGrid);
           }
  
           function updateGrid(result) {
               var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
               tableView.set_dataSource(result);
               tableView.dataBind();
  
               var grid = $find("<%= RadGrid1.ClientID %>");
               grid.repaint();
           }
  
           function tabSelected(sender, args) {
               if (currentEmployee == null) {
                   currentEmployee = getValues();
               }
  
               switch (args.get_tab().get_index()) {
                   case 1:
                       {
                           var gridItems = $find("<%= RadGrid1.ClientID %>").get_masterTableView().get_dataItems();
                           //var newID = parseInt(gridItems[gridItems.length - 1].getDataKeyValue("EmployeeID")) + 1;
                           var newID = getDataItemKeyValue($find("<%= RadGrid1.ClientID %>"), gridItems[gridItems.length - 1]) + 1;
                           var newEmployee = employee.create();
                           newEmployee.EmployeeID = newID;
                           setValues(newEmployee);
  
                           $get(" <%= SaveChanges.ClientID %>").value = "Add";
                           $get(" <%= Delete.ClientID %>").style.display = "none";
  
                           break;
                       }
                   default:
                       {
                           setValues(currentEmployee);
                           currentEmployee = null;
                           $get(" <%= SaveChanges.ClientID %>").value = "Save";
                           $get(" <%= Delete.ClientID %>").style.display = "";
                           break;
                       }
               }
           }
  
           function deleteCurrent() {
               var table = $find("<%= RadGrid1.ClientID %>").get_masterTableView().get_element();
               var row = table.rows[currentRowIndex];
               table.deleteRow(currentRowIndex);
  
               var dataItem = $find(row.id);
               if (dataItem) {
                   dataItem.dispose();
                   Array.remove($find(" <%= RadGrid1.ClientID %>").get_masterTableView()._dataItems, dataItem);
               }
  
               var gridItems = $find("<%= RadGrid1.ClientID %>").get_masterTableView().get_dataItems();
               MyWebService.DeleteEmployeeByEmployeeID(employeeID, updateGrid);
               gridItems[gridItems.length - 1].set_selected(true);
           }
  
       </script>
       </telerik:RadCodeBlock>
  
       <div style="height: 100%; padding: 10px">
  
       <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" GridLines="None" OnDataBound="RadGrid1_DataBound" OnColumnCreated="RadGrid1_ColumnCreated" Height="300px" CellSpacing="0">
           <MasterTableView TableLayout="Fixed" ClientDataKeyNames="EmployeeID" AutoGenerateColumns="False" DataKeyNames="_EmployeeID" >
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
  
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
  
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
  
               <Columns>
                   <telerik:GridBoundColumn DataField="_EmployeeID" DataType="System.Int32" FilterControlAltText="Filter _EmployeeID column" HeaderText="_EmployeeID" ReadOnly="True" SortExpression="_EmployeeID" UniqueName="_EmployeeID">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="_LastName" FilterControlAltText="Filter _LastName column" HeaderText="_LastName" SortExpression="_LastName" UniqueName="_LastName">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="_FirstName" FilterControlAltText="Filter _FirstName column" HeaderText="_FirstName" SortExpression="_FirstName" UniqueName="_FirstName">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="_Title" FilterControlAltText="Filter _Title column" HeaderText="_Title" SortExpression="_Title" UniqueName="_Title">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="_TitleOfCourtesy" FilterControlAltText="Filter _TitleOfCourtesy column" HeaderText="_TitleOfCourtesy" SortExpression="_TitleOfCourtesy" UniqueName="_TitleOfCourtesy">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="_BirthDate" DataType="System.DateTime" FilterControlAltText="Filter _BirthDate column" HeaderText="_BirthDate" SortExpression="_BirthDate" UniqueName="_BirthDate">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="_Notes" FilterControlAltText="Filter _Notes column" HeaderText="_Notes" SortExpression="_Notes" UniqueName="_Notes">
                   </telerik:GridBoundColumn>
               </Columns>
  
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
           </MasterTableView>
           <ClientSettings>
               <Selecting AllowRowSelect="true" />
               <ClientEvents OnRowSelected="rowSelected"/>
               <Scrolling AllowScroll="true" UseStaticHeaders="true" />
           </ClientSettings>
  
<FilterMenu EnableImageSprites="False"></FilterMenu>
       </telerik:RadGrid>
  
       <asp:SqlDataSource runat="server" ID="SqlDataSource1"
           ConnectionString="<%$ ConnectionStrings:HolidayTrackerConnectionString %>"
           SelectCommand="SELECT * FROM [Employee]">
       </asp:SqlDataSource>
  
       <telerik:RadTabStrip ID="RadTabStrip1" OnClientTabSelected="tabSelected" Style="margin-top: 10px;"
           SelectedIndex="1" runat="server" Skin="Hay">
           <Tabs>
               <telerik:RadTab Text="Edit employee" />
               <telerik:RadTab Text="Add new employee" Selected="True" />
           </Tabs>
            
       </telerik:RadTabStrip>
            </div>
       <div style="border: 1px solid threedshadow;">
           <table border="0" style="margin-top: 20px; width: 100%;">
               <tr>
                   <td>
                        Employee ID:
                   </td>
                   <td>
                        <asp:Label ID="EmployeeID" Style="float: left; font-weight: bold;" runat="server" />
                        <asp:Button ID="SaveChanges" CssClass="button" Style="float: right;
                            font-weight: bold;" OnClientClick="updateChanges(); return false;" Text="Save"
                            runat="server" BorderColor="White" />
                        <asp:Button ID="Delete" CssClass="button" Style="float: right; margin-right: 10px;
                             font-weight: bold;" OnClientClick="if(!confirm('Are you sure you want to delete this employee?'))return false; deleteCurrent(); return false;"
                            Text="Delete" runat="server" />
                   </td>
               </tr>
               <tr>
                   <td>
                        Last name:
                   </td>
                   <td>
                        <telerik:RadTextBox ID="LastName" runat="server" Skin="Hay" />
                   </td>
               </tr>
               <tr>
                   <td>
                        First name:
                   </td>
                   <td>
                        <telerik:RadTextBox ID="FirstName" runat="server" Skin="Hay" />
                   </td>
               </tr>
               <tr>
                   <td>
                        Title:
                   </td>
                   <td>
                        <telerik:RadTextBox ID="Title" runat="server" Skin="Hay" />
                   </td>
               </tr>
               <tr>
                   <td>
                        Title of courtesy:
                   </td>
                   <td>
                        <telerik:RadComboBox ID="TitleOfCourtesy" runat="server" Skin="Hay">
                            <Items>
                                <telerik:RadComboBoxItem Text="" Value="" />
                                <telerik:RadComboBoxItem Text="Dr." Value="Dr." />
                                <telerik:RadComboBoxItem Text="Mr." Value="Mr." />
                                <telerik:RadComboBoxItem Text="Mrs." Value="Mrs." />
                                <telerik:RadComboBoxItem Text="Ms." Value="Ms." />
                            </Items>
                        </telerik:RadComboBox>
                   </td>
               </tr>
               <tr>
                   <td>
                        Birth date:
                   </td>
                   <td>
                        <telerik:RadDatePicker ID="BirthDate" MinDate="01/01/1900" runat="server" Skin="Hay" />
                   </td>
               </tr>
               <tr>
                   <td style="vertical-align: top;">
                        Notes:
                   </td>
                   <td style="height: 400px;float:left;">
                        <telerik:RadEditor ID="Notes"  Width="100%" runat="server" Skin="Hay" />
                   </td>
               </tr>
           </table>
       </div>
</asp:Content>
Jayesh Goyani
Top achievements
Rank 2
 answered on 09 Oct 2012
4 answers
239 views
I'm utilizing the RadHTMLChart for a pie chart.  I specify some of the series colors but not all.  I have colors assigned to a variable that is referenced by the PieSeries ColorField.  The ones I want to be pulled dynamically from the Skin I leave as "", empty string.

What I Have

        protected IList<DataChart> GetChartData()
        {
            IList<DataChart> dataCharts = new List<DataChart>();
            int totalNumber = 0;
            foreach (Summary summary in DataSource)
            {
                totalNumber += summary.Count;
            }
 
            foreach (Summary summary in DataSource)
            {
                DataChart thisChart = new DataChart(summary);
                thisChart.ChartCount = Math.Round(100 / ((float)totalNumber / summary.Count),2);
                thisChart.ChartLabel = summary.Code;
                thisChart.ChartColor = GetColorByCode(summary.Code);
                thisChart.ChartExplode = someCondition ? "true" : "";
                dataCharts.Add(thisChart);
            }
            return dataCharts;
}
 
        protected string GetColorByCode(string code)
        {
            string color;
            switch (code)
            {
                case "BP":
                    color = "#d35151";
                    break;
                case "RS":
                    color = "#f0e45e";
                    break; 
                case "XT":
                    color = "#ff6600";
                    break; 
                default:
                    color = "";
                    break;
            }
            return color;
        }


Is there a way that in the code-behind, I could programmatically use the WebResource (or something else) to get the color(s) from the skin?  I need the color for something else besides the chart.  Thus I'd never leave the value for the ColorField as "" but some I'd assign specifically and some I'd assign by dynamically getting a color from the skin.  It would be done in the "default" of the switch.

If there's another way to do this, I'm all ears.

Thanks.
Rob
Top achievements
Rank 1
 answered on 09 Oct 2012
10 answers
744 views
Is there anyway to make the hierarchy grid to expand by mastertable row clicking? I've partially done this by the code below.

But when user clicks on the detailtable row, it fires a postback also. I want only mastertable to be active for row click.

And is there anyway to expand only one row at a time. I mean, if user expands a row, all other rows will be collapsed.

 
      <ClientSettings EnablePostBackOnRowClick="True">  
       <Selecting AllowRowSelect="True" /> 
      </ClientSettings> 
 

protected void grdAcademicYear_ItemCommand(object source, GridCommandEventArgs e)  
  {  
   if (e.CommandName == "ExpandCollapse")  
   {  
    e.Item.Selected = !e.Item.Expanded;  
    this.CollapseAll();  
    e.Item.Expanded = e.Item.Selected;  
   }  
}  
Martin Roussel
Top achievements
Rank 1
 answered on 09 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?