Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
49 views

Hello everybody

I want to create something like this 

http://demos.telerik.com/aspnet-ajax/scheduler/examples/overview/defaultcs.aspx

but i have no idea how My calendars area : "Personal" and "Work" is working, how they are saved in database (what are columns in database) and how tasks are changing colors based on the My calendars area. When i save a new task how i am able to save it differently i mean for personal and for work.

please help me with this functionality. i have no clue about it.

 

Thank you

Peter Filipov
Telerik team
 answered on 09 Dec 2015
13 answers
1.2K+ views
I want to create a databound RadGrid that with checkboxes in a column and enable a user to check/uncheck all boxes in the dataset, not just what's displayed on in the current paged dataset.  So, if I have 6000 records but only 50 are displayed, I want to be able to Check/Uncheck All and have it check or uncheck all records, not just the 50 displayed.  Then I want to submit this back to the database to update the records.
Eyup
Telerik team
 answered on 09 Dec 2015
1 answer
183 views
Is there a way to prevent a maliciously-named file from causing a Javascript injection? If you use a Mac (so that you're not bound by Windows filename conventions) and name a file with javascript in the file name, it's possible to cause the page to fire that javascript. I've already disabled the 'show filename' option, but it still is firing when I test this.
Dimitar
Telerik team
 answered on 09 Dec 2015
1 answer
72 views
Hi team,
I have attached the sample chart which contains multiple x and y axes.
Can you please confirm whether htmlChart supports multiple x and y axes, if it is please give sample code to build a chart with multiple x and y axes
Thanks in advance
Khalandar H
Danail Vasilev
Telerik team
 answered on 09 Dec 2015
12 answers
303 views
I am using Radeditor and have this scenarion where I upload picutres and insert them in my radeditor document.

I have a cusom button on the rad editor toolbar which fires the upload operation all in javascript on the client.
the picture uploads without postback, and in my script I try to insert it at the point where the insertion point was when the user clicked on the custom button that fired the whole operation.

The problem is that the picture is always, always inserted at the very begining of the document.

is there a way that I can maintain the insert position when I insert my picture?

this is very basic, in Radeditor i have a custom button deined and then it calls a javascript function:

<

 

script type="text/javascript">

 

Telerik.Web.UI.Editor.CommandList[

"Custom1"] = function(commandName, editor, args)

 

{

DoLoadNewPhoto();

};

</

 

script>

 


and then when my file uploads returns i insert it in the editor also with javscript like this:

var

 

str = '<img id="Tempdivphoto{1}" alt="" src="/BCW_Web/PhotoFeeders/GetNewTempForumPostPhotoThumbNail.aspx?ForumPostTempPhotoIndex={2}"/>'

 

 

var tempstr = String.format(str, temvt.get_Title(), indexcount, TempPhotoArrayIndex);

 

temvt.set_ObjectString(tempstr);

$find(Posteditor).setFocus();

$find(Posteditor).pasteHtml(tempstr);

but always it inserts at the top instead of where the insertion point originally was.

Ravi
Top achievements
Rank 1
 answered on 09 Dec 2015
3 answers
326 views

I have a step in my wizard that collects basic information for the user AND the user's spouse but only if the user chose Include Spouse in a previous step.

One way I've thought of resolving this is by duplicating the step called Personal Details in the first one having the input controls for only the user and in the duplicate have input controls for both the user and the spouse. Then if the user chooses to include Spouse we can just hide/remove the unecessary step?

There doesn't seem to be anything in the API that allows you to affectively Switch Off steps and by that I mean they should dissappear out of the navigation and progress bars and the next button should know to skip them if they are switched off.

 

WizardStep.hide - just hides the content of the step
WizardSteps.remove - throws exception "TypeError: c.unselect is not a function" (Javascript)
WizardSteps.removeAt - same as previous exception

 


 
Plamen
Telerik team
 answered on 09 Dec 2015
1 answer
208 views

Hi! I am trying to create HelpDesk functionality using RadWizard to create new incident.

On first step user selects incident category from RadComboBox (hardware problems, software etc)

Then i dynamically create 2 new steps with a different markup depending on combobox selected value.

Everything works fine until user goes back to first step and selects new RadComboBox value.

Functionality allows to do such thing. And i have to delete next steps and create new ones with other markup.

I found simple solution to disable RadComboBox, but it seems to be uncorrect solution. Can you help me?

Here is my code

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     
        <asp:ScriptManager runat="server" />
        <div>
 
            <script type="text/javascript">
            </script>
            <telerik:RadWizard runat="server" ID="RadWizard1" Height="360px"
                 OnNextButtonClick="RadWizard1_NextButtonClick" OnWizardStepCreated="RadWizard1_WizardStepCreated" DisplayCancelButton="True">
                <WizardSteps>
                    <telerik:RadWizardStep ID="RadWizardStep1" runat="server" Title="Book Group Vacation" StepType="Start" DisplayCancelButton="True" >
                        <telerik:RadComboBox ID="RadComboBox1" Runat="server" AutoPostBack="False">
                            <Items>
                                <telerik:RadComboBoxItem runat="server" Text="1" Value="1" />
                                <telerik:RadComboBoxItem runat="server" Text="2" Value="2" />
                                <telerik:RadComboBoxItem runat="server" Text="3" Value="3" />
                            </Items>
                        </telerik:RadComboBox>
                        <br/>
                        <label>ComboBox Value Is </label><span id="CB" runat="server"></span>
                         
                    </telerik:RadWizardStep>
                </WizardSteps>
            </telerik:RadWizard>
        </div>
    </form>
</body>
</html>
And code-behind

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
 
{
    private static bool _stepCreated = false;
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack && !_stepCreated)
        {
            CB.InnerText = RadComboBox1.SelectedValue.ToString();
            RadWizardStep step2 = new RadWizardStep();
            step2.ID = "Second";
 
            RadWizard1.WizardSteps.Add(step2);
            RadWizardStep step3 = new RadWizardStep();
            step3.ID = "Third";
 
            RadWizard1.WizardSteps.Add(step3);
 
            RadWizardStep completeStep = new RadWizardStep();
            completeStep.ID = "Complete";
            RadWizard1.WizardSteps.Add(completeStep);
            _stepCreated = true;
            RadComboBox1.Enabled = false;
            RadWizard1.ActiveStepIndex = RadWizard1.WizardSteps[1].Index;
        }
        
    }
    
 
    protected void rbRemove_Click(object sender, EventArgs e)
    {
        RadWizardStep step = ((RadWizardStep)((RadButton)sender).Parent);
        RadWizard1.WizardSteps.Remove(step);
        RadWizard1.ActiveStepIndex = 0;
    }
 
    protected void RadWizard1_WizardStepCreated(object sender, Telerik.Web.UI.WizardStepCreatedEventArgs e)
    {
        if (e.RadWizardStep.ID == "Complete")
        {
            e.RadWizardStep.StepType = RadWizardStepType.Complete;
            Label label = new Label();
            label.Text = "Registration succeeded!";
            e.RadWizardStep.Controls.Add(label);
        }
        else
        {
            e.RadWizardStep.CssClass = "passenger";
            string[] labelTitle = new string[] { "First Name:", "Second Name:", "Third Name:" };
 
            for (int i = 0; i < labelTitle.Length; i++)
            {
                RadTextBox rcbFirstName = new RadTextBox();
                rcbFirstName.LabelWidth = Unit.Pixel(150);
                rcbFirstName.Width = Unit.Pixel(500);
                rcbFirstName.Label = labelTitle[i];
                e.RadWizardStep.Controls.Add(rcbFirstName);
                e.RadWizardStep.Controls.Add(new Literal() { Text = "<br />" });
            }
            RadTextBox rcbVal = new RadTextBox();
            rcbVal.LabelWidth = Unit.Pixel(150);
            rcbVal.Width = Unit.Pixel(500);
            rcbVal.Label = "ComboBoxValue";
            rcbVal.Text = RadComboBox1.SelectedValue.ToString();
            e.RadWizardStep.Controls.Add(rcbVal);
            e.RadWizardStep.Controls.Add(new Literal() { Text = "<br />" });
 
            RadButton rbRemove = new RadButton();
            rbRemove.Text = "Remove Person";
            rbRemove.Click += rbRemove_Click;
            e.RadWizardStep.Controls.Add(rbRemove);
        }
    }
    protected void RadWizard1_NextButtonClick(object sender, WizardEventArgs e)
    {
        RadWizard wiz = (RadWizard)sender;
        
        Response.Write(wiz.WizardSteps[e.CurrentStepIndex].ID);
        Response.Write(wiz.WizardSteps[e.NextStepIndex].ID);
    }
 
    
 
}

