Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
133 views
Hi Team,

I have one project use RadMenu ajax Q2,  Webservices rended in itemstemplate and item (template modes). The normal way using webservices is use skins and default radMenuItems. How to manage webservices rended in a templated Radmenuitem (itemtemplate and item). Thanks.

normal way : rended in sking and default mode
<telerik:RadMenuItem Text="MostPopular" Value="1" ExpandMode="WebService">
</telerik:RadMenuItem>

templated way?
<telerik:RadMenuItem Text="MostPopular" Value="1" ExpandMode="WebService">
                            <Items>
                                <telerik:RadMenuItem CssClass="" >
                                    <ItemTemplate>
                                        <a href="#"><span class="mp-logo"></span>
                                        <span class="item-title"></span></a>
                                     </ItemTemplate>
                                </telerik:RadMenuItem>
                            </Items>   
                        </telerik:RadMenuItem>

Added :
Vaselin Enchev/Atanas Korchev have suggest use templates and ajax4 implementation like this samples similary to jquery templates method. I have tested. Can suggest the best way to implement in RadMenu using Q2 ?

Regards
Pierre
Top achievements
Rank 1
 asked on 06 Jan 2011
2 answers
117 views
Im in version 2010.3.1215.35 using IE 8.

Even though I have disabled my Delete LinkButton in the ItemDataBound event, and it looks disabled, I am still able to click it, which prompts me with the delete comfirmation message. When I click to confirm, it deletes my record.

Here's my code behind where I disable the LinkButton

protected void RadGridWorkRequestAsset_ItemDataBound(object sender, GridItemEventArgs e)
{
            //Other code here
  
            if (e.Item is GridDataItem)
            {
                var editItem = ((GridDataItem)e.Item);
                var deleteButton = (LinkButton)editItem["DeleteColumn"].Controls[0];
  
                if (deleteButton != null)
                {
                    deleteButton.Enabled = false;
                }                 
             }
  
            //Other code here
}


Here's my LinkButton on the ASCX page:
<telerik:GridClientDeleteColumn ConfirmText="Delete this record?" ButtonType="LinkButton"  UniqueName="DeleteColumn" ConfirmTitle="Delete" ConfirmDialogType="Classic" CommandName="Delete">
</telerik:GridClientDeleteColumn>

I will also create a ticket so I can send you a small sample project to duplicate the problem.
Just posting for the forum users.

See attached screen shot.
Kellie
Top achievements
Rank 1
 answered on 06 Jan 2011
0 answers
116 views
I have a RadComboBox inside a RadXmlHttpPanel.In the ServiceRequest method i set the selectedvalue of the combobox to a new value but the selectedvalue is not updated.

<telerik:RadXmlHttpPanel ID="mainRadXmlHttpPanel" runat="server" OnServiceRequest="main_ServiceRequest"
  RenderMode="Block" LoadingPanelID="RadAjaxLoadingPanel1" EnableClientScriptEvaluation="true"                     Width="117%">
<telerik:RadComboBox ID="mainShipCb" runat="server" Width="150px"> </telerik:RadComboBox>                                        
 </telerik:RadXmlHttpPanel>

CodeBehind :
protected void main_ServiceRequest(object sender, RadXmlHttpPanelEventArgs e)
   {
        mainShipCb.SelectedValue = "Some Value";
 
   }
abasi
Top achievements
Rank 1
 asked on 06 Jan 2011
2 answers
193 views
If I set the width of a column in the master table view (using HeaderStyle.Width) and then set the width again to something different, the width doesn't change and seems to get stuck at the first width that had been set. (this is using TableLayout=Fixed and UseStaticHeaders=true, and AutoGenerateColumns=true)

Is there any way to clear the columns completely in the master table view so they are recreated when autogenerating new columns?

Philip
Top achievements
Rank 1
 answered on 06 Jan 2011
2 answers
156 views

I have successfully added a radeditor control inside a server compositecontrol:

protected override void CreateChildControls() 
  
    Controls.Clear(); 
    _txtBox = new TextBox(); 
    _txtBox.ID = "txtEdit"; 
   _edrBox = new RadEditor();
    _edrBox.ID = "edrEdit";
     
    _txtBox.TextChanged += new EventHandler(txtBox_TextChanged); 
    _edrBox.ValueChanged += new EventHandler(edrBox_ValueChanged); 
    this.Controls.Add(_txtBox); 
    this.Controls.Add(_edrBox); 
  }

But the problem is, when the server control is placed inside a formview and that formview is ajaxified by a radgrid (ie, in a master/detail relationship, clicking a row on the radgrid should refresh the details inside a formview), an Ajax javascript error shows up that a null reference is detected at the time of sys.load????

Attached is the javascript code (from microsoft ajax) showing the error where variable a is NULL.

Jun
Top achievements
Rank 1
 answered on 06 Jan 2011
