Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
774 views
I know on grid_ItemDataBound can use
e.Item.DataItem to get the collection.

 

 also

can use  

 

GridDataItem dataItem1 = e.Item as GridDataItem;  

dataItem1["fieldname"] to get the field name.

Is it a way to get the collection just based on dataItems1?

I have a dropdown inside grid cell, on the dropdown click, I like to pass the row collection to the dropdown click. How can I do this?
On mydropdown_SelectedIndexChanged I used below:    

DropDownList ddl = (DropDownList)sender;
GridDataItem item = (ddl.Parent as GridTableCell).Parent as GridDataItem;  

 

use
string field=item["field1"];
to pass grid field to mydropdown_SelectedIndexChanged 

this way, I need to put all the field1. field 2 in the grid (maybe hidden column) in order to let mydropdown_SelectedIndexChanged  access the grid data, is there a way to send the whole grid row collection to mydropdown_SelectedIndexChanged ? something like (Myrowcollection)e.Item.DataItem that I did on ItemDataBound,but don't how to get the collection under mydropdown_SelectedIndexChanged?

Thanks

Sebastian
Telerik team
 answered on 04 Jan 2012
3 answers
105 views
Hi
I ran into the Tab Text orientation problem with Google Chrome and firefox.

I noticed the suggestion using images instead of text for the tab Titles.

My tab titles are dynamic and created at run time so that poses a challenge.

I am submitting here my solution that creates the images on the fly!!

There are a couple of problems though:
1/The images are not transparent.
2/I have tried to get the image to use the forecolor of the tabs theme, but this always seems to be 0 (black).

Can anyone help fix with these two problems?

Here is how it works:

