Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
228 views
HI,
    I am showing thumbnails of images(stored in ~\images\thumbnails\xyz_thumbnail.jpg) in RadRotator and when anybody drags and drops the thumbnail from the rotator into radeditor, then I need the main image(~\images\xyz.jpg) to be placed into the rad editor and not the thumbnail. Can anybody suggest the event in which I can do this and how?
Rumen
Telerik team
 answered on 21 Sep 2011
1 answer
61 views
 
Hi,
 I want to handle the event when user is dragging and dropping content( the content should be div) inside content area, How should i attach event to the OnDragEnd event of the content area's document. Anyone could give me an example with sample project. I am very much trouble with that as i need to confirm it to my CTO so that he might bought this product. Still i am not sure that is it possible to drag and drop content inside Red editor content area. If it is possible then will it be cross browser comfortable. Please advice if possible with sample code and project.

Thanks,
Rashim
Rumen
Telerik team
 answered on 21 Sep 2011
1 answer
192 views
Hello all,

I am trying to implement  a rad editor. In it there is an Image Manager and inside the image manager there is an Image editor. So far its fine(the image is being shown perfectly).

As in every story there is a villain, here it is.
  Now the problem arises when i click on any of the tool buttons in the image editor window. The popup screen is shown, but there is nothing inside it. Like when i click on the C
rop button the popup heading is just "Tool Dialog" and there is not content in it. A preview can be seen here.

This issue arises only when i use it in a RadEditor. When i am use an Image Editor alone then there is no issue. I am stuck here..

Thanks ,
Roshil
Rumen
Telerik team
 answered on 21 Sep 2011
1 answer
101 views

I'm using RadMenu skin object in DNN.

For page that are level 3, I want to insert them under their level 2 parent as an undordered, bulleted list. (Please see attachment.)

How do I accomplish this dynamically?

I've tried using an itemTemplate, but that doesn't seem to be doing anything.  Perhaps, I'm going about this the wrong way.  Any immediate insight would be appreciated.

protected void Page_Load(object sender, EventArgs e)
{
    UnorderedListTemplate template = new UnorderedListTemplate();
    RadMenu menu = dnnMenu.FindControl("RadMenu1") as RadMenu;
    foreach (RadMenuItem item in menu.Items)
        template.InstantiateIn(item);
}
 
class UnorderedListTemplate : ITemplate
{
    public void InstantiateIn(Control container)
    {
        RadSiteMap rsMap = new RadSiteMap();
        rsMap.ID = "radSiteMap";
        rsMap.DataBinding += new EventHandler(MenuItem_DataBinding);
        container.Controls.Add(rsMap);
    }
 
    private void MenuItem_DataBinding(object sender, EventArgs e)
    {
        RadSiteMap target = (RadSiteMap)sender;
        RadMenuItem item = (RadMenuItem)target.BindingContainer;
        target.DataSource = (RadMenuItemCollection)DataBinder.Eval(item, "Items");
    }
}

Peter
Telerik team
 answered on 21 Sep 2011
5 answers
331 views
Hello,
I have a problem with a expandable textbox and RadPanelBar.
I'm using jQuery () and an elastic library to make the expanded effect in the textbox:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
    <script src="Scripts/jquery.elastic.source.js" type="text/javascript"></script>

Elastic source is: http://unwrongest.com/projects/elastic/

Everything is fine until I move the textbox inside an PanelItem content and start writing, everytime I press enter to move to a new line in the text box my cursor is gone, it seems to go to the default button of the form and the component loses focus.
Have to click in text fields to continue typing.
It's happening with IE 8 or inferior versions. (not with IE 9)
Looks like there is an internal event when RadPanelItem growth his vertical size that makes the cursor move from his actual position to other place, I can see the cursor position after texbox growth but then just go to somewhere else. 
As you will see, the textbox outside panel item works fine and the one inside the collapsed panel item doesn't work.
Do you have any suggestion or workaround to fix this in IE 8 or bellow?
Thanks so much in advanced for your help.

