Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
193 views
Hi
I am experiencing the following issue
In the radeditor's HTML I put a hyperlink like <a href=http://www.telerik.com>Telerik</a> without the target="_blank" attribute and then click on the hyperlink from "Preview" tab the page opens up in "Preview" tab. So far so good but Next if i click on "HTML" or "Design" or any other link on the page I get a Javascript Error "Permission Denied".
On the other hand if i use target="_blank" it works fine. I was able to reproduce this with the RadEditor example on your website. Please see screen shots attached. Can you please suggest a solution or a workaround if we want to open the hyperlink in Preview and not another window and continue working with the current page.
Rumen
Telerik team
 answered on 26 Mar 2010
11 answers
453 views

I have an RadAjaxPanel that has a panel in it that I dynamically create Image buttons in for cached searches. This works fine. I want to add a context menu to each button so I can give the user a way to remove the cached search. So if left-click the button it will redirect them to open the seach. When they Right-click I want the context menu to appear. Not sure the best way to do this on the server and attach individually to dynamic buttons.

Any samples show something like this?
Veselin Vasilev
Telerik team
 answered on 26 Mar 2010
1 answer
158 views
I typically validate my forms server side due to the incompatibility of the traditional ASP.NET validators with certain ajax scenarios. If a form field is invalid, I notify the user through some sort of message, However it would be nice to give some visual cue as well. I use rad comboboxes and rad input controls primarily. I usually use a built-in Telerik skin for these. Is there a way to change the appearance of these controls after an ajax update by setting control properties server-side? I can obviously change individual properties, or even styles, however, ideally I would like to create an "Invalid" skin which would be applied if the control's value is improper. The client-side invalid prompt is an example of this. In fact, I would love to be able to use the exact same appeaance but set it server-side, and be able to set it back to the normal skin if the field is valid.

What would be ideal is if Telerik added a property to certain data entry controls (such as RadInput, Combobox) called "IsInvalid" or something to that effect. If this property is true, the control is rendered with this invalid skin appearance. Further enhancement to this functionality would allow users to specify an "InvalidMessage" which allows users to specify what is wrong with the data in the control . an additional property might be InvalidMessagePosition, which can be set to display the message to the left/right/top/bottom  of the control, or as a hover tooltip.
Kamen Bundev
Telerik team
 answered on 26 Mar 2010
3 answers
122 views
Hi,

 I have badspace between Radeditor and Webpart. In my page, I have pagecontent and webpart and thent I added the Radeditor in the webpart then I type some text in the Radeditor and then when I click page preview finally the text left alignment of webpart and pagecontent are not properly align because of badspace of Webpart and Radeditor.

Do you have any solution to my problem?

Thank you,
Stanimir
Telerik team
 answered on 26 Mar 2010
1 answer
171 views
The RadMenu looks like has the value of stack order more than RadWindow.
So it appear to see the RadMenu before RadWindow.
However, I tried to correct this by setting the z-index of RadWindow up or reduce the z-index of RadMenu down.
It's not working. see pic attached.
Yana
Telerik team
 answered on 26 Mar 2010
1 answer
163 views
I have a problem with the setting AllowCustomText="false" and Load on demand server-side
It is nog working as i like it to be.
I can leave the combobox (set the focus on another control) and the text is still showing.

I want the combobox to work like a dropdownlist so it should not be possible to type text that is not allowed.

I that possible?

Greetings Robert


Veronica
Telerik team
 answered on 26 Mar 2010
7 answers
136 views
Hi,
          I would like to add two rad windows, one for alert purpose and another for linking another form into rad window. But i am able to add only one rad window at a time.

I used the below code for alert
        <telerik:RadWindowManager ID="RadAlertWindow" runat="server" />              
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                          <telerik:AjaxUpdatedControl ControlID="RadAlertWindow" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
CS Code
protected void btnTest_Click(object sender, EventArgs e)  
    {  
        string verbiage = "Testing Alert";          
        RadAjaxManager1.ResponseScripts.Add(@"radalert('" + verbiage + "', 330, 110);");            
    } 

The another RadWindow helps to show the linked page;
 function ShowForm(CID) {  
            window.radopen("FileInfo.aspx?cid="+CID, "OpenWindow");  
            return false;  
        }     
<telerik:RadWindowManager ID="RadWindowManager2" runat="server">  
            <Windows>              
                <telerik:RadWindow ID="OpenWindow" runat="server" Title="Test" Height="500px" 
                    Width="900px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false" 
                    Modal="true" />                              
            </Windows>              
        </telerik:RadWindowManager> 