A/   Create an aspx page that will convert the text to an image:
        (this is a pretty handy code in itself and is based on this link:http://911-need-code-help.blogspot.com/2009/02/create-text-images-on-fly-with-aspnet.html)
    Create a new page name it TextToImage.aspx 

        Here is the code behind :
        
protected void Page_Load(object sender, EventArgs e)
        {
 
            //Usage example
            //TextToImage.aspx?size=100&text=Hello%20there&color=FF22F3
 
            //-------------------------------------------
            // CAPTURE + SANITIZE QUERYSTRING PARAMETERS
            //-------------------------------------------
 
            string qText;
 
            qText = Request.QueryString["text"] + "";
            if (qText.Length == 0)
                qText = "-";
 
 
            int qSize;
            try
            {
                qSize = Convert.ToInt32(Request.QueryString["size"]);
            }
            catch
            {
                qSize = 0;
            }
 
 
            if (qSize < 8)
                qSize = 8;
 
            string qColor;
            qColor = Request.QueryString["color"] + "";
            if (qColor.Length == 0 || Regex.IsMatch(qColor, "^[0-9A-F]{6}$", RegexOptions.IgnoreCase) == false)
                qColor = "000000";
 
            //-------------------------------------------
            // CALL FUNCTION
            //-------------------------------------------
 
            RenderGraphic(qText, qSize, qColor);
 
        }
 
        private void RenderGraphic(string pText, int pSize, string pColor)
        {
 
            //-------------------------------------------
            // DECLARE VARIABLES + PRE-CALCULATE
            //-------------------------------------------
 
            Bitmap b = new Bitmap(1, 1);
            Graphics g = Graphics.FromImage(b);
            Font f = new Font("Arial", pSize);
            int w = Convert.ToInt32(g.MeasureString(pText, f).Width);
            int h = Convert.ToInt32(g.MeasureString(pText, f).Height);
 
            //-------------------------------------------
            // RENDER DRAWING
            //-------------------------------------------
 
            b = new Bitmap(w, h);
            g = Graphics.FromImage(b);
            g.Clear(Color.FromArgb(255, 255, 255, 204));//Color.FromArgb(&HFF, &HFF, &HFF, &HCC)
            //g.Clear(Color.Transparent);
 
 
            g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
            g.DrawString(pText, f, new SolidBrush(ColorTranslator.FromHtml("#" + pColor)), 0, 0);
            g.Flush();
 
            b.RotateFlip(RotateFlipType.Rotate90FlipNone);
            //-------------------------------------------
            // SAVE IN MEMORY
            //-------------------------------------------
 
            MemoryStream m = new MemoryStream();
            b.Save(m, ImageFormat.Gif);
 
            //-------------------------------------------
            // APPLY TRANSPARENCY HACK
            //-------------------------------------------
 
            byte[] n;
            n = m.ToArray();
            //n[787] = 254;
 
            //-------------------------------------------
            // SEND TO BROWSER
            //-------------------------------------------
 
            BinaryWriter o = new BinaryWriter(Response.OutputStream);
 
            o.Write(n);
            o.Close();
        }

The ASPX needs no content.

B/ The next step is to iterate through the tabs and apply the image URL:
      Here is my implemenation, my sliding zone is called 'ExploreSlidingZone' so you will need to change that to your own sliding zone name.
Call this function from code behind page_Load method.
private void TabsTextToImage()
    {
        // chrome & firefox can;t rotate text so we have to convert the tab text to image
        // and set the tabs to image only
        foreach (RadSlidingPane mypane in ExploreSlidingZone.GetPanes())
        {
            mypane.TabView = SplitterSlidePaneTabView.ImageOnly;
 
            mypane.IconUrl = "TextToImage.aspx?size=" + mypane.Font.Size + "&text=" + mypane.Title + "&color=" + mypane.ForeColor.GetHashCode();
 
        }
    }



Please see attached for a snapshot of the result.

You should see your tabs with images, but they are not transparent and do not inherit the skin properties.

So if we can solve the transparency & skin issues - we will have a result!!

Best Regards

Richard Briggs

richard
Top achievements
Rank 1
 answered on 04 Jan 2012
1 answer
112 views
 Hi,

I am adding controls dynamically in OnItemCreated event.
OnitemDataBound setting the value to same controls on the basis of hidden field present in same row.

This works fine.

But after button click event which is at the bottom page  I am getting same value.
the problem is ,in OnItemCreated controls are getting created  again.
But if i checked for already added controls its showing null.

Can you please suggest.
My code is as below.

protected void OnItemCreated(object sender, GridItemEventArgs e)
        {
            if (!IsPostBack)
            {
                RadGrid rg = (RadGrid)sender;
 
                SQWParameter oSQWParameter = (SQWParameter)ViewState["oParameter"];
 
                if (e.Item is GridDataItem)
                {
                    GridDataItem item = e.Item as GridDataItem;
                    HiddenField hdnValue = (HiddenField)e.Item.FindControl("hdnId");
                    WebControl rwControl = GetContorlByParameter(oSQWParameter);
                    item["Column2"].Controls.Add(rwControl);
                }
 
            }
        }
 
private WebControl GetContorlByParameter(SQWParameter oSQWParameter)
        {
            RadTextBox txtValue = new RadTextBox();
            RadNumericTextBox ntxtValue = new RadNumericTextBox();
            RadComboBox cmbValue = new RadComboBox();
            RadDatePicker rdpValue = new RadDatePicker();
 
            int iControlType = 0;
            int iValue = 0;
 
 
            switch (oSQWParameter.Type)
            {
                case ParameterType.Text:
                    switch (oSQWParameter.ValueType)
                    {
                        case ParameterValueType.UniqueValue:
                            iControlType = 0;
                            txtValue = new RadTextBox();
                            txtValue.ID = "rwControlValue";
                            txtValue.Text = oSQWParameter.DefaultValue.ToString();
                            txtValue.EmptyMessage = oSQWParameter.DefaultValue.ToString();
                            txtValue.Width = 120;
                            break;
                        case ParameterValueType.ValueList:
                            iControlType = 2;
                            cmbValue = new RadComboBox();
                            cmbValue.ID = "rwControlValue";
                            cmbValue.Width = 110;
                            cmbValue.Items.AddRange(GetValueListItems(oSQWParameter.ValueList));
                            break;
 
                    }
                    break;
                case ParameterType.Numeric:
                    switch (oSQWParameter.ValueType)
                    {
                        case ParameterValueType.UniqueValue:
                            iControlType = 1;
                            ntxtValue = new RadNumericTextBox();
                            ntxtValue.ID = "rwControlValue";
                            txtValue.Width = 120;
                            ntxtValue.NumberFormat.DecimalDigits = oSQWParameter.DecimalPlaces;
                            if (!oSQWParameter.Use1000Separator)
                                ntxtValue.NumberFormat.GroupSeparator = "";
                            ntxtValue.EmptyMessage = oSQWParameter.DefaultValue.ToString();
                            break;
                        case ParameterValueType.ValueList:
                            iControlType = 2;
                            cmbValue = new RadComboBox();
                            cmbValue.ID = "rwControlValue";
                            cmbValue.Width = 110;
                            cmbValue.Items.AddRange(GetValueListItems(oSQWParameter.ValueList));
                            break;
 
                    }
                    break;
                case ParameterType.Date:
                    switch (oSQWParameter.ValueType)
                    {
                        case ParameterValueType.UniqueValue:
                            iControlType = 3;
                            rdpValue = new RadDatePicker();
                            rdpValue.ID = "rwControlValue";
                            rdpValue.Width = 120;
                            rdpValue.MinDate = new DateTime(1900, 1, 1, 12, 00, 00);
                            rdpValue.DateInput.DateFormat = "MM/dd/yyyy";
                            DateTime dtValue = (DateTime)oSQWParameter.DefaultValue;
                            rdpValue.DateInput.EmptyMessage = dtValue.ToString("MM/dd/yyyy");
                            break;
                    }
                    break;
            }
 
            if (iControlType == 0)
                return txtValue;
            else if (iControlType == 1)
                return ntxtValue;
            else if (iControlType == 2)
                return cmbValue;
            else
                return rdpValue;
 
        }
 
  protected void OnItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = e.Item as GridDataItem;
 
                HiddenField hdnValue = (HiddenField)e.Item.FindControl("hdnValue");           
                 
                 RadTextBox rwControl = (RadTextBox)e.Item.FindControl("ntxtValue");
                  rwControl.Text = hdnValue.Value;
                             
            }
        }
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Jan 2012
1 answer
48 views
I have radgrid with using List<Classname> for datasource.When I insert the data,new data replace with old data and old data is disappearing.How can I insert new data to the grid without losing old one? 
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Jan 2012
3 answers
66 views
Hi all
I have a problem with FF 8 and greater version. (We have a MOSS2007/WSS3 Frontend Server, Win2003 x86)
The RadEditor Light was succesfull installed and deployed. Test with multiple Browser are ok but with Firefox 8 and greater there show a simple text box without any editing possibility. Its seems the edotor not load in FF 8 and greater versions.
Is that a known copatibility issue or is there a posibility to configure the editor so that it works with FF 8?

