Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
114 views
Hi. I'm using 2 RadEditors to export content to pdf.
I need to generate two different documents and return them to the client.How can I do that with the exportToPdf function from RadEditor.
When I do both radEditors in the same funcion it gives me only the pdf that comes from the second RadEditor.
Here is a sample of the code:


protected void Page_Load(object sender, EventArgs e)
        {

            printStuff1();
            printStuff2();

        }        

        public void printStuff1()
        {
            
            RadEditor1.Content = "<h1> Olá Mundo teste1!!!!</h1>";
            RadEditor1.ExportSettings.OpenInNewWindow = true;
            RadEditor1.ExportSettings.FileName = "teste1";
            RadEditor1.ExportToPdf();
                
        }

        public void printStuff2()
        {  
            RadEditor2.Content = "<h1> Olá Mundo teste2!!!!</h1>";
            RadEditor2.ExportSettings.OpenInNewWindow = true;
            RadEditor2.ExportSettings.FileName = "teste2";
            RadEditor2.ExportToPdf();
        }

Thank you so much.
João
Top achievements
Rank 1
 answered on 20 Jan 2011
7 answers
262 views
We are using wss 3.0 and we wonder if we can freely use the rad editor? We don't plan to buy MOSS.
Thanks...
Emilia
Telerik team
 answered on 20 Jan 2011
2 answers
130 views
hi,

i am trying to use rad grid to create a dynamic control that will bind some data.
the scenario will be like that:
1- i am already declaring a rad grid in the aspx page

<telerik:RadGrid ID="GrdDocuments" runat="server" Skin="WebBlue" dir="rtl" PageSize="10"
            OnItemCreated="GrdDocuments_ItemCreated" OnNeedDataSource="GrdDocuments_NeedDataSource"
            OnDetailTableDataBind="GrdDocuments_DetailTableDataBind"
            AllowMultiRowSelection="false" AllowFilteringByColumn="true" AutoGenerateColumns="false">
            <ClientSettings EnableRowHoverStyle="true">
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
            <MasterTableView AutoGenerateColumns="false" DataKeyNames="arcId" Dir="RTL">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="40px"></HeaderStyle>
                </ExpandCollapseColumn>
                <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" />
                <DetailTables>
                    <telerik:GridTableView DataKeyNames="arcId,arcFileName" AllowFilteringByColumn="false" Name="Files" Caption="Document Files" Width="100%" AutoGenerateColumns="false" Dir="RTL">
                        <Columns>
                            <telerik:GridBoundColumn SortExpression="arcOrgName" HeaderText="File Name"
                                DataField="arcOrgName" UniqueName="arcOrgName" >
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="arcPageCount" HeaderText="Page Count"
                                DataField="arcPageCount" UniqueName="arcPageCount">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="arcFileSize" HeaderText="File Size"
                                DataField="arcFileSize" UniqueName="arcFileSize">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="arcCreatorUser" HeaderText="Creator"
                                DataField="arcCreatorUser" UniqueName="arcCreatorUser">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="arcCreationDate" HeaderText="Creation Date"
                                DataField="arcCreationDate" UniqueName="arcCreationDate">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </telerik:GridTableView>
                </DetailTables>
            </MasterTableView>
        </telerik:RadGrid>

so as you can see the parent Grid has no column, but the detailed Grid is statically defined.

now in the code behind i am trying to define the parent Grid columns programmatically using some map files.
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        Dictionary<string, string> MappingDefinition = new Dictionary<string, string>();
        MappingDefinition.Add("AAAA", "ColumnName_1");
        MappingDefinition.Add("BBBB", "ColumnName_2");
        MappingDefinition.Add("CCCC", "ColumnName_3");
        MappingDefinition.Add("DATE", "ColumnName_4");
        InitializeGrid(MappingDefinition);
        GrdDocuments.Rebind();
    }
}
 
protected void GrdDocuments_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    if (!e.IsFromDetailTable)
    {
        DataTable _DataTable = _Object.GetDataTable();
        GrdDocuments.DataSource = _DataTable;
    }
}
 
