Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
107 views
This post showed up twice.

Clearing the duplicate...

Original topic can be found here: http://www.telerik.com/community/forums/thread/b311D-bkhgtt.aspx
Brad Docimo
Top achievements
Rank 1
 asked on 03 Sep 2008
1 answer
213 views
I have a rad editor within a radgrid (inline editing).  When i click edit button, the data is not getting bound to the rad editor.
Here are the steps what i followed:


<radG:RadGrid TabIndex="11" ID="RadgWelcome" Width="100%" Skin="Glassy" SkinsPath="~/App_Themes/"

EnableAJAX="True" AutoGenerateColumns="False" LoadingTemplateTransparency="20"

ItemStyle-Height="20px" AlternatingItemStyle-Height="20px" AllowMultiRowEdit="false"

AllowMultiRowSelection="true" OnNeedDataSource="RadgWelcome_NeedDataSource" OnInsertCommand="RadgWelcome_InsertCommand"

OnUpdateCommand="RadgWelcome_UpdateCommand" OnDeleteCommand="RadgWelcome_DeleteCommand"

OnItemDataBound="RadgWelcome_ItemDataBound" MasterTableView-RetrieveAllDataFields="true"

EnableOutsideScripts="true" EnableAJAXLoadingTemplate="false" runat="server" AllowSorting="true"

PageSize="10" AllowPaging="true">

<MasterTableView Width="100%" HorizontalAlign="NotSet" AutoGenerateColumns="false"

CssClass="master" CommandItemStyle-CssClass="masteritem" CommandItemDisplay="Top">

<PagerStyle Mode="NumericPages" CssClass="pager" />

<%

--Link Button to add a new Division--%>

<CommandItemTemplate>

<asp:LinkButton ID="lnkAddNew" runat="server" CommandName="InitInsert" Visible='<%# !RadgWelcome.MasterTableView.IsItemInserted %>'>

<img style="border:0px" alt="" src="RadControls/Grid/Skins/Glassy/AddRecord.gif" />

Add a New Message

</asp:LinkButton>

</CommandItemTemplate>

<Columns>

<%

--Description--%>

<radG:GridTemplateColumn HeaderText="Employee Benefit Center" SortExpression="description"

DataField="description" ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Middle">

<ItemTemplate>

<%

--<asp:Label ID="lblDesc" runat="server" Text='<%# Eval("description") %>' />--%>

<asp:Literal ID="lblDesc" runat="server" Text='<%# Eval("description") %>' Mode="PassThrough" />

</ItemTemplate>

</radG:GridTemplateColumn>

<radG:GridTemplateColumn SortExpression="description" DataField="description" ItemStyle-HorizontalAlign="left"

ItemStyle-VerticalAlign="Middle">

<ItemTemplate>

<asp:ImageButton ID="lnkButton" runat="server" CommandName="Edit" AlternateText="Edit"

ImageUrl="~/images/edit_icon.gif" />

</ItemTemplate>

</radG:GridTemplateColumn>

<radG:GridTemplateColumn HeaderText="" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="left"

ItemStyle-VerticalAlign="Middle">

<%

--Delete Button--%>

<ItemTemplate>

<asp:ImageButton ID="imgbtnDelete" runat="server" ImageUrl="images/delete_icon.gif"

CommandName="Delete" OnClientClick="return confirm('Are you sure you want to delete?');"

CommandArgument='<%# Eval("id") %>' ToolTip="Delete" />

</ItemTemplate>

</radG:GridTemplateColumn>

</Columns>

<EditFormSettings EditFormType="Template">

<FormTemplate>

<fieldset>

<%

--Description--%>

<label for="Directory" class="formlabel left">

<span class="reqfld">*</span>Message Text</label>

<asp:HiddenField ID="hdnDesc" runat="server" Value='<%#Bind("description") %>' />

<radE:RadEditor runat="server" ID="txtDesc" Height="400px" ShowSubmitCancelButtons="false"

ShowPreviewMode="false" ShowHtmlMode="false" StripAbsoluteImagesPaths="false">

<content>

</content>

</radE:RadEditor>

<%

--Insert,Update and Cancel Buttons--%>

<div class="btnpnl">

<asp:Button ID="btnUpdate" CssClass="btn" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

ToolTip='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server"

CommandArgument='<%# Eval("id") %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'

TabIndex="0"></asp:Button>&nbsp;

<asp:Button ID="btnCancel" Text="Cancel" CssClass="btn" runat="server" CausesValidation="False"

CommandName="Cancel" ToolTip="Cancel" TabIndex="0"></asp:Button>