Plamen
Telerik team
 answered on 09 Dec 2015
8 answers
616 views
Hello, theres,
  I use combobox to show about 3000 items, the performance is bad.  Any  idea?
  my code default.aspx.cs follows
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
  
public partial class Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
  
    }
    protected void Customer_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        for (int i = 0; i < 3000; i++)
        {
            Customer.Items.Add(new RadComboBoxItem("item " + i, "1"));
        }
    }
}

my default.aspx follows
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
                //Put your JavaScript code here.
        function LoadCustomer(sender, eventArgs) {
            var CustomerCombo = $find("<%=Customer.ClientID%>");
            CustomerCombo.clearSelection();
            CustomerCombo.requestItems("", false);
        }
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
    </telerik:RadAjaxManager>
    <div>
        <telerik:RadComboBox ID="SalesList" Runat="server" onclientselectedindexchanging="LoadCustomer">
            <Items>
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" />
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" />
            </Items>
        </telerik:RadComboBox>
          
          
        <telerik:RadComboBox ID="Customer" runat="server" onitemsrequested="Customer_ItemsRequested" >
        </telerik:RadComboBox>
    </div>
    </form>
</body>
</html>

about 8 seconds  for 2999 items in IE 8, but seems ok  in Chrome. How to solve  the problem ?