Greatings Ralf
Rumen
Telerik team
 answered on 04 Jan 2012
1 answer
187 views
I have two RadDateTimePickers embedded in a DetailsView. The problem is that when I run the page, the picker for RadDatePickerStarts  inputs the date&time in the text box for the second picker (RadDatePickerEnds). The second picker  does not input the selected date&time anywhere. How do I get each picker to place input into the correct box?
 
  <asp:TemplateField HeaderText="Starts" SortExpression="Starts">
                    <EditItemTemplate>
                        <telerik:RadDateTimePicker ClientIDMode="Static" SelectedDate='<%# Bind("Starts") %>'
                            ID="RadDatePickerStarts" runat="server">
                        </telerik:RadDateTimePicker>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <telerik:RadDateTimePicker ClientIDMode="Static" SelectedDate='<%# Bind("Starts") %>'
                            ID="RadDatePickerStarts" runat="server">
                        </telerik:RadDateTimePicker>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <telerik:RadDateTimePicker ClientIDMode="Static" SelectedDate='<%# Bind("Starts") %>'
                            ID="RadDatePickerStarts" runat="server">
                        </telerik:RadDateTimePicker>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ends" SortExpression="Ends">
                    <EditItemTemplate>
                        <telerik:RadDateTimePicker ClientIDMode="Static" SelectedDate='<%# Bind("Ends") %>'
                            ID="RadDatePickerEnds" runat="server">
                        </telerik:RadDateTimePicker>
                        <asp:CompareValidator ID="CompareValidator1" runat="Server" ControlToCompare="RadDatePickerStarts"
                            ControlToValidate="RadDatePickerEnds" Operator="GreaterThan" ErrorMessage="Date range is not valid "
                            Display="Dynamic" />
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <telerik:RadDateTimePicker ClientIDMode="Static" SelectedDate='<%# Bind("Ends") %>'
                            ID="RadDatePickerEnds" runat="server">
                        </telerik:RadDateTimePicker>
                        <asp:CompareValidator ID="CompareValidator1" runat="Server" ControlToCompare="RadDatePickerStarts"
                            ControlToValidate="RadDatePickerEnds" Operator="GreaterThan" ErrorMessage="Date range is not valid "
                            Display="Dynamic" />
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <telerik:RadDateTimePicker ClientIDMode="Static" SelectedDate='<%# Bind("Ends") %>'
                            ID="RadDatePickerEnds" runat="server">
                        </telerik:RadDateTimePicker>
                    </ItemTemplate>
                </asp:TemplateField>