</div>

</fieldset>

</FormTemplate>

</EditFormSettings>

</MasterTableView>

</radG:RadGrid>


CODE BEHIND:

protected

void RadgWelcome_ItemDataBound(object sender, GridItemEventArgs e)

{

    try

    {

        if (e.Item is GridEditFormItem && e.Item.IsDataBound && e.Item.IsInEditMode)

        {

                GridEditFormItem gridEditFormItem = (GridEditFormItem)e.Item;

                HiddenField hdnDesc = (HiddenField)gridEditFormItem.FindControl("hdnDesc");

                RadEditor txtDesc = (RadEditor)gridEditFormItem.FindControl("txtDesc");

                txtDesc.Text = hdnDesc.Value;

            }

}

catch (Exception ex)

{

    lblError.Text = ex.Message;

}

}

Tervel
Telerik team
 answered on 03 Sep 2008
2 answers
130 views
Hi,

Having a curious problem with the PanelBar that I've never had before. The only difference this time is that I'm trying to use it in a Sharepoint environment. I should point out here that I've also got a Telerik radMenu control on the same page and that works fine.

The code for the menu is as follows:

ASCX:

<

telerik:RadPanelBar ID="radMenu" Runat="server">

</

telerik:RadPanelBar>

ASCX.VB

Imports

System
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.IO
Imports Microsoft.SharePoint
Imports Microsoft.SharePoint.WebControls
Imports Microsoft.SharePoint.WebPartPages
Imports Microsoft.SharePoint.Publishing.Navigation
Imports PublishingWeb = Microsoft.SharePoint.Publishing.PublishingWeb

Imports

PublishingWebCollection = Microsoft.SharePoint.Publishing.PublishingWebCollection

Imports

SPWebTemplate = Microsoft.SharePoint.SPWebTemplate
Imports Microsoft.SharePoint.Publishing
Imports Telerik.Web.UI

 

Partial

Public Class MOSS_InternetSideMenu

Inherits System.Web.UI.UserControl

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Try
Dim rootWeb As PublishingWeb = PublishingWeb.GetPublishingWeb(SPContext.Current.Site.RootWeb)
Dim defaultPageUrl As String = rootWeb.DefaultPage.ServerRelativeUrl

Dim smnHome As PortalListItemSiteMapNode = DirectCast(PortalSiteMapProvider.CombinedNavSiteMapProvider.FindSiteMapNode(defaultPageUrl), PortalListItemSiteMapNode)

For Each smnTopLevelItem As SiteMapNode In smnHome.ParentNode.ChildNodes
  Dim rpi As New RadPanelItem
  CreateParentMenuItem(rpi, smnTopLevelItem.Title.ToString,
"", smnTopLevelItem.Url.ToString)

  radMenu.Items.Add(rpi)

  If smnTopLevelItem.HasChildNodes Then
    
For Each smnChildItem As SiteMapNode In smnTopLevelItem.ChildNodes
      
Dim rpiChild As New RadPanelItem
       CreateSubMenuItem(rpiChild, smnChildItem.Title.ToString,
"", rpi, smnChildItem.Url.ToString)
    
Next
 
End If
Next

Catch ex As Exception
 Response.Write(ex.ToString)
End Try

End Sub

 

Sub CreateParentMenuItem(ByVal rpi As RadPanelItem, ByVal strItemText As String, ByVal strCssClass As String, ByVal strURL As String)

'adds main menu item

 rpi.Items.Clear()
 rpi.Text = strItemText
 rpi.CssClass = strCssClass
 rpi.PostBack =

False
End Sub

Sub CreateSubMenuItem(ByVal rpi As RadPanelItem, ByVal strItemText As String, ByVal strCssClass As String, ByVal rpiParent As RadPanelItem, ByVal strURL As String)

'adds sub menu item

rpi.Items.Clear()
rpi.Text = strItemText
rpi.CssClass = strCssClass
rpi.NavigateUrl = strURL
rpiParent.Items.Add(rpi)

End Sub


The menu displays fine, it just doesn't open. To make sure it wasn't a a coding error, I tried it with a static menu that I know works and got the same result.

Any help would be much appreciated.

Mark
Top achievements
Rank 1
 answered on 03 Sep 2008
3 answers
94 views
Is there a way to display dates from a RadScheduler on a RadCalendar. I've taken a look at the outlook 2007 example at http://demos.telerik.com/ASPNET/Prometheus/Scheduler/Examples/Outlook2007/DefaultCS.aspx

