Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
164 views
After upgrading to the "prometheus" version of the RadEditor there's still some older properties that we haven't found information about what they've been changed to. Perhaps someone from telerik could explain what the following properties are now, (or if they've been completely removed);

1) ConvertToXhtml.
2) EnableClientSerialize.
3) DocumentsFilters.
4) EnableContextMenus.
5) EnableDocking.
6) EnableEnhancedEdit.
7) EnableHtmlIndentation.
8) EnableServerSideRendering.
9) EnableTab.
10) PassSessionData.
11) RenderAsTextArea.
12) SpellEditDistance.
13) TemplateFilters.
14) ImagesFilters.
15) MediaFilters.

Thanks for any information you can supply.
Paul
Rumen
Telerik team
 answered on 18 Feb 2009
7 answers
400 views
Hi,
I'm trying to change language to Polish in RadGrid but any solution doesn't work.
I was trying like this (Page.aspx)
                                <telerik:RadUpload Runat="server" ID="ruFileCV"
                                    ControlObjectsVisibility="None" Language="pl-PL"
                                    FocusOnLoad="True" Skin="Default2006"
                                    AllowedFileExtensions=".doc,.docx,.pdf"
                                    onvalidatingfile="ruFileCV_ValidatingFile">
                                </telerik:RadUpload>