1 answer
139 views

Before to begin Ajax request (async postback), I execute JavaScript function, which validate and correct values of the form (removes hyphens from telephone number). Call of alert() shows that value of a field has changed. However, to the server transferred not changed value of a field (old value - before correction).

Example: I typed '55-55-55' in field and clicked button. Value of a field changes on '555555', but to the server transferred old value (before correction) - '55-55-55'. I need to transfer the corrected value. How it to make?

<%@ Page Language="C#" AutoEventWireup="true" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
  
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <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">
      function formAdjustBeforeSubmit(sender, args) {
        var input = document.getElementById("phoneTextBox");
        //debugger;
        var val = input.value.replace(/-/g, "");
        input.value = val;    // Here we modified value of a field (remove '-' from phone number)
        alert(input.value);
      }
  </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" ClientEvents-OnRequestStart="formAdjustBeforeSubmit">
    <AjaxSettings>
      <telerik:AjaxSetting AjaxControlID="Panel1">
        <UpdatedControls>
          <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelHeight="" />
        </UpdatedControls>
      </telerik:AjaxSetting>
    </AjaxSettings>
    </telerik:RadAjaxManager>
  <asp:Panel ID="Panel1" runat="server">
    Phone: <asp:TextBox ID="phoneTextBox" runat="server" ClientIDMode="Static" />  
    <asp:Button ID="Button1" runat="server" Text="Save" style="margin-left:20px;"/>
  </asp:Panel>
</form>
  
</body>
</html>
Maria Ilieva
Telerik team
 answered on 06 Jan 2011
2 answers
72 views
I have a RadGrid that binds to a web service which pulls data from a SQL database. There is a Workflow that inserts records into the database which are displayed in the RadGrid, but I've noticed that when new records are inserted into the database from Workflow that the page index is reset to the first page. So, two questions: First, is this typical behavior for the RadGrid or did I do something on my own to cause this? Second, if this is typical behavior, is there anything I can do to maintain the page that I was on when the new record was inserted into the table?

Thx in advance!
Mike
Top achievements
Rank 1
 answered on 06 Jan 2011
1 answer
71 views
 <telerik:GridTemplateColumn DataField="GamePrice" HeaderText="Price" SortExpression="GamePrice"
                                    HeaderStyle-HorizontalAlign="Center" UniqueName="GamePrice" AutoPostBackOnFilter="True"
                                    FilterControlWidth="40px" ShowFilterIcon="false" CurrentFilterFunction="Contains">
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem, "GamePrice", "{0:C}")%>
                                        <%--<asp:Label ID="lblGamePrice" runat="server" Text='<%#  Eval("GamePrice")%>'></asp:Label>--%>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtGamePrice" runat="server" onkeydown="return isNumericPrice(event.keyCode);"
                                            TabIndex="5" Text='<%# Eval("GamePrice")%>'></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="reqFieldValGamePrice" runat="server" ErrorMessage="RequiredFieldValidator"
                                            ControlToValidate="txtGamePrice" Text="Please enter Game price."></asp:RequiredFieldValidator>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>

Hello i want to find the value in itemtemplate

  if (e.CommandName == "Edit")
            {
                if (ds != null)
                {
                    grdGameInfo.DataSource = ds;
                    grdGameInfo.DataBind();


                    GridDataItem eItem = (GridDataItem)e.Item;
                    string gameGID = Convert.ToString(((Label)eItem.FindControl("lblGameGID")).Text);
                    string oldGameName = Convert.ToString(((Label)eItem.FindControl("lblGameName")).Text);
                  string oldGamePrice = Convert.ToString(e.Item.DataItem );

but oldgameprice contains null..

How find ?


                 

Pavlina
Telerik team
 answered on 06 Jan 2011
1 answer
63 views
Even in your second example of your demos page "Yahoo-style scrolling" i'm experiancing the problem : http://demos.telerik.com/aspnet-ajax/grid/examples/client/virtualscrollpaging/defaultcs.aspx 

while scrolling the bar with dragging, updates the records well, update panel is also working fine. but if i scroll the grid by scroll button down to the end, the update panel just blinks and seems to lose it's visibility, the records get updated after a while. By the time the update panel is lost and the grid refreshes with the newer records, neither client nor server events can be fired...

Exactly the same problem i'm having here, using IE8. But in Chrome it works perfectly fine...

Any solutions to this???
Mira
Telerik team
 answered on 06 Jan 2011
2 answers
95 views
When I'm not in debug mode on my machine, I am not able to test the functionality of the menu control due to a javascript error (I've seen another post detailing this limitation). I need to be able to do this to ensure that this control works on a Blackberry browser before I'll be able to make a case for buying the control for my company. Is there any way around this problem?

Thank you.
Alex
Top achievements
Rank 1
 answered on 06 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?