All the above codes are mentioned in single form, but when i try to show the rad window i am getting the following error

"Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'OpenWindow' can't be added to the application."

So how to solve the above issue

-Thanks
Yavor
Telerik team
 answered on 26 Mar 2010
1 answer
94 views
Hello,

I need help!
I want to add a customize a "New Appointment form" on click of RedScheduler. There I need some dropdowns and textboxes, how I can do it? Can you please provide a code example, also how I will get these values on server side, so that  on click of "Add" I can add these values into Database.

Please help as soon as possible, Thanks!

Mohit
Shinu
Top achievements
Rank 2
 answered on 26 Mar 2010
3 answers
227 views
Hi.

I am moving a pretty large chunk of our system from regular grids with semi ajaxified updates and paging to total client side binding through webservices.

We have a diverse user base, running different cultures pr. user in the system, so we need to be able to se the DataFormatString on Page_Load (or some other time) for the datetime columns so that the display is consistent throughout the system.

I have tried and tried, but  not had any luck.

How would I go about this ... ?

And I don't want to create OnDataBound functions for all the grids just to be able to do this ... there should be a way somehow to do this.

Thanks for the help,
- Arni Gunnar Ragnarsson.
Yavor
Telerik team
 answered on 26 Mar 2010
4 answers
410 views
I'm currently working on a web site reporting system, using the RadGrid.  The system must be able to support multiple ReportTypes which return different number of columns, column names, and even hierarchy.  I've setup a system that is driven by xml files and there are virtually no hard coded values, column names, templates, and so forth.  It needs to be lightweight and dynamic. Most of the RadGrid settings are pulled in at the Page_Init event.  The application is dynamically buidling columns with AutoGenerateColumns=true.

Everything is working great to this point but, I've run into a problem which I hope some of you can help me with.  I dynamically create image icons and link to javascript at the column header level and also at the row level.  Works great until a user initiaites some event that raises a PostBack at the hierarchy's child level.  My custom controls added to the RadGrid are lost in the PostBack.   Obviously I am doing something wrong but, I'm not sure how to address this.

In the code below you'll see that I am creating controls and adding them to the RadGrid. gridDataItem[gridColumn.UniqueName].Controls.Add controls collection.  These are the controls which get lost in the PostBack.

<telerik:RadAjaxPanel ID="ParentRadAjaxPanel" runat="server">  
<telerik:RadGrid ID="ParentRadGrid" runat="server" EnableEmbeddedSkins="false" Skin="BIC3RadSkin" 
    OnItemDataBound="RadGrid_ItemDataBound" OnColumnCreated="RadGrid_ColumnCreated" 
    OnNeedDataSource="RadGrid_NeedDataSource" OnSortCommand="RadGrid_SortCommand">  
    <MasterTableView> 
    </MasterTableView> 
