Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
128 views
Hi All,

I am using RadControl Q1 2009 control.

I am using RadEditor, and radTreeview control.

I want to drop the theeview node to radeditor on selected position.

In currently it drop the data on to first line of rad editor.
But i want to drop it on selected cursor position.

How can i dow this?


My code for droping is below.

 

 function OnClientNodeDropping(sender, args) 
        {                        
            var editor = $find("<%=RadEditor1.ClientID%>");                                              
     editor.setFocus(); 
       editor.pasteHtml("test"); 
 
 
 }

I have tried the the one more code

 function OnClientNodeDropping(sender, args) 
        {                        
            var editor = $find("<%=RadEditor1.ClientID%>");                                              
    editor.setFocus(); 
    editor.setActive(); 
    var rng = editor.getSelection().getRange(); 
    rng.moveToPoint(294, 322); 
    rng.expand("word"); 
    rng.select(); 
     editor.pasteHtml("test")
}


But it also not work it gives error as '"Incompatible markup pointers for this opertion'



 
  


Thanks,
Rumen
Telerik team
 answered on 14 Aug 2009
0 answers
130 views
Hi team,

I have build one Rotator programaticaly implemented as Todd Anglin blog sample with ItemTemplate as Itemplate implementation. My problem is that my item template is rended as "Text" <%# Container.DataItem %> in place to be evaluated. Could you suggest some solution to be able to evaluate the content inside my rotator using codebehind.

C# as codebehind 
... 
Rot.ItemWidth = Unit.Pixel(300); 
Rot.ItemHeight = Unit.Pixel(200); 
Rot.ItemTemplate =new RotatorTemplate() ; 
... 
public class RotatorTemplate : ITemplate 
    #region ITemplate Membres 
    public void InstantiateIn(System.Web.UI.Control container) 
    { 
        LiteralControl lc1 = new LiteralControl("<%# Container.DataItem %>"); 
        container.Controls.Add(lc1);  

    } 
    #endregion 
}                
 
In my case i use one List<string> item that work perfect in static code as
<ItemTemplate>
<%# Container.DataItem %>
</ItemTemplate>

Many thanks, Romi

Pierre
Top achievements
Rank 1
 asked on 14 Aug 2009
1 answer
84 views
Hi all,

i hope i can describe this properly:

We create an ImageManager for an editor in Codebehind like this:

DialogDefinition imageManager4Editor = new DialogDefinition(typeof(ImageManagerDialog), ImageManagerParameters); 
imageManager4Editor.ClientCallbackFunction = "ImageManagerFunction"
imageManager4Editor.Width = Unit.Pixel(694); 
imageManager4Editor.Height = Unit.Pixel(440); 
DialogOpener1.DialogDefinitions.Add("ImageManager4Editor", imageManager4Editor); 
 

Then the ImageManager CallbackFunction which returns the values for the image looks like this:

function ImageManagerFunction(sender, args)   
{   
    var commandName = args.get_commandName();    
                 
    var value = args.get_value(); 
    var src = value.src; // works 
    var height = value.height; // works 
    var width = value.width; // works 
    var border = value.? //  
    ... 
     
}     

Now, we would need the names of all other properties, which the properties-tab of the ImageManager holds, at least: border-color, border-width, image-alignment, margin.

Is there a list, reference or soemthing like that with the names of these properties?

Thanks in advance
Felix
Rumen
Telerik team
 answered on 14 Aug 2009
1 answer
114 views
Hi,

I have one RadDockzone and i added the controls to  the doczone dynamically (through Code behind). How i can able to place the Expand/Collapse button on the top right of the Dock zone. I can able to get the close button but the Expand/Collapse button is not comming when the Dockzone is loaded.

NB: The controls inside the RadDockzone are created dynamically.

Can any one help me to solve this Issue.

Thanks & Regards,
Sushanth Mathew.


 

Pero
Telerik team
 answered on 14 Aug 2009
3 answers
140 views
Just wondering if this is a known bug or not. Setting the width programmatically:
      
rgAuthorizations.Columns.FindByDataField("HExports").HeaderStyle.Width = New Unit(20, UnitType.Point) 

I get the following exception:

System.SystemException: Unknown length unit 'ptpx' 
  at Telerik.Web.Apoc.ApocDriver.FireApocError(String message) 
  at Telerik.Web.Apoc.DataTypes.FixedLength.Convert(Double dvalue, String unit) 
  at Telerik.Web.Apoc.DataTypes.FixedLength..ctor(Double numUnits, String units) 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parsePrimaryExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseUnaryExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseMultiplicativeExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseAdditiveExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseProperty() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parse(String expr, PropertyInfo propInfo) 
  at Telerik.Web.Apoc.Fo.PropertyMaker.Make(PropertyList propertyList, String value, FObj fo) 
  at Telerik.Web.Apoc.Fo.PropertyListBuilder.MakeList(String ns, String elementName, Attributes attributes, FObj parentFO) 
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.StartElement(String uri, String localName, Attributes attlist) 
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)  

