Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
145 views

Live, as the user types, I would like the same characters that are entered in one editor to appear in another.  How can I do this?  If there is some way to do this with client-side events, that would be awesome.

What I'm doing is using a RadEditor for a text area where the user types message content for the body of an email.  We have HTML templates for these emails that the user selects.  These get loaded into another RadEditor that shows a Preview of the user's email.   When the user clicks an Update button, the text from the message content editor gets inserted into part of the template inside the preview editor.   This is done so that we can control exactly what parts of the template a user modifies.   

It would be awesome if I could do away with that "Update" button and instead update the Preview as the user types!   

Thanks for your time.
Lee
Top achievements
Rank 1
 answered on 14 Mar 2013
2 answers
504 views
Hi All,

I have a textbox and a radgrid on aspx page.
i write the path of css file in that textbox and on textbox's text change event i want to apply the given css to RadGrid to change the display style of the RadGrid (as we can do with Asp.net GridView control). I dont want to use the skins.
How can i apply the css classes to change the style of rows,headers and footers dynamically without creating skins. 

Sh
Top achievements
Rank 1
 answered on 14 Mar 2013
2 answers
115 views
I have RadGrids in my application that need the columns resized by their content; however, I do not want to include header into consideration for resize.

For example, in the grid below, the content of Contact Person Name is almost always empty. Using the code below, the Contact Person Name becomes as wide as it needs to be to fit the header in one single row. But I do not care about the header content, it can be split into multiple lines if need be. If all the 25 rows in a page is empty for this record, I'd rather the header be split into three lines (one per word) and have a small column.

<telerik:RadGrid ID="rgCompany" runat="server" AutoGenerateColumns="false" EnableViewState="true"
    PageSize="25" AllowSorting="true" AllowMultiRowSelection="true" AllowCustomPaging="true"
    OnNeedDataSource="rgCompany_NeedDataSource" OnSortCommand="rgCompany_SortCommand"
    OnItemDataBound="rgCompany_ItemDataBound">
     
    <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="Bottom" AlwaysVisible="True" />
 
    <ClientSettings EnableRowHoverStyle="true">
        <Selecting AllowRowSelect="true"></Selecting>
        <Resizing AllowColumnResize="True" ResizeGridOnColumnResize="True" AllowResizeToFit="True"></Resizing>
        <ClientEvents OnRowSelected="RowSelected" OnRowDeselected="RowDeselected" />
    </ClientSettings>
     
    <MasterTableView>
        <telerik:GridBoundColumn UniqueName="Name" HeaderText="Company Name" DataField="CompanyName" />
        <telerik:GridBoundColumn UniqueName="City" HeaderText="City" DataField="City" />
        <telerik:GridBoundColumn UniqueName="State" HeaderText="State" DataField="State" />
        <telerik:GridBoundColumn UniqueName="Zip" HeaderText="Zip" DataField="Zip" />
        <telerik:GridBoundColumn UniqueName="Phone" HeaderText="Phone Number" DataField="PhoneNumber" />
        <telerik:GridBoundColumn UniqueName="Contact" HeaderText="Contact Person Name" DataField="ContactName" />
    </MasterTableView>
 
</telerik:RadGrid>


I'm calling this function from the javascript pageLoad of all pages that contain grid.

function resizeGridToFitColumnContent (grid) {
    var masterTable = grid.get_masterTableView();
    var columns = masterTable.get_columns();
     
    for (var i = 0; i < columns.length; i++) {
        columns[i].resizeToFit();
    }
}


Can this be achieved?

Also, sometimes if the grid is long (a lot of columns) it takes more than a few seconds for the page is load up. The screen goes white until the calculation is done and grid is displayed. How can I easily provide a message during this time?
Galin
Telerik team
 answered on 14 Mar 2013
4 answers
295 views
I'm using a radfileexplorer to display a list of folders that have pdf files within them.  My folders are named for the year that pdf file is about so I have folders from 2005-2012. Within vs2008 it orders my folders from 2005 down to 2012 and that is how it displays in my radfileexplorer.   I need to have 2012 be the top folder going down to 2005 and i'm not sure how I can achieve this.

Instead of listing like this:
2005
2006
2007
.
2012

I need it to list like this:
2012
2011
2010
.
2005

Thank you for any help
Tc Blaize
Top achievements
Rank 1
 answered on 14 Mar 2013
1 answer
152 views
Hi,

 I am trying to export aspx page to PDF by using itextsharp.dll.

But unable to do that with Telerik Rad controls in page,  itextsharp.dll is not able to recognize the Telerik controls.

I appreciate help on this issue for exporting aspx page with PDF.


Thanks,
Gops
Rumen
Telerik team
 answered on 14 Mar 2013