But i don't see how the RadScheduler dates are binded to the RadCalendar.
Peter
Telerik team
 answered on 03 Sep 2008
2 answers
100 views
Hello,

I've noticed some weird behavior with my grid with custom paging, and went to the demo site http://demos.telerik.com/aspnet/Grid/Examples/Programming/CustomPaging/DefaultVB.aspx located here, and was able to reproduce the bug.

Follow these steps to reproduce the bug:
1. Filter the first column by typing in "Number" and the filter by "Contains" (Notice the amount of pages after this first filter).
2. Filter the second column by typing in "10" and filter by "Equal To".
3. Remove the second column filter by deleting "10" and filter by "NoFilter".

Notice the resulting number of pages, it still says there is only one page of results, when it should be the same result set as after we applied #1.

Thank you for your assistance.
Vlad
Telerik team
 answered on 03 Sep 2008
1 answer
127 views
Hello,

I've looked in this forum but  I didn't get a correct answer on the following problem :

I have a timer which ticks every 5 seconds to refresh some data on my page, and I also have a combobox ( that is not linked to the modifications done by the timer ).
When the combobox is expanded, if the timer ticks then the combobox is collapsed.
I have noticed the same behaviour when a control has the focus, if the timer ticks then it looses the focus.

How can I avoid this behaviour ?

I have the following version : 2008.1.619

Thanks in advance.
Veselin Vasilev
Telerik team
 answered on 03 Sep 2008
4 answers
118 views
Hi.

I've just installed RadEditor 5.2 for SharePoint. It is working welll in FireFox 3.0 and IE 7.0, but when I use IE 6.0 (our cutomer(s) has that as a standard still) the Image Editor and Image Map Editor does not show the fields for etnering parameters (they are of the bounds of the dialog).

Is it suppose to work for IE 6.0? Is there some css/javascript updates that my fix it?

Best regards,
Frode
Tervel
Telerik team
 answered on 03 Sep 2008
3 answers
104 views
Hi there,

I'm using RadAjaxManager (Q1 2008) in implementing Ajax calls to populate a dropdown list based on the value selected in another dropdown list. The ajax declarations are as shown below:

<telerik:RadAjaxManager runat="server" ID="radAjaxMgr">
    <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ddlFunction">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ddlvalues" LoadingPanelID="Loadingpanel5" />
                </UpdatedControls>
            </telerik:AjaxSetting>
   </AjaxSettings>
</telerik:RadAjaxManager>

"ddlFunction" is dropdown list "Function", and ddlvalues is dropdown list "Values". The 2 dropdowns are placed one below the other in the page, along with 3 more dropdowns after these, all one below the other. The strange problem here is that, when the page is rendered, I notice a gap between the dropdown "Values" and the next dropdown.

Now this is causing appearance problem. But when I remove Ajax declarations for the dropdowns "Function" and "Values", there is no gap between the "Values" dropdown and the next dropdown.

I have used similar Ajax declarations in another page, where the scenario is again to populate a dropdown based on value selected in another dropdown. In this page, I have 2 link buttons aligned to the right of the 2 dropdowns. When the page is rendered, I notice that the first link button remains aligned to the right of the first dropdown, but the second link button gets placed below the second dropdown. Why does this "extra gap" appear in when I add Rad Ajax settings, but does not appear when Rad Ajax settings are not used?
Pramod Goutham
Top achievements
Rank 1
 answered on 03 Sep 2008
4 answers
157 views

How can I search for an item by its text and remove all other nodes out of the hierarchy?

ex:

Computers
--- Programming
----- Web
-------- C#
----- Windows
-------- VB.Net
--- Design
----- Photoshop
----- Fireworks

If the user searches for "VB.Net" it must clean the treeview and display only:

Computers
--- Programming
----- Windows
-------- VB.Net

How can I do this?

And how can I search for nodes by using just part of the text (Wildcard search)?

Atanas Korchev
Telerik team
 answered on 03 Sep 2008
1 answer
160 views

My default.aspx page, which is being opened using the RadWindow control, has a Cancel button which does not work in closing the window. I try the following, amongst many others, which does not work: 

function

Cancel_Clicked()

{

var oWindow = GetRadWindow();

oWindow.close();

}

OR:

function Cancel_Clicked()

{

window.opener = window.radWindow;

window.close();

}

<button onclick="Cancel_Clicked();" class="bButton">Cancel</button>


When I open default.aspx in a separate window, the closing event works with the second Cancel_Clicked() function. But, nothing is successful in closing the default.aspx page when I open it in the RadWindow.

Georgi Tunev
Telerik team
 answered on 03 Sep 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?