I have tried it with Points and EMs as my units.
JP Shilton
Top achievements
Rank 1
 answered on 14 Aug 2009
1 answer
120 views
Hi,

I have a template column in my grid set to RadComboBox. I have set the RequireFieldValidator as well on that control. But somehow on insert/edit of a row, the validator doesnt fire.

 <EditItemTemplate> 
                                                <telerik:RadComboBox ID="rcbStartPort" runat="server"  Skin="Custom" EnableEmbeddedSkins="false" AllowCustomText="False"   
                                                EnableVirtualScrolling="False" OnItemsRequested="rcbStartPort_ItemsRequested" Height="100px"   
                                                EmptyMessage="Select a Port" MarkFirstMatch="true" EnableLoadOnDemand="true" OnClientBlur="OnClientBlurHandler" ></telerik:RadComboBox> 
                                                  
                                                <asp:RequiredFieldValidator ID="rfvStartPort" runat="server" ControlToValidate="rcbStartPort" 
                                                Display="None" ErrorMessage="Start Port is mandatory" SetFocusOnError="True"></asp:RequiredFieldValidator>       
                                                  
                                            </EditItemTemplate>  

Is there something else I need to do?

Regards,
Saurabh
Saurabh Srivastava
Top achievements
Rank 1
 answered on 14 Aug 2009
7 answers
359 views
I have taken your modality example and modified a little so that I could possibly use it as an edit pop up.  I included a RadDatePicker within the asp:UpdatePanel and by doing this the panel does not show.  If I remove the RadDatePicker then it does show.  Do you know what I am doing wrong?  I am including the aspx page below:

<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="modalpopup.aspx.vb" Inherits="modalpopup" %>

 

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

head id="Head1">

 

 

</

 

head>

 

<

 

body class="BODY">

 

 

<form id="Form1" method="post" runat="server">

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server">

 

 

</asp:ScriptManager>

 

 

<p>

 

When you click the button below, a modal RadToolTip will show, that will "block"

the page while you perform some operation (e.g. AJAX Request) and the page is unavailable

for the user until the operation ends up.

 

</p>

 

 

<telerik:RadToolTip ID="RadToolTip1" runat="server" Modal="true" ShowEvent="FromCode"

 

 

Position="Center" RelativeTo="BrowserWindow" OnClientBeforeHide="OnClientBeforeHide"

 

 

Width="130px">

 

 

<img src="./Images/loading.gif" width="130" height="60" alt="&nbsp;" /><br />

 

 

</telerik:RadToolTip>

 

 

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

 

 

<ContentTemplate>

 

<

 

asp:Button ID="Button1" runat="server" Text="Simulate long AJAX request" OnClick="Button1_Click"

 

CssClass

 

="button" Style="display: block; float: left;" />

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

 

<br /><br /><br />

 

 

<script type="text/javascript">

 

 

//<![CDATA[

 

 

var toHide = false;

 

 

function OnClientBeforeHide(sender, args) {

 

 

if (!toHide) args.set_cancel(true);

 

}

 

//Attach to event that will indicate when ajax request is complete

 

Sys.WebForms.PageRequestManager.getInstance().add_beginRequest

(

 

function(sender, args) {

 

toHide =

false;

 

 

if (args.get_postBackElement().id == "Button1") {

 

 

var tooltip = $find("<%= RadToolTip1.ClientID %>");

 

tooltip.show();

}

 

else if (args.get_postBackElement().id == "Button2") {

 

 

var tooltip = $find("<%= RadToolTip2.ClientID %>");

 

tooltip.show();

}

}

);

 

function GetActiveToolTip() {

 

 

var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();

 

 

return tooltip;

 

}

 

//Attach to event that will indicate when ajax request is complete

 

Sys.WebForms.PageRequestManager.getInstance().add_endRequest

(

 

function(sender, args) {

 

 

var tooltip = GetActiveToolTip();

 

 

if (tooltip != null && tooltip.get_id() == "RadToolTip1") {

 

toHide =

true;

 

tooltip.hide();

}

}

);

 

function HideToolTip() {

 

 

var tooltip = GetActiveToolTip();

 

 

if (tooltip.get_id() == "RadToolTip2") {

 

toHide =

true;

 

tooltip.hide();

 

}

};

 

function ToggleFirstPopup() {

 

$find(

"<%= RadDatePicker1.ClientID %>").showPopup();

 

};

 

//]]>

 

 

</script>

 

 

<p>

 

The button below opens a registration form and "blocks" the page until the user

has submitted it.

 

</p>

 

 