private void InitializeGrid(Dictionary<string, string> MappingDefinition)
{
    string ErrorMessage= "";
    try
    {
        foreach (KeyValuePair<string, string> pair in MappingDefinition)
        {
            if (pair.Key.ToLower().Contains("date"))
            {
                GridDateTimeColumn dateColumn;
                dateColumn = new GridDateTimeColumn();
                dateColumn.DataField = pair.Value;
                dateColumn.HeaderText = pair.Value;
                dateColumn.AllowFiltering = true;
                dateColumn.AllowSorting = true;
                GrdDocuments.MasterTableView.Columns.Add(dateColumn);
            }
            else
            {
                GridBoundColumn boundColumn;
                boundColumn = new GridBoundColumn();
                boundColumn.DataField = pair.Value;
                boundColumn.HeaderText = pair.Value;
                boundColumn.AllowFiltering = true;
                boundColumn.AllowSorting = true;
                GrdDocuments.MasterTableView.Columns.Add(boundColumn);
            }
        }
    }
    catch (Exception ex)
    {
        ErrorMessage= ex.Message;
    }
}

it is all working fine until i expand any row, the parent grid header text is disapper, but the column remains, i don't know why this happen.
please review the attached images
Mohamed
Top achievements
Rank 1
 answered on 20 Jan 2011
5 answers
117 views
hi all,

I have a rendering problem with the resource headers of the following skins:

Forest, Hay, OutLook, Sunset, Web20, WebBlue, Windows7


When the header had multiple rows to fit the text in, there is a line at the bottom of the header that is not rendered correctly.
It seems the height is not calculated correctly.
I am evaluating the Telerik asp.net ajax controls using the trial version: 2010.3.1215.40

I cannot submit a defect but reproducing the problem is very simple: add some resources to a radscheduler and have them show a header. See screenshots in attachement.

Is there a way i/you can fix this?

regards,
Johan
Kamen Bundev
Telerik team
 answered on 20 Jan 2011
1 answer
64 views
Hello,
In my solution i have master page which contains :
<telerik:RadScriptManager ID="MasterScriptManager" runat="server" EnablePageMethods="true">
</telerik:RadScriptManager><telerik:RadAjaxManager ID="MasterAjaxManager" runat="server" />
<telerik:RadWindowManager ID="MasterWindowManager" runat="server">....
In one of my pages , on button client click i call a js function, showing radconfirm, after the user enter YES i get in other js function and call :
"$find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("FINISH");"
In the code behind of the page , on pageLoad i delegate the event of the ajaxrequest:
"var manager = RadAjaxManager.GetCurrent(this);
manager.AjaxRequest +=
new RadAjaxControl.AjaxRequestDelegate(YourContentPage_AjaxRequest);"
, and in the event i make swith case on the parameter i send:
//Handle the Ajax event in your ContentPage code behind
private void YourContentPage_AjaxRequest(object sender, AjaxRequestEventArgs e){
//Optionally process supplied event arg
switch (e.Argument)
{
case "FINISH": //Do something
btnFinish_Click(null, null);
break;
}
}

The problem is:
first click on the button everything works - see the radconfirm, answer yes, get in the server event. but second click on the button happens: see the radconfirm, get in the function, doing the statement of the "find" above, i see that it isnot null, but hte somewhere it falls with this bug:
"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
".

Needs urgent help,
thanks,
gz
Mira
Telerik team
 answered on 20 Jan 2011
