Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
176 views
Hello,

I have a RadComboBox on the RadPanelBar. can you guide me how to use "OnItemsRequested" in this scenario ?
I wish to use this even in codebehind and fire some oracle query and fech the required data as datasource for this RadComboBox. I am quite new to use RadPanelBar.

Thanks,
prayag
Yana
Telerik team
 answered on 12 Aug 2010
3 answers
199 views
Hi,
As client side object  methods
get_selectedView(),get_firstDayStart(),

is there methods to set,


set_selectedView(a),set_firstDayStart(a).
I am in need of these, to navigate the scheduler month to my preferred month and date, view changes

Hurry.
Kind regards
I.Arockiasamy

Peter
Telerik team
 answered on 12 Aug 2010
3 answers
101 views
Hello,
I use the 'Editor Lite' as the 'source' field for a newsletter.
The user create the newsletter with a fancy design and picture (stored in a document library in the site).
If we try to change the picture size (by right clicking on the picture and changing the width and the height) everything works fine in the 'Editor Lite' but when I send the newsletter and the users open it in Outlook, all picture take their original size (same size as stored in the document library)

could you help me with this case?

Thanks a lot,
Jorg
Stanimir
Telerik team
 answered on 12 Aug 2010
1 answer
82 views
Hello,
I have got an issue with the combination of RadXmlHttpPanel and RadAjaxPanel. The scenario is described below-

I have a page Product.aspx. There are left menus in a user control LeftMenu.ascx. In the main section of the page there are ten user controls which are used to Add or edit a product. This main user controls' visibility can be on/off by clicking the left menus and it is done in client side javascript. Now to make the performance optimized we decided to load the user control's data on demand. There are only two user controls which has required fields. So those control's data will be loaded on page load. But the other eight control's data will be loaded if the user decides to open that user control by clicking the left menu.
To accomplish this I followed the demo given here http://demos.telerik.com/aspnet-ajax/xmlhttppanel/examples/gridinxmlhttppanel/defaultcs.aspx. The on demand user control's data controls are wrapped by RadXmlHttpPanels. The data is loaded by javascript-

function leftMenuClicked(index) {
        showForm(index);
        hideAllOtherForm(index);
        showPanelData(index);
}

function showPanelData(index) {
    var productId = getProductId();   
        var panel = getXmlHttpPanel(index);
        if (panel) {
            panel.set_value(productId);
        }
}

The getXmlHttpPanel() function just returns the RadXmlHttpPanel object using $find() function according to the index value.