Here is the code of my test web page:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="testcontrol.aspx.vb" Inherits="mytestproject.testcontrol" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title>Test</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
    <script src="Scripts/jquery.elastic.source.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">
        <script type="text/javascript">
 
            function OnClientLoad(sender, args) {
                var txt1 = '<%=txtExtDesc.ClientID %>';
                var txt2 = '<%=txtNotes.ClientID %>';
                $('#' + txt1).elastic();
                $('#' + txt2).elastic();
            }
 
        </script>
    </telerik:RadScriptBlock>
    <telerik:RadScriptManager CdnSettings-TelerikCdn="Enabled" EnablePageMethods="true"
        ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
     <div style="margin-left: 25px; margin-right: 25px; margin-top: 10px; margin-bottom: 10px;width:100%;text-align: center;">
        <div style="width:925px;">
            <fieldset style="margin: 10px 25% 10px 25%; position: relative; width: 50%; padding-bottom: 10px;">
                <legend>Options:</legend>
                <span style="text-align: center">
                    <asp:Button ID="btnUpdateItem" runat="server" CommandName="Update" CssClass="rgPagerButton" Text="Update" CausesValidation="true" ValidationGroup="basicValidation" />
                    <asp:Button ID="btnInsertItem" runat="server" CommandName="Insert" CssClass="rgPagerButton" Text="Insert" CausesValidation="true" ValidationGroup="basicValidation" />
                </span>
            </fieldset>
            <div style="width: 100%; vertical-align: middle; text-align: left">
                <asp:ValidationSummary runat="server" ID="validationSummary" ShowMessageBox="True" ValidationGroup="basicValidation" />
            </div>
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="100%">
                <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="100%" Skin="Web20" OnClientLoad="OnClientLoad">
                    <Items>
                        <telerik:RadPanelItem runat="server" Selected="True" Expanded="True" Text=" .- Basic Information" ToolTip="Basic information about the item">
                            <Items>
                                <telerik:RadPanelItem Value="basicInfo" runat="server">
                                    <ContentTemplate>
                                        <div class="text" style="background-color: #edf9fe; padding-left: 50px;">
                                            <ul class="formList" id="basicInfo">
                                                <li>
                                                    Some controls
                                                </li>
                                                <li class="lastListItem">
                                                    Some controls
                                                </li>
                                            </ul>
                                        </div>
                                    </ContentTemplate>
                                </telerik:RadPanelItem>
                            </Items>
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem runat="server" Selected="false" Expanded="false" Text=" .- Other Details" ToolTip="Other details about the item">
                            <Items>
                                <telerik:RadPanelItem Value="otherdetInfo" runat="server">
                                    <ContentTemplate>
                                        <div class="text" style="background-color: #edf9fe; padding-left: 50px;">
                                            <ul class="formList" id="otherdetInfo" >
                                                <li>
                                                    <asp:Label CssClass="labelField" runat="server" ID="lblExtDesc" AssociatedControlID="txtExtDesc">Inside doesn't work:</asp:Label>
                                                    <asp:TextBox ID="txtExtDesc" runat="server" Rows="3" Columns="50" MaxLength="4999" TextMode="MultiLine" Text=""></asp:TextBox>
                                                </li>    
                                            </ul>
                                        </div>
                                    </ContentTemplate>
                                </telerik:RadPanelItem>
                            </Items>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelBar>
                <asp:Label CssClass="labelField" runat="server" ID="lblIntNote" AssociatedControlID="txtNotes">This one works:</asp:Label>
                <asp:TextBox ID="txtNotes" runat="server" Rows="3" Columns="50" MaxLength="255" TextMode="MultiLine" Text=""></asp:TextBox>
            </telerik:RadAjaxPanel>
        </div>
    </div>
    </form>
</body>
</html>

Kate
Telerik team
 answered on 21 Sep 2011
11 answers
935 views
Hi,
I am using the following code to get the first column of the grid as a check box column .
<telerik:radgrid ID="RadGrid2" DataSourceID="SqlDataSource1" AllowMultiRowSelection="true"
        runat="server" AllowSorting="True" GridLines="None" 
        onneeddatasource="RadGrid2_NeedDataSource" OnItemCreated="RadGrid1_ItemCreated"  EnablePostBackOnRowClickproperty ="true"  OnItemCommand="RadGrid1_ItemCommand" >
        <MasterTableView>
            <Columns>
                <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
            </Columns>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
    </telerik:radgrid>

Here i need to do some logic like on clicking particular check box add one id field to viewstate/session.And remove that id on uncheck of that checkbox.
If i use GridClientSelectColumn  , how can i handle the check box check changed event ?is there any grid events similar to this ?

I tried

EnablePostBackOnRowClickproperty

="True"

 

But then also postback is not happening on row click .

Any help is appreciated!! 

Regards,
Soumya
Winni
Top achievements
Rank 1
 answered on 21 Sep 2011
3 answers
107 views
I've noticed that when I switch from design view to HTML view, my cursor does not maintain my position in the html view.  Meaning when i'm halfway down a piece of text, and wish to inspect the underlying HTML, i'm not taken to that same place in the HTML - i'm taken back to the top of the content.  This can make it quite time consuming to go back and find my location.  Is there a way to maintain cursor position while switching views?
Rumen
Telerik team
 answered on 21 Sep 2011
2 answers
131 views
Hi,

I have a SharePoint 2010 visual webpart created using RadGrid control. Now I wish to apply custom css such that it forces the "theme" colors for Header background, border color, Row background and Alternate Row background.  (I tried for an aspx page using custom skin and it was working fine). I would appreciate if the steps be provided on how can this functionality be achieved for SharePoint.
Ashwin
Top achievements
Rank 1
 answered on 21 Sep 2011
3 answers
116 views
Hi,
I have a RadGrid that I want to load other user controls when clicking on a row. How to accomplish this?

I have set ClientSetting EnablePostBackOnRowClick to true and enabled Ajax (EnableAJAX="true").

I have tried to create a method in code behind as below but this will not add the text "Postback" to Label1.

protected void gvShipments_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName == "RowClick")
            {
                e.Item.Selected = true;
                Label1.Text += "Postback";
            }
        }

Pls advice.

Br,
Jesper
Pavlina
Telerik team
 answered on 21 Sep 2011
2 answers
195 views
Hi,
I need to intercept the __EVENTTARGET during the PageLoad when I rise the PerformInsert action into RadGrid.
If I use ButtonType =  Image my Request["__EVENTTARGET"] is blank, if I use ButtonType = LinkButton my Request["__EVENTTARGET"] has the correct value.

I don't wanna use LinkButton, so, why my button with ImageButton don't have the tipically __doPostBack("...........$PerformInsertButton", ''); and why I can find it into my Reques["__EVENTTARGET"] ?

Thanks

Best regards
Lasly
Top achievements
Rank 1
 answered on 21 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?