and like this (in code C#)
            CultureInfo newCulture = CultureInfo.CurrentCulture;
            ruFileCV.Language = newCulture.ToString();

but any way doesn't work.
I found exapmle in telerik page: http://demos.telerik.com/aspnet-ajax/upload/examples/localization/defaultcs.aspx but my RadUpload Controls doesn't have property "Culture"

Cau You help mi ??


Veselin Vasilev
Telerik team
 answered on 18 Feb 2009
1 answer
128 views
Hi, I have been experiencing problems with the RadDock and the design view editor. When you create a new raddock and drag a component into it, it adds it without creating the ContentTemplate tags. Then if you edit this (either add more, or change the properties) it removes the end ContentTemplate tag. I have been working around this for a while as it has been like it in a least the last 3 releases, and I assume that you are aware of this problem, but figured I would let you know anyway. Please note I have experienced this error in both 2005 and 2008 version of Visual Studio.

I.e. a new Rad Dock created and a control dragged into it using design editor

 

 

<telerik:RadDock ID="RadDock1" runat="server" Width="300px">  

 

<uc2:EntitySearcher ID="EntitySearcherClients" runat="server" EntityTypeID="1" Mode="SelectProperty" /> 

 

<asp:Button ID="ButtonCloseDock" runat="server" Text="Close Searcher" OnClick="ButtonCloseDock_Click" /> 

 

 

 

</telerik:RadDock>

After fixing this but changing the properties through design editor

 

<telerik:RadDock ID="RadDock1" runat="server" Width="500px" Height="500px" Top="300px" Left="200px" DefaultCommands="None" DockHandle="Grip" DockMode="Floating" Visible="false">  

 

 

<ContentTemplate 

 

<uc2:EntitySearcher ID="EntitySearcherClients" runat="server" EntityTypeID="1" Mode="SelectProperty" /> 

 

 

<asp:Button ID="ButtonCloseDock" runat="server" Text="Close Searcher" OnClick="ButtonCloseDock_Click" />  

 

 

 

</telerik:RadDock>

Regards
Nigel

 

 

 

Petio Petkov
Telerik team
 answered on 18 Feb 2009
1 answer
163 views
Hi,
 
I have hooked up a radgrid edit button column to a radwindow so a user can edit a record in the radwindow. The parent page then refreshes when the radwindow is closed. This all works fine, I'm using this code..

function OnClientClose(sender,args)
{
window.location.reload();
}

This works, but obviously causes a big fat refresh of the whole page. Is there a way I can just refresh my radgrid with ajax without having to do the full refresh?

Thanks,
Matt
Georgi Tunev
Telerik team
 answered on 18 Feb 2009
2 answers
140 views
I have a RadGrid that is using in place editing. One of my columns contains a RadCalendar control. I am setting the selectedDate of the RadCalendar to the value of a property 'ValidDate'.  I'm also setting the value of a Lable to the property 'ValidDate' as a sort of test. Initially when the Grid is displayed the label does have the correct value. However, when the 'edit' is clicked, causing the selected row to go into edit mode, the 'ValidDate' values I assigned to the label within the GridRow is lost.

Can you tell me why the value is lost and possibly how to correctly keep the value so I can set the selectedDate of the RadCalendar?

Thanks,

Here is the aspx code:

<rad:RadGrid ID="holidayRadGrid" AllowPaging="True" 
                    AllowSorting="True" GridLines="Horizontal" HorizontalAlign="Center" ShowFooter="true" 
                    ShowStatusBar="true" EnableAJAX="true" EnableAJAXLoadingTemplate="True" LoadingTemplateTransparency="25" 
                    AutoGenerateColumns="False" Skin="Grid" SkinsPath="~/App_Themes/VertexDefault" OnNeedDataSource="holidayRadGrid_NeedDataSource" 
                    OnUpdateCommand="holidayRadGrid_UpdateCommand" PageSize="18" runat="server"
                    <MasterTableView DataKeyNames="HolidayID,HolidayYear,HolidayDate,HolidayName" EditMode="InPlace" TableLayout="Auto" AllowNaturalSort="false" 
                        BorderColor="Black"
                        <Columns> 
                            <rad:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderStyle-Width="10px" /> 
                            <rad:GridBoundColumn HeaderStyle-Width="60px" DataField="HolidayName" HeaderText="Holiday" 
                                SortExpression="HolidayName" UniqueName="HolidayName" ReadOnly="true" /> 
                            <rad:GridTemplateColumn HeaderStyle-Width="100px" DataField="HolidayDate"  
                                SortExpression="HolidayDate" UniqueName="HolidayDate" > 
                                <ItemTemplate> 
                                    <asp:Label ID="holidayDateLabel" Text='<%# (DateTime) Eval("HolidayDate") == DateTime.MinValue ? ValidDate.ToString() : String.Format("{0:MM/dd/yyyy}", Eval("HolidayDate")) %>' runat="server" /> 
                                </ItemTemplate> 
                                <EditItemTemplate> 
                                   <asp:Calendar ID="holidayDateCalendar" SelectedDate='<%# (DateTime) Eval("HolidayDate") == DateTime.MinValue ? ValidDate : Eval("HolidayDate") %>'  VisibleDate='<%# (DateTime) Eval("HolidayDate") == DateTime.MinValue ? ValidDate : Eval("HolidayDate") %>' runat="server" /> 
                                </EditItemTemplate> 
                            </rad:GridTemplateColumn> 
                            <rad:GridBoundColumn DataField="HolidayID" UniqueName="HolidayID" ReadOnly="true" Display="false" /> 
                            <rad:GridBoundColumn DataField="HolidayYear" UniqueName="HolidayYear" ReadOnly="true" Display="false" /> 
                        </Columns> 
                    </MasterTableView> 
                    <ClientSettings> 
                                <ClientEvents OnGridCreated="holidayRadGridCreated" OnRowContextMenu="holidayRadGridRowContextMenu" /> 
                    </ClientSettings> 
                </rad:RadGrid> 
 
Here is the C# code:

private void BuildTable(int currentHolidayYear) 
        { 
            log.Debug("BuildTable"); 
 
            try 
            { 
                if (returns == null) 
                { 
                    // Create returns manager 
                    returns = ReturnsFactory.CreateReturns(); 
                } 
                 
                // Set 'Year' 
                validDate = new DateTime(Convert.ToInt32(holidayYear.SelectedValue), DateTime.Now.Month, DateTime.Now.Day); 
                 
                // Fetch Holidays 
                Holidays holidays = (Holidays)Session[Constants.Session.PageData]; 
                 
                // Get Holidays if they are not already in the session 
                if (holidays == null) 
                { 
                    holidays = returns.GetHolidays(currentHolidayYear); 
                    Session[Constants.Session.PageData] = holidays; 
                } 
 
                holidayRadGrid.DataSource = holidays.Values; 
                holidayRadGrid.DataBind(); 
 
                // Set correct year to be used for the column HolidayDate's Header Text 
                holidayRadGrid.MasterTableView.GetColumn("HolidayDate").HeaderText = holidayYear.SelectedValue; 
                holidayRadGrid.Rebind(); 
            } 
            catch (Exception ex) 
            { 
                log.Error("Error occurred in page '{0}'. Message: '{1}'", Request.Url.Segments[Request.Url.Segments.Length - 1], ex.Message); 
                Response.Redirect(Constants.Pages.ErrorPage); 
            } 
        } 
 
protected DateTime ValidDate 
        { 
            get { return validDate; } 
        } 
        #endregion 
 
#region Fields 
private DateTime validDate; 
#endregion 
 

Julian
Top achievements
Rank 1
 answered on 18 Feb 2009
2 answers
283 views
I am trying to populate my RadComboBox from a web service. I have a simple example working in a separate project, but when I paste the same code into my project (same control, same web service), the web service is not called and the combo box is not populated.

What could I be doing that would prevent the web service from being called?

Rick.

In the form:  
 
<rad:RadComboBox ID="RadComboBox1"   
  EnableLoadOnDemand="true" 
  Skin="Vista" 
  runat="server">  
  <WebServiceSettings Path="../Controls/WebService.cs" Method="GetData" /> 
</rad:RadComboBox> 
 
WebService:  
 
<%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" Class="WebService" %> 
 
WebService CodeBehind:  
 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.Services;  
using Telerik.Web.UI;  
 
/// <summary> 
/// Summary description for WebService  
/// </summary> 
[WebService(Namespace = "http://tempuri.org/")]  
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]  
[System.Web.Script.Services.ScriptService]  
public class WebService : System.Web.Services.WebService  
{  
 