Now, there are few user controls which are used to add/edit detail data. There is a RadGrid in the control to show the existing records. Just below that there is a "Add More" button, by clicking which a form will be opened below the button to enter the data. The grid also has edit and delete buttons. The edit won't be inline, but the data will be opened in the same form used for adding. So, to ajaxify this, I have wrapped everything inside the control i.e. the grid and the form for add/edit in a RadAjaxPanel. Here is one of the User control's code-

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue" />
                <telerik:RadAjaxPanel ID="radAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
                <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server" OnServiceRequest="XmlHttpPanel_ServiceRequest"
                RenderMode="Block" LoadingPanelID="RadAjaxLoadingPanel1">
                    <asp:panel runat="server" CssClass="rc_fields" id="divProductMediaGrid" ClientIDMode="Static" style="min-height: 200px;">
                        <telerik:RadGrid AutoGenerateColumns="False" ID="RadGridProductMedia" runat="server" Skin="WebBlue" OnItemDataBound="RadGridProductMedia_ItemDataBound" OnItemCommand="RadGridProductMedia_ItemCommand" AllowPaging="true" PageSize="4"  EnableClientScriptEvaluation="true" >
                            <PagerStyle Mode="NumericPages" />
                            <MasterTableView TableLayout="Fixed">
                                <Columns>
                                    <telerik:GridTemplateColumn HeaderText="Type">
                                        <ItemTemplate>
                                            <asp:Label ID="lblMediaType" runat="server" Text='<%# GetMediaTypeText(Convert.ToInt32( Eval("MediaType"))) %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Thumbnail" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:Image ID="imgThumbnail" runat="server" AlternateText="Thumbnail" ImageAlign="Middle" Height="50px" Width="70px" />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridBoundColumn HeaderText="Caption" DataField="Caption" HeaderStyle-Width="180px"  />
                                    <telerik:GridBoundColumn HeaderText="Sort Order" DataField="SortOrder" HeaderStyle-Width="115px" />
                                    <telerik:GridCheckBoxColumn HeaderText="Is Primary" DataField="IsPrimary" HeaderStyle-Width="110px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" />
                                    <telerik:GridCheckBoxColumn HeaderText="Is Active" DataField="IsActive" HeaderStyle-Width="120px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" />
                                    <telerik:GridButtonColumn Text="Edit" UniqueName="EditMedia" CommandName="EditMedia" ButtonType="ImageButton" HeaderStyle-Width="60px" ItemStyle-HorizontalAlign="Center" ImageUrl="~/assets/images/Edit.gif"  />
                                    <telerik:GridButtonColumn Text="Delete" UniqueName="DeleteMedia" CommandName="DeleteMedia" ButtonType="ImageButton" HeaderStyle-Width="60px" ItemStyle-HorizontalAlign="Center"  ImageUrl="~/assets/images/Delete.gif"  ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to Delete this Media?" ConfirmTitle="Delete" />
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>            
                    </asp:panel>
                    <div style="float: right;">
                        <asp:LinkButton ID="lnkAddMoreMedia" CausesValidation="false" runat="server" CssClass="first" OnClick="lnkAddMoreMedia_Click" Text="<b><b>Add More Media</b></b>"></asp:LinkButton>
                    </div>
                    <asp:panel runat="server" CssClass="rc_fields" id="divProductMediaForm" ClientIDMode="Static" Visible="false" >                         
                         <fieldset>
                            <label>Type </label>
                            <asp:DropDownList ID="drpMediaType" AutoPostBack="true" OnSelectedIndexChanged="drpMediaType_SelectedIndexChanged"  runat="server" ClientIDMode="Static" />
                        </fieldset>
                        <fieldset>
                            <label>Thumbnail </label>
                            <div style="float:right;width: 82%;">
                                <telerik:RadAsyncUpload ID="uploadThumbnail"   runat="server" AllowedFileExtensions="jpg,jpeg,png,gif" Skin="WebBlue" TemporaryFolder="~/Upload/temp"  />                           
                            </div>
                        </fieldset>
                        <fieldset>
                            <label>Caption </label>
                            <asp:TextBox ID="txtCaption"  runat="server" MaxLength="150"  />                           
                        </fieldset>
                        <fieldset>
                            <label>Sort Order </label>
                            <telerik:RadNumericTextBox ID="txtSortOrder" Skin="WebBlue"  runat="server" MaxLength="2" NumberFormat-DecimalDigits="0" NumberFormat-AllowRounding="true"  />                           
                        </fieldset>
                        <fieldset>
                            <label>Is Primary </label>
                            <input type="checkbox" ID="chkIsPrimary" class="checkbox"  runat="server"   />                           
                        </fieldset>  
                        <fieldset>
                            <label>Is Active </label>
                            <input type="checkbox" ID="chkIsActive" class="checkbox"  runat="server"   />                           
                        </fieldset>
                        <div class="buttons">
                            <asp:LinkButton ID="lnkAdd" CausesValidation="false" runat="server" CssClass="first" OnClick="lnkAdd_Click" Text="<b><b>Save Media</b></b>"></asp:LinkButton>                             
                        </div>
                        <asp:HiddenField ID="hidProductMediaId" runat="server" ClientIDMode="Static" />
                    </asp:panel>                   
                    </telerik:RadXmlHttpPanel>   
                    </telerik:RadAjaxPanel>


Now the problem is that, the Edit/Delete buttons in the Grid are not working. Just nothing is happening if I click on the Edit/Delete buttons, although the ItemCommand event is attached with the grid. The probable reason is that, the grid has to be rebound in every postback to make the paging works properly. The Page_load event handler is like this-