<p>

 

 

<asp:Button ID="Button2" runat="server" Text="Show Login Form" CssClass="button" />

 

 

</p>

 

 

 

 

<telerik:RadToolTip ID="RadToolTip2" runat="server" Modal="true" ShowEvent="FromCode"

 

 

Position="Center" RelativeTo="BrowserWindow"

 

 

OnClientBeforeHide="OnClientBeforeHide" ManualClose="True">

 

 

<asp:UpdatePanel runat="server" ID="UpdatePanel2">

 

 

<ContentTemplate>

 

 

<asp:Panel ID="pInquiry" runat="server" Style="padding-left: 11px;">

 

Log in:

<br />

 

 

<br />

 

 

<table>

 

 

<tr>

 

 

<td style="width: 200px">

 

Hours

<asp:RequiredFieldValidator ID="rfvHours" ControlToValidate="txtHours" Display="Dynamic" runat="server" ErrorMessage="[Required]"></asp:RequiredFieldValidator>

 

:

<br />

 

 

<asp:TextBox ID="txtHours" runat="server"></asp:TextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 200px">

 

Target Date:

<asp:RequiredFieldValidator ID="rfvTargetDate"

 

 

ControlToValidate="RadDatePicker1" Display="Dynamic" runat="server"

 

 

ErrorMessage="[Required]"></asp:RequiredFieldValidator>

 

 

<br />

 

 

<telerik:RadDatePicker ID="RadDatePicker1" runat="server"

 

 

Culture="English (United States)" Skin="Vista" Style="vertical-align: middle;"

 

 

Width="200px">

 

 

<Calendar Skin="Vista" UseColumnHeadersAsSelectors="False"

 

 

UseRowHeadersAsSelectors="False" ViewSelectorText="x">

 

 

</Calendar>

 

 

<DatePopupButton HoverImageUrl="" ImageUrl="" Visible="false" />

 

 

<DateInput ID="DateInput1" runat="server" DateFormat="D"

 

 

onclick="ToggleFirstPopup()">

 

 

</DateInput>

 

 

</telerik:RadDatePicker>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 200px">

 

Priority:

<br />

 

 

<telerik:RadComboBox ID="RadComboBox1" runat="server" AllowCustomText="True"

 

 

EmptyMessage="Select a priority...">

 

 

<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>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 200px">

 

Tech:

<br />

 

 

<telerik:RadComboBox ID="RadComboBox2" runat="server" AllowCustomText="true" EmptyMessage="Select a techie..."></telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 100px">

 

 

<asp:Button ID="btnLogIn" runat="server" Text="Log in" OnClick="btnLogIn_Click" />&nbsp;<button id="btnCancel" onclick="HideToolTip()">Cancel</button></td>

 

 

</tr>

 

 

<tr>

 

 

<td style="width: 100px">

 

 

<asp:Label ID="lblError" Width="150px" runat="server" Visible="false" ForeColor="red"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<telerik:RadInputManager ID="RadInputManager1" runat="server">

 

 

<telerik:NumericTextBoxSetting BehaviorID="NumercBehavior2" EmptyMessage="type.." Type="Number">

 

 

<TargetControls>

 

 

<telerik:TargetInput ControlID="txtHours" />

 

 

</TargetControls>

 

 

</telerik:NumericTextBoxSetting>

 

 

</telerik:RadInputManager>

 

 

</asp:Panel>

 

 

</ContentTemplate>

 

 

<Triggers>

 

 

<asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />

 

 

</Triggers>

 

 

</asp:UpdatePanel>

 

 

</telerik:RadToolTip>

 

 

 

<br />

 

 

</form>

 

</

 

body>

 

</

 

html>

 

Jason Zam
Top achievements
Rank 1
 answered on 14 Aug 2009
0 answers
80 views
Does anyone have a event scheduler application developed in VB.net that they want to sell.

Im looking to manage an employees time and events such as trade shows.

Thanks
Larry
larry talley
Top achievements
Rank 1
 asked on 14 Aug 2009
9 answers
1.8K+ views
I have been new at this component and been trying to use it

I would like to display an empty grid on load of my page.

the grid should have no data and it should display the "No records to display."

we have a check box above the grid where the user will check what items they want to display in the grid......

When checked the grid will display the items information.

I have seen other forums about this but can't find a sample running program....

I saw the forum which mention about the use of a blank object to the grids datasource but I cant figure out how to make it...

Pls. I would like to see how to use a blank object to the datasource...since i think its the best way or is their another way??

Daniel
Telerik team
 answered on 14 Aug 2009
2 answers
107 views
Hello,

Is it possible to darken the border lines separating rows and columns.
The present lines appear to be too light.
Any help would be greatly appreciated.

Thanks.
sagar
Top achievements
Rank 1
 answered on 14 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?