    public WebService()  
    {  
    }  
 
    [WebMethod]  
    public RadComboBoxData GetData(RadComboBoxContext context)  
    {  
        RadComboBoxData result = new RadComboBoxData();  
 
        List<RadComboBoxItemData> items = new List<RadComboBoxItemData>();  
 
        for (int i = 0; i < 10; i++)  
        {  
            RadComboBoxItemData item = new RadComboBoxItemData();  
            item.Text = "Item " + i.ToString();  
            items.Add(item);  
        }  
 
        result.Items = items.ToArray();  
        return result;  
    }  
 
}  
 
 
 
Rick
Top achievements
Rank 2
 answered on 18 Feb 2009
2 answers
294 views
Hi,

I was binding my RADGrid on the server and I had set ItemStyle-Wrap to false; this worked perfectly. I am now binding my data on the client instead - I'm not mixing the two - and I can't seem to get ItemStyle-Wrap to work as it did. I'm guessing that the <ItemStyle> tag only works on server-side so my question is, how can I achieve the same thing on the client? NB. I've tried using <nobr> in the DataFormatString attribute but

1] it didn't work
2] I want the column width to be fixed

Scrollbars
My RadGrid is contained within a splitter pane. The vertical scroll bar does not initially show after data has been bound, it only becomes visible after I hover my mouse over the splitter bar of the splitter control the grid is contained in. i.e. in order to get the scroll bar to show I have to hover my mouse over the splitter bar.

My data is fetched from a webservice

function getSearch(id)  
    {  
        if(id.indexOf('str') > -1)  
        {  
            PAB3.GetSearch(id.replace('str',''),7,1,SucceededGetSearch_Callback,null,id);  
        }  
    }  
 
function SucceededGetSearch_Callback(result,id)  
    {  
        alert(result);  
        var grContent = $find('<%= grContent.ClientID %>');  
        if(!grContent) return;  
                  
        var masterTable = grContent.get_masterTableView();  
        if(!masterTable) return;  
          
        masterTable.set_dataSource(result);  
        masterTable.dataBind();  
          
        // we have one radgrid and mulitple tabs
        // each time a tab is selected the data for that tab
        // is loaded into the grid and the scrollbar position that was
        // saved the last time the user was on the selected tab is retrieved

        var scrollPos = GetSetting(id + 'Scroll');  
            if(scrollPos == null) scrollPos = 1;  
              
        
        document.getElementById('<%= grContent.ClientID%>_GridData').scrollTop = scrollPos;  
          
    }  
 
function grContent_RowDataBound(sender, args)  
    {  
        args.get_item().get_cell("Title").innerHTML = args.get_dataItem()["Heading"];  
        args.get_item().get_cell("ContentType").innerHTML = args.get_dataItem()["TypeCode"].Name;  
          
        var isRead = args.get_dataItem()["Reading"];  
        var imgFlag = args.get_item().get_cell("Flag");  
          
        var id = args.get_dataItem()["ID"];  
        var img = document.createElement('img');  
          
        img.onmouseover = flagButton_Over;  
        img.onmouseout= flagButton_Out;  
        img.onclick= flagButton_Click;  
        img.id = id;  
          
        if(isRead)  
        {  
           img.src = "../Images/noFlag.png";  
        }  
        else 
        {  
            img.src = "../Images/flag2.png";  
        }  
          
        imgFlag.appendChild(img);  
         
    }  
 
 