public void Page_Load(object sender, System.EventArgs e)
        {
            if (IsPostBack)
            {
                DisplayGridData();
            }
        }


Can anyone please assist me in solving this issue?
Thanks in advance.
Fiko
Telerik team
 answered on 12 Aug 2010
1 answer
314 views
Hello Telerik Team,

I m getting the HTTP Exception: Request is not available in this context.

at System.Web.UI.Page.get_Request()
   at Telerik.Web.UI.RadGrid.BrowserIsCrawler()
   at Telerik.Web.UI.RadGrid.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.AddedControl(Control control, Int32 index)
   at System.Web.UI.ControlCollection.Add(Control child)
   at Class.Data.GetDataControl(Page& Page, Control& ctrlRef, HttpServerUtility& Server) in 
  
C:\inetpub\wwwroot\Class\Data.vb:line 56
   at Controls.ResultsControl.DefineGridStructure(XmlDocument& xmlDoc, Page& Page, PlaceHolder& 
  
phlaceholder1, HttpServerUtility& server) in C:\inetpub\wwwroot\Controls
  
\ResultsControl.ascx.vb:line 65
   at Controls.ListingResultsControl.page_Init(Object sender, EventArgs e) in C:\inetpub\wwwroot\Controls\ResultsControl.ascx.vb:line 14
   at System.Web.UI.Control.OnInit(EventArgs e)
   at System.Web.UI.UserControl.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.AddedControl(Control control, Int32 index)
   at System.Web.UI.ControlCollection.AddAt(Int32 index, Control child)
   at Class.Handler.Submit(RadMultiPage& tabMultiPage, XmlDocument docRequest) in C:\inetpub\wwwroot\Class\Handler.vb:line 113
   at Controls.TreeControl.GetTypes() in C:\inetpub\wwwroot\Controls
  
\TreeControl.ascx.vb:line 293
   at Controls.TreeControl.RadTreeView1_NodeClick(Object sender, RadTreeNodeEventArgs e) in C:
  
\inetpub\wwwroot\Controls\TreeControl.ascx.vb:line 152
   at Telerik.Web.UI.RadTreeView.RaiseEvent(Object eventKey, RadTreeNodeEventArgs e)
   at Telerik.Web.UI.RadTreeView.OnNodeClick(RadTreeNodeEventArgs e)
   at Telerik.Web.UI.RadTreeView.RaisePostBackEvent(String eventArgument)
   at Telerik.Web.UI.RadTreeView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String 
  
eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean 
  
includeStagesAfterAsyncPoint)
Since, I can't send the whole code, I can explain on a high level where I am getting this issue:

I m trying to interact between two userControls inside a Radpageview. When sending the request from one control(RadtreeView) to Grid and rebinding it..I m getting this at the point where I bind this grid to a placeholder.
I see that the data is getting binded to the control properly but before rendering on to the page, I m coming across this error.
I m not using HttpContext.Current.Request anywhere in my code. It is rendered on to my IE with IIS7.0

Any help on this will greatly be appreciated.
Pavlina
Telerik team
 answered on 12 Aug 2010
3 answers
349 views
Hi,

Is it possible to make all content uneditable by default by, for example, specifying a div tag after the body tag, and then selectively enable editing of just the odd part of the HTML document? It would seem to make the most sense because most of the time you would want the user to edit just a small part of the web page and to have to specifiy what can and cannot be edited would be extremely tedious. I have experimented with numerous options at the beginning of the document but none seem to achieve the above.

I am wanting to give a client a basic CMS facility within the editor but to keep it relatively simple to implement.

Many thanks for any help you can offer.

Regards

Tim
Rumen
Telerik team
 answered on 12 Aug 2010
1 answer
51 views
We are implementing a scenario very similar to the Telerik demo here:
http://demos.telerik.com/aspnet-ajax/xmlhttppanel/examples/gridinxmlhttppanel/defaultcs.aspx

