Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
83 views

Hi All,
I am using radajaxpanel around the radgrid. I have a column of linkbuttons inside the radgrid. whenever user clicks on the linkbutton, I do some calculations on the server side and raise an event to another page to pass that calculated value. The raising of the event works if I remove the radAjaxPanel, if I put the panel back then raising of the event does not work. I was wondering if there is any work around for that. I really have to raise the event.

below is my code


<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel_ID" LoadingPanelID="RadAjaxLoadingPanel1"
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="1500px" BackColor="#E6E6E6" 
    ExpandMode="MultipleExpandedItems"
    <Items
        <telerik:RadPanelItem runat="server" Text="ID Picker" Expanded="true"
            <Items
                <telerik:RadPanelItem Text="" Expanded="true"
                    <ItemTemplate
                         
                            <table
                                   
                                <tr
                                    <td
                                        <telerik:RadGrid ID="RadGrid_IDPicker" AllowSorting="True" PageSize="100" AllowPaging="True" 
                                            runat="server" GridLines="None" OnPageIndexChanged="RadGrid_IDPicker_PageIndexChanged" 
                                            OnPageSizeChanged="RadGrid_IDPicker_PageSizeChanged" Width="1500px" Visible="false"
                                               
                                            <MasterTableView RetrieveAllDataFields="true" AutoGenerateColumns="false" DataKeyNames="ID"
                                                        <Columns
                                                    <telerik:GridTemplateColumn UniqueName="TemplateLinkColumn" AllowFiltering="false" 
                                                        HeaderText="ID"
                                                        <ItemTemplate
                                                            <asp:LinkButton ID="ID_Link" runat="server" OnClick="ID_Link_Click" Text='<%#Bind("ID") %>'  
                                                                ></asp:LinkButton
                                                        </ItemTemplate
                                                    </telerik:GridTemplateColumn
   
                                                  
                                                    <telerik:GridTemplateColumn HeaderText="TAG"
                                                        <ItemTemplate
                                                            <asp:Label ID="lblNumber" runat="server" Text='<%#Bind("Number") %>'></asp:Label
                                                        </ItemTemplate
                                                    </telerik:GridTemplateColumn
                                                       
                                                </Columns
                                            </MasterTableView
                                            <PagerStyle Mode="NextPrevAndNumeric" /> 
                                        </telerik:RadGrid
                                    </td
                                </tr
                            </table
                            
                    </ItemTemplate
                </telerik:RadPanelItem
            </Items
        </telerik:RadPanelItem
    </Items
</telerik:RadPanelBar
   </telerik:RadAjaxPanel>

The code in the server side is



 

public delegate void ID_Selection(String strValue);
public event ID_Selection IDEventHandler; 
   
   protected void ID_Link_Click(object sender, EventArgs e) 
    
                      if (IDEventHandler != null) 
            
                  
                IDEventHandler("Testvalue"); 
                      
   
            
Iana Tsolova
Telerik team
 answered on 30 Aug 2011
3 answers
84 views
hi

i just have some question bout this control since i havent use it yet

here is my question

is there a possibilities to populate my datagrid w/ the files that fileexplorer found on my server folders?

thanks
regards
webster
Dobromir
Telerik team
 answered on 30 Aug 2011
1 answer
179 views

Hello,
 
   In my web application , I have a RadMenu, and in the Item click of the RadMenu, I am opening a RadWindow. This RadWindow is supposed to come on top of the RadMenu. But it is going below the RadMenu even though i set the Z-Index

Code I Have