Maria Ilieva
Telerik team
 answered on 04 Jan 2012
2 answers
98 views
I have the following code:
void Application_BeginRequest(object sender, EventArgs e)
{
    var culture = Culture.GetBrowserOrDefaultCulture();
    culture.DateTimeFormat.ShortTimePattern = "HH:mm:ss";
    culture.DateTimeFormat.LongTimePattern = "HH:mm:ss";
    Thread.CurrentThread.CurrentCulture = culture;
    Thread.CurrentThread.CurrentUICulture = culture;
}

For instance, I set US culture in my browser. Everything changes accordingly in my page output.
However, RadDateTimePicker keeps showing datetime in some specific - I guess, OS-defined, format and does not care this setting.

How to fix this?

I just want it to pick up the culture, set for the thread - I don't want to write special code for every RadDateTimePicker on my pages - I have tons of them!
Alexander
Top achievements
Rank 1
 answered on 04 Jan 2012
0 answers
103 views
Hi!,
Here it is, my very 1st thread :D. so be patient please lol...(i´m not very good at english either so...)

ok....i have a form with a RadGrid in it...wich i´m using as a control (ascx2)..called from another page(ascx1).
when i use <UpdatePanel> in ascx1, RadNumericTextBox contents in ascx2, let users imput alphanumeric characters beside numbers..i realized that about 2 seconds later, the RadNumericTextBox clean data leaving numbers only...but i would like to know if is there any way to show warning icon, just like RadNumericTextBox works normally..
here's the code:

ascx1:
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="VB" AutoEventWireup="true" CodeBehind="ReceptionsUserControl.ascx.vb" Inherits="TelerikTests.ReceptionsUserControl" %>
<%@ Register Assembly="Telerik.Web.UI, Version=2010.3.1109.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
             Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
            <asp:UpdatePanel ID="pnl_Receptions" runat="server" >
            <ContentTemplate>
<telerik:RadGrid ID="tlk_Grid" OnNeedDataSource="tlk_Grid_NeedDataSource" AllowSorting="True" PageSize="15"
    AllowPaging="True" runat="server" AutoGenerateColumns="false"  Skin="Sunset" AllowMultiRowSelection="false" >
    <PagerStyle Mode="NextPrevAndNumeric" />
    <MasterTableView Width="100%" DataKeyNames="OrderNumber" >
        <Columns>
            <telerik:GridBoundColumn DataField="OrderNumber" HeaderText="N° Pedido" />
            <telerik:GridBoundColumn DataField="OrderDescription" HeaderText="Descripción" />
            <telerik:GridBoundColumn DataField="WareHouseFrom" HeaderText="Almacén Emisor" />
            <telerik:GridBoundColumn DataField="DeliveredDate" HeaderText="Fecha Entrega" />
            <telerik:GridBoundColumn DataField="OrderSenderfullname" HeaderText="Autorizado Por" />
            <telerik:GridEditCommandColumn HeaderText="Recibir" ButtonType="ImageButton" />
        </Columns>
        <PagerStyle Mode="NextPrevAndNumeric" />
 
  <EditFormSettings EditFormType="WebUserControl" UserControlName="~/_ControlTemplates/CtrlTlkGridDetail.ascx" />
    </MasterTableView>
    <ClientSettings Selecting-AllowRowSelect="true" EnableRowHoverStyle="true" />