It works fine until we add command buttons such as Edit and Delete to the grid. When paging or performing any action that needs to reload the grid, the Edit will not be inline, but rather show a form below the grid for editing.

The problem we are encountering is that the Edit and Delete buttons in the grid won't do anything. Eventhough the ItemCommand event is specified in the grid declaration.

Can anyone show an example or let us know what must be done to get this to work as expected (the Edit and Delete buttons firing the event handler, etc.)?

Thanks in advance!

Anthony
Veli
Telerik team
 answered on 12 Aug 2010
2 answers
142 views

Hi,
 When trying to add a word to the custom dictionary, we are experiencing the following error :-

Spell Check Handler Server Error:403
403 FORBIDDEN

 I've had this error before in the Lite version of the RAD editor and the simple solution was to change the permissions on the TDF folder to allow access to 'Everyone'. I've done that in this case and the error still occurs. Can you advise?

 The folder path is :-

C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.7.1.0__1f131a624888eeed\Resources\App_Data\RadSpell\TDF

Thanks,
Jason.
Jason Brownhill
Top achievements
Rank 1
 answered on 12 Aug 2010
1 answer
130 views
Hello, 
We are using checkboxes to indicate selection...

Is there a property/method to disable node selection?  We'd like to disable the "selectability" of nodes.
...or is this done via CSS?

Also, is there a way to check the corresponding checkbox when the node is clicked?

Thanks,
Mark
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2010
1 answer
95 views
I have the following rotator that is linked to an xml file

<table><tr>
                                             <td><img  style="position:static;"  id="rrButtonLeftg1" alt="" onmouseover="imgleftover('rrButtonLeftg1')" onmouseout="imgleftout('rrButtonLeftg1')"  src="rotator/rotator_left_01.png"  /></td>
                                            <td>
                                                            <telerik:RadRotator ID="RadRotator1g" runat="server" Height="190px" Width="800px"
                                                                BackColor="#526b75" RotatorType="ButtonsOver" ItemHeight="100px" ItemWidth="160px"
                                                                DataSourceID="XmlDataSourceg1" Skin=""  ScrollDuration="350"
                                                                FrameDuration="800">
                                                                <ItemTemplate>
                                                                    <div class="itemTemplate">
                                                                        <table style='margin: 1px 1px 1px 1px; background-color: transparent; padding: 0;
                                                                            border: none; cursor: pointer; width: 100%; -moz-border-radius: 1px; -webkit-border-radius: 1px;'>
                                                                            <tr>
                                                                                <td style="width: 10%">
                                                                                            
                                                                                </td>
                                                                                <td style="width: 80%">
                                                                                    <a href='<%# XPath("link") %>' style="width: 100%" >
                                                                                        <img align="center" border="0" height="130" hspace="0" src='<%# XPath("src") %>'
                                                                                            width="90" />
                                                                                    </a>
                                                                                </td>
                                                                                <td style="width: 10%">
                                                                                          
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td style="width: 100%" colspan='3' align="center">
                                                                                    <a href='<%# XPath("link") %>' style='font-weight: bold; font-size: 8pt; color: #484849;'>
                                                                                        <%# XPath("title") %>
                                                                                    </a></font>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </div>
                                                                </ItemTemplate>
                                                            <ControlButtons LeftButtonID="rrButtonLeftg1" RightButtonID="rrButtonRightg1" />
                                                </telerik:RadRotator></td>
                                            <td><img  style="position:static;"  id="rrButtonRightg1" onmouseover="imgrightover('rrButtonRightg1')" onmouseout="imgrightout('rrButtonRightg1')" alt=""   src="rotator/rotator_righ_01.png"  /></td>
                                            </tr></table>

The rotator shows an image and title below it
The XML file contains 12 entities. I want to do display 4 each time we click on the button next or previous.So on load i want to show only 4 images and corresponding titles without downloading all remaining others.And on next click i need to load into the rotator the next 4 entities but without doing any post back without reloading the whole page. How can i do that?
Svetlina Anati
Telerik team
 answered on 12 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?