Regards,
Agi
Helen
Telerik team
 answered on 09 Dec 2015
3 answers
159 views
hi all,

i have a radpanelbar bind with datasource during pageload. when i click on the item, the screen auto refresh again.

how do i prevent the page from reload/refresh after clicked?

appreciate any inputs. thanks!

regards,

Richard
Ivan Danchev
Telerik team
 answered on 09 Dec 2015
1 answer
87 views

This is my RadListBox

     <tele:RadListBox ID="listboxview" runat="server"  Height="500px"  Width="100%" Font-Size="11px"  DataTextField="master"
                                             DataValueField="master" OnClientSelectedIndexChanged="putTag"    OnItemDataBound="listboxview_ItemDataBound"  ></tele:RadListBox>

 This is my RadEditor

     <tele:RadEditor ID="RadEditor1" runat="server" ToolbarMode="RibbonBar" AutoResizeHeight="true" Skin="Office2007"  EnableResize="false"  Height="760px"     _ToolsFile="tools.xml"    Width="100%" >  </tele:RadEditor>

 

This is my Javascript method for pasting the Text to the Cursor Postion.

 function putTag(sender, eventArgs) {
                     debugger;
                    var itemsValue = sender.get_selectedItem().get_value();  // i got the value there from selecting the Item in the Listview
                    var editor = $find("<%= RadEditor1.ClientID %>");
                    var rng = editor.getSelection().getRange();
                    editor.getSelection().selectRange(rng);
                    editor.pasteHtml("[/" + itemsValue + "/]");
           
            }

when i click on the Listview then i want the text to the RadHtmlEditor, but using the Following codes i cant do this.

Plz correct my code.

 

 

Ianko
Telerik team
 answered on 09 Dec 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?