</telerik:RadGrid>
</ContentTemplate>
</asp:UpdatePanel>
 
 
ascx2:
<table width="50%" style="position: relative; margin-left: 234px;">
    <tr>
        <td colspan="2" style="text-align: center">
            <telerik:RadGrid ID="tlk_GridDetail" runat="server" Width="100%" AllowFilteringByColumn="True"
                AutoGenerateColumns="false" Skin="Sunset" AllowPaging="true" PageSize="8">
                <MasterTableView CommandItemDisplay="None" AllowFilteringByColumn="false" DataKeyNames="strProductCode"
                    Width="100%" PagerStyle-AlwaysVisible="true">
                    <Columns>
                        <telerik:GridBoundColumn UniqueName="strProductCode" DataField="strProductCode" HeaderText="Cod. Artículo"
                            FilterControlWidth="25%" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                        <telerik:GridBoundColumn UniqueName="strProductName" DataField="strProductName" HeaderText="Descripción"
                            FilterControlWidth="25%" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                        <telerik:GridNumericColumn UniqueName="dblSentQuantity" DataField="dblSentQuantity"
                            HeaderText="Cant. Solicitada" FilterControlWidth="25%" HeaderStyle-HorizontalAlign="Right"
                            ItemStyle-HorizontalAlign="right" NumericType="Number" DataFormatString="{0:N}"  />
                        <telerik:GridTemplateColumn UniqueName="strReceivedQuantity" HeaderText="Cant. Recibida"
                            ItemStyle-Width="25%" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="right">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox ID="txt_ReceivedQuantity" runat="server" Value='<%# DataBinder.Eval( Container.DataItem, "dblSentQuantity" ) %>'>
                                    </telerik:RadNumericTextBox>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <PagerStyle Mode="NumericPages" />
                </MasterTableView>
                <ClientSettings Selecting-AllowRowSelect="true" EnablePostBackOnRowClick="true">
                </ClientSettings>
                 
            </telerik:RadGrid>
        </td>
    </tr>
  <tr>
  <td><br />
  <div class="RadGrid_Sunset" style="width: 100%">
        <table class="RadGrid_WebBlue rgMasterTable" cellspacing="0" style="width: 100%">
            <tr>
                <th class="RadGrid_Sunset rgHeader" colspan="2">
                    Resumen Orden Nro:
                    <label id="lbl_OrderNumber" runat="server"></label>
                </th>
            </tr>
            <tr class="RadGrid_Sunset rgRow">
                <td>
                    Condiciones Higiénicas de la Cava:
                </td>
                <td>
                <asp:DropDownList ID="ddl_WHTrailerConditions" runat="server" Width="62%">
                <asp:ListItem Text="Buena" Value="0"></asp:ListItem>
                <asp:ListItem Text="Regular" Value="1"></asp:ListItem>
                <asp:ListItem Text="Mala" Value="2"></asp:ListItem>
                </asp:DropDownList>                   
                </td>
            </tr>
            <tr class="RadGrid_Sunset rgAltRow" >
                <td>
                    Estado del Termoking
                </td>
                <td>
                   <asp:DropDownList ID="ddl_TermokingSatus" runat="server" Width="62%">
                <asp:ListItem Text="Prendido" Value="0"></asp:ListItem>
                <asp:ListItem Text="Apagado"  Value="1"></asp:ListItem>
                   </asp:DropDownList>
                </td>
            </tr>
             <tr class="RadGrid_Sunset rgAltRow">
                <td>
                   Temp. Registrada en el Termoking:
                </td>
                <td>
                    <telerik:RadNumericTextBox ID="txt_TermokingTemperature" runat="server"  NumericType="Number" EnabledStyle-HorizontalAlign="Right"  />
                    Â°F
                </td>
            </tr>
             <tr class="RadGrid_Sunset rgAltRow">
                <td>
                   Temp. Registrada en el Producto Recibido:
                </td>
                <td>
                    <telerik:RadNumericTextBox ID="txt_ReceivedProduct" runat="server"  NumericType="Number" EnabledStyle-HorizontalAlign="Right" />
                    Â°F
                </td>
            </tr>
        </table>
    </div>
  </td>
  </tr>
    <tr>
        <td colspan="2" style="text-align: center"><br />
            <asp:ImageButton ID="btnAceptar" runat="server" CommandName="PerformInsert" ImageUrl="~/_layouts/images/done.png"
                Width="24px" />
                
            <asp:ImageButton ID="btnCancelar" runat="server" CommandName="Cancel" ImageUrl="~/_layouts/images/cancel.png"
                Width="24px" />
        </td>
    </tr>