1 answer
57 views
Only with Internet Explorer 7, when I put my property RadEditor « ContentAreaMode =" Div " » as in the code below, the browser refuses to expand on my table from the cursor and / or my image. The only way I found to do is to resize from the corners of the top. From the bottom middle is my symbol prohibited.

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManagerEditor_AjaxRequest">
    </telerik:RadAjaxManager>
    <fieldset>
        <legend style="font-family: Arial; font-size: 12px">
            <asp:Label ID="Label6" runat="server" Text="Contenu"></asp:Label></legend>
        <div style="font-family: Arial; font-size: 12px; padding: 5px;">
            <asp:Label ID="Label7" runat="server" Text="Activer le lightbox"></asp:Label>
            <asp:CheckBox ID="EnableLightboxCheckBox" runat="server" /></div>
        <br />
        <telerik:RadEditor ID="ContentRadEditor" runat="server" Width="100%" ToolsFile="~/CMSControls/Xml/ToolsFile.xml"
            Language="fr-FR" ContentAreaMode="Div">
            <CssFiles>
                <telerik:EditorCssFile Value="~/CMSControls/Skins/editor.css" />
            </CssFiles>
            <Content>
            </Content>
            <ImageManager DeletePaths="~/Document/Images" MaxUploadFileSize="52428800" UploadPaths="~/Document/Images"
                ViewPaths="~/Document/Images" />
            <DocumentManager DeletePaths="~/Document" MaxUploadFileSize="52428800" UploadPaths="~/Document"
                ViewPaths="~/Document" SearchPatterns="*.*" />
            <FlashManager DeletePaths="~/Document/Flash" MaxUploadFileSize="52428800" UploadPaths="~/Document/Flash"
                ViewPaths="~/Document/Flash" />
            <MediaManager DeletePaths="~/Document/Media" MaxUploadFileSize="52428800" UploadPaths="~/Document/Media"
                ViewPaths="~/Document/Media" />
        </telerik:RadEditor>
    </fieldset>
</telerik:RadAjaxPanel>

Is this a bug in control? Is this a feature not accessible through the browser? Y is there a way to fix this?
Rumen
Telerik team
 answered on 20 Jan 2011
5 answers
128 views
Hi. I've got some simple code but it isn't working and at the moment I am not seeing why :)

I have a listbox and a panelbar. The listbox just contains a set of entries with simple text for each. In my code behind I have the following (pnlMenu is my panelbar):

pnlMenu.Items.Clear();
RadPanelItem rootItem = new RadPanelItem();
rootItem.Text = "Heading";
rootItem.Expanded = true;
if (RadListBox2.Items.Count() > 0)
{
foreach (RadListBoxItem i in RadListBox2.Items)
{
RadPanelItem childItem = new RadPanelItem() { Text = i.Text };
// childItem.Value = i.Value;
rootItem.Items.Add(childItem);
}
}
else
{
RadPanelItem childItem = new RadPanelItem();
childItem.Text = "No items";
rootItem.Items.Add(childItem);
}
pnlMenu.Items.Add(rootItem);

When this executes I get the panelbar dynamically created but each childItem has two lines and moving the cursor over items it is the first line which is highlighted and this line is blank. The second line contains the text from the listbox. Does this explanation make sense? Thanks
Cori
Top achievements
Rank 2
 answered on 20 Jan 2011
0 answers
38 views
Hi,
I am using your rad control in our site. Its really have very good look and feel.
But I have some issue with that (rad captcha and file upload.)
1. When user type wrong captcha test and click the button the page will post back
2. After post back the file upload does not show the posted file.
I know very well that it is the limitation of rad upload control/Asp file upload control .
But i required this functionality as client requirement.
Plz develop any  possible solution for me so i can fulfill the user requirement asap.
It would be great if you made any solution so that file upload maintain their state.
Thanks
Deepak
Top achievements
Rank 2
 asked on 20 Jan 2011
3 answers
242 views
Yes, simple question :-)

How do I define the color of the currently selected tab, so as to make it blend seamlessly with the associated radPageView?

Thanks,
J. Jespersen
Denmark

Shinu
Top achievements
Rank 2
 answered on 20 Jan 2011
1 answer
66 views
Hi,

When we use rad editor, the text copied from word is not getting striped. when we submit this we get a sql error "incorrect syntax near 's'".

how do we strip the tags before storing in the db.
Rumen
Telerik team
 answered on 20 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?