<telerik:RadGrid ID="grContent" runat="server" 
                 Skin="Pab3" EnableEmbeddedSkins="false" GridLines="None" Width="100%" Height="100%" > 
                    <MasterTableView AutoGenerateColumns="false" ShowHeadersWhenNoRecords="true" EnableNoRecordsTemplate="true" TableLayout="Fixed" ClientDataKeyNames="ID" DataKeyNames="ID" Width="100%">  
                      
                        <Columns> 
                              
                            <telerik:GridBoundColumn UniqueName="Flag" HeaderStyle-Wrap="false" HeaderStyle-Width="5%"></telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn UniqueName="Title" HeaderText="Title" HeaderStyle-Wrap="false" HeaderStyle-Width="35%"></telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn UniqueName="ContentType" HeaderText="Content Type" HeaderStyle-Wrap="false" HeaderStyle-Width="35%"></telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn UniqueName="Date" HeaderText="Date" HeaderStyle-Wrap="false" HeaderStyle-Width="15%"></telerik:GridBoundColumn> 
                        </Columns> 
                    </MasterTableView> 
                    <ClientSettings AllowColumnsReorder="False" AllowRowsDragDrop="true">  
                        <Resizing AllowColumnResize="true" EnableRealTimeResize="false"   
                        ResizeGridOnColumnResize="true" ClipCellContentOnResize="true" /> 
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="1" /> 
                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" /> 
                        <ClientEvents OnRowDragStarted="grContent_RowDragStarted" 
                                      OnRowDropping="grContent_RowDropping" 
                                      OnRowClick="grContent_RowClick" 
                                      OnCommand="grContent_Command" 
                                      OnRowDataBound="grContent_RowDataBound" /> 
                    </ClientSettings> 
                      
                </telerik:RadGrid> 

Thanks in advance!

Antony
Antony
Top achievements
Rank 1
 answered on 18 Feb 2009
6 answers
236 views

hi

i have modified the code to resize the image and now how do i pass the newly resize image as byte? Thanks

 

 

Private Sub InitializeUpdateParameter(ByVal currentUpload As RadUpload)

 

 

Dim stdWidth As Integer

 

 

 

 

 

Dim stdHeight As Integer

 

 

 

 

 

If currentUpload.UploadedFiles.Count > 0 Then

 

 

 

 

 

Dim img As Bitmap = New Bitmap(currentUpload.UploadedFiles(0).InputStream)

 

 

If img.Width > img.Height Then

 

 

 

stdWidth = 500

 

stdHeight = img.Height / (img.Width / stdWidth)

 

Else

 

 

 

stdHeight = 500

 

stdWidth = img.Width / (img.Height / stdHeight)

 

End If

 

 

 


'I am stuck here
'How to pass the newly resize image here as byte

 

 

Dim data As Byte() = New Byte(currentUpload.UploadedFiles(0).ContentLength) {}

 

currentUpload.UploadedFiles(0).InputStream.Read(data, 0, data.Length)

Session(

"DataVB") = data

 

 

End If

 

 

 

 

 

End Sub

 

 

 

Genady Sergeev
Telerik team
 answered on 18 Feb 2009
5 answers
255 views
Hi,

This is for RadControls for ASP.NET Q2 2008.

Here is the situation:
A user logs in to the system and uploads a file for some processing. The session timeout is of 20 min and we cannot guarantee that the user will have a fast internet connection. If the file is big (like 40 MB), it will take more time to upload than the session timeout. This will result in the user being kicked out when the upload completes and the button event handler tries to execute.

So, to remedy this, I have added a RadAjaxPanel and a RadAjaxTimer inside of it in order to send dummy postbacks (pings) to keep the session alive. I have added javascript code to start the timer when the user clicks on the upload button. The tick event handler is called once, then the upload begins and the progress bar starts. During the upload, my timer doesn't tick anymore (or maybe it ticks but no event handler is executed). So basically I am not able to make a call to the web site while the upload is in progress.

I need to know if there is a way to make regular asynchronous postbacks to my page in order to keep the session alive and avoid timeouts for long uploads.

Thank you.



Genady Sergeev
Telerik team
 answered on 18 Feb 2009
2 answers
227 views
I've seen a few threads here discussing the problem with a TabStrip not working until after a postback.  I've got the same issue.  Here's the setup:

Master Page contains a RadAjaxManager.
Content Page contains a RadAjaxManagerProxy.
Content Page contains a multipage.  One of the pages contains a User Control.
The User Control contains a TabStrip.

The user control on the content page is loaded in markup (not dynamically).  When I do some dynamic content on one of the other PageViews in the content page, and programmatically return to the pageview containing the the TabStrip control, the tabstrip won't respond to user clicks until a postback event has occurred.

I've tried all sorts of combinations of the RadAjaxManagerProxy, but can't land on the right one.  What is the base issue with the tabstrip ignoring the initial click until after a postback occurs?  It is driving me crazy!

thanks for any advice
Jim
Top achievements
Rank 1
 answered on 18 Feb 2009
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?