</table>
THANKSSSSS!!!!

Melizabeth
Top achievements
Rank 1
 asked on 04 Jan 2012
3 answers
88 views
Hi we noticed an issue that we think has to do with the implementation of RadEditor Light.  The issue has to do with Alerts on lists and what that content contains when alerts are sent.
When a list item is modified the expected behaviour is that subsequent alerts will let you know what was changed and what wasn't changed.  please view this link for the screen shot..

screen shot 1

You will notice that "Notes" was changed and thus you get the line across the old content + the new content.  The other columns such as Details (which at this time is using regular SharePoint Rich Text Editor) does not show anything, because nothing has changed.

upon changing the rich text editor to a Moss Radeditor Light,
screen shot 2
You can see that we're not changing anything , and that it is indeed using a rad editor. When we hit ok, and email gets sent that has this unexpected behaviour

unexpected behaviour

as you can see, even if we dont' make any modifications, the fields that use rad editor light will always have the "edited" tag as well as the line across the old text.  This seems like bug to me, and I want to know how and if there is a fix for this issue... thanks


Charles

Rumen
Telerik team
 answered on 04 Jan 2012
1 answer
135 views
I'm experiencing the following issue on a very simple and basic code:
The radmenu OnClientItemClicked is not fired only on firefox (ver.7)
On all the other browser it's working as expected.

the RadMenu is empty and the items are added in code-behind:

RadMenuItem rmiItem = new RadMenuItem();
rmiItem .Text = "Menu Voice Text";
rmiItem .Value = "http://www.someurl.com";
//rmiItem .NavigateUrl = "#";
rmMainMenu.Items.Add(rmiItem );

and here is the radmenu in the aspx page:


<telerik:RadMenu ID="rmMainMenu" runat="server" Skin="Office2007" OnClientItemClicked="OnClientItemClicked" Width="100%">
<Items>
</Items>
</telerik:RadMenu>


once the user click over the menu item the following javascript is executed:

<script type="text/javascript">
    function OnClientItemClicked(sender, eventArgs) {
        var item = eventArgs.get_item();
        submitTo(item.get_value());
    }
 
    function submitTo(url) {
        form2.action = url;
        form2.submit();
    }
 
</script>

In IE7, IE8, Chrome and Safari, everything works as expected and the user is redirected to the page specified in the Value attribute of the RadMenu.
Only in Firefox, instead it does nothing, except that putting a # at the end of the URL (is not a postback)

Please note that this code is used to perform a POST submit of data to a different URL so, for this reason I haven't used the property NavigateURL.
In any case it works in the other browser so it's something wrong with RadMenu and Firefox.

Any help is appreciated.
Thanks
Marco

marco
Top achievements
Rank 2
 answered on 04 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?