<script type="text/javascript">
function NewRadWindow(sender,eventArgs) {
var item = eventArgs.get_item();
 if (item.get_text() == "BreakTime") {
      radopen(null,"BreakWindow");
    return false;
 }
</script>

  <telerik:RadMenu ID="RadMenu1" runat="server" orientation="Horizontal" Skin="Windows7" OnClientItemClicking ="NewRadWindow"  style="z-index:2900" EnableRoundedCorners="True" EnableShadows="True" Height="39px" Width="100%" CausesValidation="False">

 <telerik:RadWindowManager ID="RadWindowManager1" runat="server" RestrictionZoneID="zoneID1" Style="z-index: 7001">
                                            <Windows>
                                                <telerik:RadWindow ID="BreakWindow" runat="server"               NavigateUrl="frm_BreakTime.aspx"  AutoSize="true"   />
                                                                                               
                                            </Windows>
                                        </telerik:RadWindowManager>

I added the RadWindow in the RadWindowManager and I am opening the RadWindow from the Javascript as shown above.
Even though i Set the Z-Index of RadWindow as 7001 and RadMenu as 2900, I still the RadMenu on the top of the RadWindow.

Am i missing something?

Thanks
Marin Bratanov
Telerik team
 answered on 30 Aug 2011
1 answer
142 views
Hello All,

I m using RadFormDecorator on my page. Also there is a RadGrid with GridClientSelectColumn on the page using the "Persisting the Selected Rows Client-side on Sorting/Paging/Filtering/Grouping" (http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html) feature.

I have noticed the that the when you select the checkbox at the top of the header, it acts weird in IE9. In IE9 the rows don't get selected but Firefox works well.

After doing some experimentation it seemed that the RadFormDecorator was creating problem. So I had to use DecoratedControls="All" ControlsToSkip="CheckBoxes" in the RadFormDecorator and it worked perfectly fine in IE9 as well. But the checkbox now doesn't show the decorated checkbox.

This is just to keep you informed so that if anyone else faces the same problem it might be of help.




Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Aug 2011
1 answer
92 views
I would think that the MaxFileInputsCount would be the count of actual files allowed, but not always.  As with the example below, adding a description field, the count is apparently twice the number of actual file inputs added.

So to allow 5 file inputs for example, you would need to set MaxFileInputsCount to 10 in this particular case.

I'm assuming this is from the addition of the description field, I haven't tested it with other scenarios using additional fields.


function OnClientAddedHandler(sender, eventArgs)
{
    var inputRow = eventArgs.get_row();
    var uList = inputRow.parentNode;
    var count = 0;
    // add a new row for the description field
    newRow = document.createElement("li");
    count++;
    uList.insertBefore(newRow, inputRow);
    var label = document.createElement("span");
    label.innerHTML = "Description: ";
    label.style.fontSize = 12;
    label.id = label.name = sender.getID("DescLabel");
    input = document.createElement("input");
    input.type = "text";
    input.id = input.name = sender.getID("DescValue");
    newRow.appendChild(label);
    newRow.appendChild(input);
}
Peter Filipov
Telerik team
 answered on 30 Aug 2011
3 answers
172 views
I am setting up a dialog for the RadFileExplorer explorer using the RadWindow with it pointing to another page. However, everytime I click a file that is excel or word to open I am getting several script errors. The errors are as follows:

Line: 19802
Error: Invalid calling object

Line: 6
Error: Unable to get value of the property 'toLowerCase': object is null or undefined

The dialog to open or save the file still comes up. When I debug the error I see it is something within th script manager itself. I have tried different things such as not using a master page, not using the RadScriptManager, removing Ajax Manager, etc. I am going to try an explicit file handler next to see if that will handle it (i.e FileSystemHandler.ashx?path=" + item.get_url();  ). Here is test code that replicates the issue. No code behind was needed.

WebForm1.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="FileExplorerInRadWindowWithMaster.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
<telerik:RadCodeBlock ID="RD1" runat="server">
<script type="text/javascript">
    function btnSalesContract_FileLink_Click(sender, args) {
        var rwSalesContract_ContractFileExplorer = $find('<%=rwSalesContract_ContractFileExplorer.ClientID %>');
 
        rwSalesContract_ContractFileExplorer.setUrl('FileDialog2.aspx');
        rwSalesContract_ContractFileExplorer.show();
    }
 
</script>
</telerik:RadCodeBlock>
 
            <telerik:RadButton ID="btnSalesContract_FileLink" runat="server"
                    Text="View Contract Files"
                    OnClientClicked="btnSalesContract_FileLink_Click"
                    ToolTip="Click to view this contract's files in Documentum"
                    Icon-PrimaryIconCssClass="rbEdit"
                    UseSubmitBehavior="false"
                    autopostback="false" />
 
 
<telerik:RadWindow ID="rwSalesContract_ContractFileExplorer" runat="server" ClientIDMode="Static"
    Modal="true"
    AutoSize="true"
    Behaviors="Close"
    Style="z-index: 2000"
    ></telerik:RadWindow>
 
</asp:Content>


FileDialog.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="FileDialog.aspx.cs" Inherits="FileExplorerInRadWindowWithMaster.FileDialog" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server">
        <Configuration  ViewPaths="~/Files" />
    </telerik:RadFileExplorer>
</asp:Content>

Site1.Master

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="FileExplorerInRadWindowWithMaster.Site1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head id="Head1" runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form2" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
  
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Default">
    </telerik:RadSkinManager>
 
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
         
        </asp:ContentPlaceHolder>
 
    </form>
</body>
</html>





 
Marin Bratanov
Telerik team
 answered on 30 Aug 2011
21 answers
510 views
Hi to all, I've got problem rendering editor tool with the latest version of Firefox (6.0): all the tools buttons are missing and there is only a text area.
I tried a test page with only the editor but the result is the same.

Have you got some idea to resolve this problem?

Thanks in advance.
rems
Top achievements
Rank 1
 answered on 30 Aug 2011
5 answers
273 views

I have a template definition as below:

public class BoundTemplate : System.Web.UI.ITemplate  
    {  
        public ListItemType templateType;  
        public string columnName, dataType, timeZone, sortExpression;  
        public bool convertTZ;  
        public event CommandEventHandler OnSorting;  
 
        public BoundTemplate(ListItemType type, string colName, string sortExpression)  
        {  
            templateType = type;  
            this.columnName = colName;  
            this.sortExpression = sortExpression;  
        }  
 
        public BoundTemplate(ListItemType type, string colName, CommandEventHandler sortHandler, string sortExpression)  
        {  
            templateType = type;  
            this.columnName = colName;  
            this.OnSorting = sortHandler;  
            this.sortExpression = sortExpression;  
        }  
 
        public BoundTemplate(ListItemType type, string colName, string dataType, string timeZone, bool convertTZ)  
        {  
            templateType = type;  
            this.columnName = colName;  
            this.dataType = dataType;  
            this.timeZone = timeZone;  
            this.convertTZ = convertTZ;  
        }  
 
 
        public void InstantiateIn(Control container)  
        {  
            switch (templateType)  
            {  
                case ListItemType.Header:  
                    if (OnSorting != null)  
                    {  
                        LinkButton lb = new LinkButton();  
                        lb.Text = columnName;  
                        //lb.CommandName = "Sort";  
                        lb.Command += new CommandEventHandler(lb_Command);  
                        lb.CommandArgument = sortExpression;  
                        container.Controls.Add(lb);  
                    }  
                    else 
                    {  
                        Label lbl = new Label();  
                        lbl.Text = columnName;  
                        container.Controls.Add(lbl);  
                    }  
 
                    break;  
                case ListItemType.Item:  
                case ListItemType.AlternatingItem:  
                    Label dataLabel = new Label();  
                    dataLabel.Text = columnName;  
                    container.Controls.Add(dataLabel);  
                    dataLabel.DataBinding += new EventHandler(Item_DataBinding);  
                    break;  
 
                case ListItemType.Footer:  
                    break;  
            }  
        }  
 
        public void lb_Command(object sender, CommandEventArgs e)  
        {  
            if (OnSorting == null)  
                throw new Exception("Sort handler is not hooked up.");  
 
            OnSorting(sender, e);  
        }  
 

In the code behind I add the control to the grid dynamically as below:

 

GridTemplateColumn tfield = new GridTemplateColumn();  
                          
BoundTemplate headerTemplate = new BoundTemplate(ListItemType.Header, displayName, fieldName);  
if (field.SelectSingleNode("@sortable") != null && field.SelectSingleNode("@sortable").Value == "true")  
headerTemplate.OnSorting += new CommandEventHandler(SortGrid4TemplateFields);  
tfield.HeaderTemplate = headerTemplate;  
tfield.ItemTemplate = new BoundTemplate(ListItemType.Item, columnName, dataType, timeZone, convertTZ);  
tfield.ItemStyle.HorizontalAlign = SetAlignment(alignment);  
tfield.DataField = columnName;  
tfield.UniqueName = fieldName;  
//tfield.DataType = Type.GetType(dataType);  
tfield.SortExpression = fieldName;  
//tfield.FilterListOptions = GridFilterListOptions.VaryByDataType;  
 
RadGrid1.MasterTableView.Columns.Add(tfield); 

 

And finally, i have set the grid properties as below:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="true" AllowSorting="true" AllowPaging="true" PageSize="10" OnSortCommand="CustomSort">          
<MasterTableView AutoGenerateColumns="false" AllowCustomSorting="true"></MasterTableView>   </telerik:RadGrid> 


The issue is the OnSorting event handler is never getting invoked, nor is the CustomSort handler. I am trying to integrate the RadGrid control into our existing grid which has like ten templates defined and this is one of them
Vasil
Telerik team
 answered on 30 Aug 2011
3 answers
102 views
Dear Telerik-Team,

I have a strange issue with the RadTabStrip when integrating in SharePoint.

In my Visual Studio Project I added an Application page to my project that contains the TabStrib and added a sample tabstrip to it. The code looks like below:
<%@ Register Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
 
</asp:Content>
 
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    Content above the TabStrip!!
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Vista" MultiPageID="RadMultiPage1"
        SelectedIndex="0" Align="Justify" ReorderTabsOnSelect="true" Width="347px">
        <Tabs>
            <telerik:RadTab Text="General">
            </telerik:RadTab>
            <telerik:RadTab Text="Tools">
            </telerik:RadTab>
            <telerik:RadTab Text="Hardware">
            </telerik:RadTab>           
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="pageView"
        Width="345px">
        <telerik:RadPageView ID="RadPageView1" runat="server">
            First content.
        </telerik:RadPageView>
        <telerik:RadPageView ID="RadPageView2" runat="server">
            Second content.
        </telerik:RadPageView>
        <telerik:RadPageView ID="RadPageView3" runat="server">
            Third content.
        </telerik:RadPageView>       
    </telerik:RadMultiPage>
 
</asp:Content>
 
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Application Page
</asp:Content>
 
<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
My Application Page
</asp:Content>

It has no special code behind. The text "Content above the TabStrip!!" is displayed as expected, but the TabStrip itself will be rendered too far at the bottom. I have no idea what this can be since the cotent is inside a single ContentPlaceholder.

I have attached the outcome as an image.

PS: I have installed the latest release of the RadControls for ASP.NET AJAX


Hope you can help as soon as possible.
Marco Beyer
Top achievements
Rank 1
 answered on 30 Aug 2011
1 answer
210 views
I am new to Telrik & trying to create a simple Navigation Tree dynamically.
I have 2 table one used to create the Navigation Tree ("application" table) & other storing values for the context menu ("action" table). Action table rows are relative to specific item in application table (& not common for all as I found in most of the samples).
In short I am trying to generate specific set of Context Menus for every selection.
I was able to create the navigation tree. But wasnt able to attach the specfic row collection (from action table) to the corrosponding navigation tree item.
I search thru the samples & demos but most of are based on hard coded values for Contex Menu. Can somebody provide How can I achieve this?

Can anybody pls throw some light if this is achievable & if can provide some sample examples.
Thanks
Kate
Telerik team
 answered on 30 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?