3 answers
82 views
I have a page with two RadGrids on it.  When a row in the left grid is selected, the right grid is refreshed to show data pertinent to the row that was selected in the left grid.   This all works great, until somebody clicks Edit on a different row than the was currently selected.  The right grid refreshes but still shows data for the row that was previously selected, not for the row that is now being edited.  I solved the problem this way:

        protected void rgRegion_EditCommand(object sender, GridCommandEventArgs e)
        {
            var item = e.Item as GridDataItem;
            item.Selected = true;

            if (rgRegion.SelectedItems.Count > 0)
            {
                rgRegionAcct.Rebind();
            }
        }

This works great UNLESS, while the row in the left grid is still in Edit Mode, the user clicks the Add link in the right grid.  At this point, as the right grid tries to lookup the selected row in the left grid, the left grid no longer has a row selected.  

        protected void rgRegionAcct_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            try
            {
                int? selectedRegionId = GetSelectedRegionId();
                rgRegionAcct.DataSource = GetRegionAccountsTable(selectedRegionId);
            }
            catch (Exception ex)
            {
                Utilities.LogError("Retrieving Account/Region Configuration", ex.Message, ex.StackTrace, "");
                ShowPopup(String.Format("There was an error loading the account/region configuration.  The error was {0}", ex.Message));
            }
        }

        private int? GetSelectedRegionId()
        {
            int? returnValue = null;

            if (rgRegion.SelectedItems.Count > 0)
            {
                var gridDataItem = rgRegion.SelectedItems[0] as GridDataItem;
                if (gridDataItem != null)
                {
                    returnValue = Convert.ToInt32(gridDataItem.GetDataKeyValue("RegionId"));
                }
            }

            return returnValue;
        }

It appears that the left grid is refreshing for some unknown reason.  There is no rebind() being called on the left grid when the Add link is clicked on the right grid.  So why is my left grid refreshing which I assume is the reason row, that is in update mode, is no longer selected?
Kostadin
Telerik team
 answered on 14 Mar 2013
1 answer
80 views
Hi,

I've noticed a simple issue with RadButton. This is reproducable even on the overview page of its demo. Click in the button and hold, then drag the mouse out of the button and release. The "pressed" style of the button gets stuck on. Not a showstopper but it gets visually confusing if a user happens to click a few buttons inaccurately. I was using IE9 when this happened. Is there a known fix or workaround for this?

Thanks,
Ross

Danail Vasilev
Telerik team
 answered on 14 Mar 2013
1 answer
69 views
Hi,
I have given the row data inside the item-template as given below
<%
Databinder.Eval(Container."empId")

How can I get its value in code behind
Shinu
Top achievements
Rank 2
 answered on 14 Mar 2013
0 answers
89 views
Hi,

    I want to copy a Radchart image in button click event using client side code (Asp.net). That code will run all the browser. Can you help me? If you can means please reply asap.
 Note:
        I don't want save  a radchart image only copy & paste it.

Regards
Palaniappan. R
Palaniappan
Top achievements
Rank 1
 asked on 14 Mar 2013
10 answers
229 views

Hi Telerik,

We implemented a customized SharePoint 2007 site for our client and decided to use RadEditor for their content managed fields, the editor version is 5.3.2.0. Recently they reported issues with hyperlinks. I managed to replicate the issue they described and decided to try the trial latest version -5.8.10.0- to see whether it has been addressed or not. Unfortunately the problem still exists.


Here are the steps and I attached a screenshot for each step using a simple example.
1. Type some text on the first line and press enter
2. Type some more text on the new line

3.      3. Select the first line, open the hyperlink manager and bind the text with a URL – You’ll notice cursor jumps to the start of the second line

4.      4. Switch to HTML view, you’ll see anchor markup expands to the second line too

5. Switch back to Design view and you’ll see the second line repeated.

I could not replicate the issue on my dev environment using the old version or the trial version but it occurs on my desktop, so I’m a little puzzled.  I also tried the scenario on your demo page “http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx” and it does not occur there.  It also looks fine on Firefox 3.6.18.

We use MOSSLinkManager and our configuration file is as follows;

<configuration>

<property name="AllowThumbGeneration">True</property>

<property name="ConvertToXhtml">True</property>

<property name="EnableDocking">False</property>

<property name="ShowHtmlMode">True</property>

<property name="ShowPreviewMode">False</property>

<property name="ToolbarMode">ShowOnFocus</property>

<property name="ToolsWidth">680px</property>

<property name="NewLineBr">false</property>

<property name="SpellDictionaryLanguage">en-GB</property>

<property name="ImagesPaths">

<item>/SiteCollectionImages</item>

</property>

</configuration>

 
The dev box (issue doesn’t exist): Windows 2008 R2, using IE8 8.0.7600.16385

The desktop (issue exists): Windows 7, using IE8 8.0.7600.16385

Thanks for your help,
Regards,
Naz

Rumen
Telerik team
 answered on 14 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?