</telerik:RadGrid> 
</telerik:RadAjaxPanel> 


    protected void RadGrid_ItemDataBound(object sender, GridItemEventArgs newGridDataItem)  
    {  
        try 
        {  
            RadGrid radGrid = (RadGrid)sender;
            #region Create Custom Header  
 
            if (newGridDataItem.Item.ItemType == GridItemType.Header)  
            {
                #region Create links to charts  
 
                    ...  
                    // Box a the ItemType as it is easier to use  
                    GridHeaderItem gridHeaderItem = (GridHeaderItem)newGridDataItem.Item;  
 
                    // Iterate thorugh every column and format the value  
                    foreach (GridColumn gridColumn in radGrid.MasterTableView.RenderColumns)  
                    {  
                        if (gridColumn.ColumnType != "GridExpandColumn" && gridColumn.ColumnType != "GridRowIndicatorColumn")  
                        {  
                            ...  
                            try 
                            {  
                                // Create a LinkButton control instead of setting the columns' .text property or the javascript will not work  
                                LinkButton linkButton = (LinkButton)gridHeaderItem[gridColumn.UniqueName].Controls[0];  
                                linkButton.Text = gridColumn.UniqueName;  
 
                                // Create a hyperLink control for the chart to work and does not interfere with the sort LinkButton  
                                if (_report.Grids[radGrid.ID][gridColumn.UniqueName].ChartColumnLink == true)  
                                {  
                                    String chartParameters = String.Format(" <a alt=\"Click to view chart\" href=\"javascript:ViewChart('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}');\"><img border=\"0\" src=\"images/iconChart.gif\"></a>", _report.ManagerUserID.ToString(), _report.DepartmentID, Convert.ToByte(_report.DepartmentDrillDown), _report.Location, Convert.ToByte(_report.ShiftWindow), _report.StartDate.ToShortDateString(), _report.EndDate.ToShortDateString(), _report.ReportType, _report.AggregationPeriod, gridColumn.UniqueName);  
 
                                    HyperLink chartHyperLink = new HyperLink();  
                                    chartHyperLink.Text = chartParameters;  
                                    gridHeaderItem[gridColumn.UniqueName].Controls.Add(chartHyperLink);  
                                }  
                            }  
                            catch 
                            {  
                                // If this fails, allow the column name to go w/o the chart link by default  
                            }  
                        }  
                    }  
                }
                #endregion Create links to charts  
            }
            #endregion Create Custom Header  
 
            ... // Create Custom Footer ommitted for easier troubleshooting  
 
            #region Put the proper formatting on values before display  
 
            if ((newGridDataItem.Item is GridDataItem) == true)  
            {  
                ...  
                GridDataItem gridDataItem = (GridDataItem)newGridDataItem.Item;  
 
                // Iterate thorugh every column and format the value  
                foreach (GridColumn gridColumn in radGrid.MasterTableView.RenderColumns)  
                {  
                    if (_report.Grids[radGrid.ID].ContainsKey(gridColumn.UniqueName) == true)  
                    {  
                        // Create the grid data item text in a control or .text property  
                        Label textLabel = new Label();  
                        if (gridDataItem[gridColumn.UniqueName].Text == "NaN")  
                        {  
                            // Weird: Add both text and a control. If there are more controls added below, the text is hidden but, if there are no other controls, the text will show.  
                            textLabel.Text = RadGrid_FormatText(radGrid, gridColumn.UniqueName, "0");  
                            gridDataItem[gridColumn.UniqueName].Text = RadGrid_FormatText(radGrid, gridColumn.UniqueName, "0");  
                        }  
                        else 
                        {  
                            // Do not display items that are special case exceptions governed by the .ReplaceHierarchyParentText property from xml  
                            if (String.IsNullOrEmpty(_report.Grids[radGrid.ID][gridColumn.UniqueName].ReplaceHierarchyParentText) == false && gridDataItem.OwnerTableView.ParentItem == null)  
                            {  
                                textLabel.Text = _report.Grids[radGrid.ID][gridColumn.UniqueName].ReplaceHierarchyParentText;  
                                gridDataItem[gridColumn.UniqueName].Text = _report.Grids[radGrid.ID][gridColumn.UniqueName].ReplaceHierarchyParentText;  
                            }  
                            else 
                            {  
                                // Weird: Add both text and a control. If there are more controls added below, the text is hidden but, if there are no other controls, the text will show.  
                                textLabel.Text = RadGrid_FormatText(radGrid, gridColumn.UniqueName, gridDataItem[gridColumn.UniqueName].Text);  
                                gridDataItem[gridColumn.UniqueName].Text = RadGrid_FormatText(radGrid, gridColumn.UniqueName, gridDataItem[gridColumn.UniqueName].Text);  
                            }  
                        }  
 
                        gridDataItem[gridColumn.UniqueName].Controls.Add(textLabel);
                        #region Create a hyperLink control for the chart to work and does not interfere with the sort  
 
                        // Create a hyperLink control for the chart to work and does not interfere with the sort LinkButton  
                        if (_report.Grids[radGrid.ID][gridColumn.UniqueName].ChartRowLink == true)  
                        {  
                            String chartParameters = String.Format(" <a alt=\"Click to view chart\" href=\"javascript:ViewChart('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}');\"><img border=\"0\" src=\"images/iconChart.gif\"></a>", gridDataItem[_childRadGridProperties["MasterTableView.DataKeyNames"]].Text, _report.DepartmentID, Convert.ToByte(_report.DepartmentDrillDown), _report.Location, Convert.ToByte(_report.ShiftWindow), _report.StartDate.ToShortDateString(), _report.EndDate.ToShortDateString(), _report.ReportType, _report.AggregationPeriod, gridColumn.UniqueName);  
 
                            HyperLink chartHyperLink = new HyperLink();  
                            chartHyperLink.Text = chartParameters;  
 
                            gridDataItem[gridColumn.UniqueName].Controls.Add(chartHyperLink);  
                        }
                        #endregion Create a hyperLink control for the chart to work and does not interfere with the sort  
                    }  
                }  
            }
            #endregion Put the proper formatting on values before display  
        }  
        catch (Exception exception)  
        {  
            //UNDONE: Wireup error handler object  
            Console.Write("error");  
        }  
    } 

Thanks!

Stacy
Stacy
Top achievements
Rank 1
 answered on 26 Mar 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?