Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
93 views
Hi,

I am using a Radtabstrip with 2 tabs in which I am showing 2 user control and both are having Radgrid and I am trying to add ajax manger to it. One of my user control is already having RadAjaxManagerProxy. When I click on tabs, the user control without ajax manger is coming but the one with ajax manager doesn't come up.
Is this because the grid is having multiple ajax manager?
Pavlina
Telerik team
 answered on 23 Dec 2010
1 answer
162 views
We need to upgrade our existing Telerik.Web.UI.dll to the latest release because IE9 users get 'undefined' when clicking on the radbuttons and the new Telerik.Web.UI.dll seems to take care of that issue.  The last time we deployed a new Telerik.Web.UI.dll to our production servers, every customer had to clear their cookies/cache before they were able to use our site properly.  We would like to avoid the disruption to our site, not to mention the thousands of calls to our technical support line.  Is there a way to avoid this?  What is the proper way to deploy the new Telerik.Web.UI.dll?
Sebastian
Telerik team
 answered on 23 Dec 2010
1 answer
78 views
I am having an issue where the progress area does not display when uploading very large files.  From the same page I attempt to upload a 300MB file and the progressarea will display correctly, but if submitting a very large file like 3Gb file to the same page no progress indicator is displayed.  

I have brought my code down to the basics as shown below and still the exact same results.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
   </telerik:RadScriptManager>
 
   <telerik:RadUpload ID="RadUpload1" runat="server" />
   <telerik:RadProgressArea ID="RadProgressArea1" runat="server" />
   <telerik:RadProgressManager ID="RadProgressManager1" runat="server" />
   <asp:Button ID="Button1" runat="server" Text="Submit" />

The web.config is set correctly for large file sizes as when pressing submit with a very large file selected will still upload the file without error, only the progress area is not displayed.

Any help would be appreciated..

Thanks,
Bobby
Genady Sergeev
Telerik team
 answered on 23 Dec 2010
3 answers
139 views
I have this simple case where I'm using a simple automatic editing functionality of the RadGrid but the only filed that is allowed in edit mode is more like a memo and I need it's height and width expanded. I'm not using any templates here. Kindly see attached screen.

<asp:Panel runat="server" ID="PanelGrid" Width="630px">
  <fieldset id="fieldGrid" style="width: 608px;">
    <legend>Notes History</legend>
    <telerik:RadGrid ID="RadGridJobs2" runat="server" AutoGenerateColumns="False" AllowPaging="True" GridLines="None"
      Width="608px" Skin="Office2007" SkinID="RadGrid_Paging_Page20_NoExport_Add" AllowAutomaticDeletes="false"
      AllowAutomaticInserts="True" DataSourceID="LinqDataSourceNotes" OnUpdateCommand="RadGridJobs2_UpdateCommand">
      <MasterTableView DataKeyNames="OID" DataSourceID="LinqDataSourceNotes" GridLines="None" CommandItemDisplay="Top">
        <Columns>
          <telerik:GridBoundColumn DataField="NoteDetails" HeaderText="Note" SortExpression="NoteDetails" UniqueName="columnNoteDetails"
            Visible="false" />
          <telerik:GridTemplateColumn UniqueName="columnNewNote" HeaderText="Note History">
            <ItemTemplate>
              <table cellspacing="0" cellpadding="0" width="100%" border="0" class="TableNoBorders">
                <tr>
                  <td>
                    <%# "<div><span style='font-weight: bold; '>By </span><span style='font-style: italic; '>" + Eval("User.FirstName") + " " + Eval("User.LastName") + "</span><span style='font-weight: bold; '> on </span><span style='font-style: italic; '>" + Eval("NoteDate", "{0:dd-MMM-yyyy hh:mm tt}") + "</span></div>"%>
                  </td>
                </tr>
                <tr>
                  <td>
                    <%# "<div style='font-weight: bold; '>Note: </div>" + Eval("NoteDetails")%>
                  </td>
                </tr>
              </table>
            </ItemTemplate>
          </telerik:GridTemplateColumn>
          <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="10px" ItemStyle-Width="10px" />
          <telerik:GridClientDeleteColumn ButtonType="ImageButton" HeaderStyle-Width="10px" ItemStyle-Width="10px"
            Visible="false" />
        </Columns>
        <CommandItemSettings AddNewRecordText="New Note" />
        <EditFormSettings>
          <EditColumn ButtonType="ImageButton" />
        </EditFormSettings>
      </MasterTableView>
    </telerik:RadGrid>
  </fieldset>
</asp:Panel>

protected void RadGridJobs2_UpdateCommand(object source, GridCommandEventArgs e) {
  var editableItem = ((GridEditableItem)e.Item);
  var editNoteID = (long)editableItem.GetDataKeyValue("OID");
 
  //retrieve entity form the Db
  var editNote = DbContext.Notes.Where(nut => nut.OID == editNoteID).FirstOrDefault();
  if (editNote != null) {
    try {
      //update entity's state
      editableItem.UpdateValues(editNote);
 
      //submit changes to Db
      DbContext.SubmitChanges();
 
    } catch (Exception ex) {
 
    }
  }
}
Iana Tsolova
Telerik team
 answered on 23 Dec 2010
1 answer
74 views
hello
I have radwindow which through which I select a row and click on a link button to open another radwindow.
In that radwindow I update a column & save the changes.I've used a radlist box to do so.
But what i want to do is when the user makes changes to the column & if he clicks on 'X' (close option)of the window, he should be asked to
either wait & save the column (by keeping the current window open)or close the curent window without saving the changes.

I figured a way out to display a message using 'confirm' of javascript but i am not able to keep the window open.

So can anybody help me out

Thanks in advance
 Soham Patel
Georgi Tunev
Telerik team
 answered on 23 Dec 2010
4 answers
146 views


Hi Everyone

I am having trouble with a RequiredField Validator for a ComboBox in Edit Form.

This is the scenario:

I have a grid with 3 columns:
1 TemplateColumn with a ComboBox as its EditItemTemplate
2 GridNumericColumns

 

I’ve placed OnBlur and OnFocus events on the two NumericColumnEditors.

I’ve Placed a Compare Field Validator for the comboBox

I’ve also disabled the ComboBox when it is in the Edit form.

 

Now, this works fine when I am in the Insert Form but when I hit the edit command  I get this error:

 

htmlfile: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.


This is the JSCode:


var oldValue;
function Focus(sender, eventArgs)
{
     oldValue = sender.get_value();
}
              
function Blur (sender, eventArgs)
{
    if ( sender.get_value() < 0)
    {
         radalert('El valor no puede ser negativo',200,100,'Alerta');
         sender.set_value(oldValue);
    }                                    
}

Markup:

<Columns>
      
    <telerik:GridTemplateColumn UniqueName="LINEA" HeaderText="Linea ISA" AllowFiltering="False">
        <ItemTemplate>
            <asp:Label ID="LIN" runat="server" Width="80px">
                   <%# DataBinder.Eval(Container.DataItem, "LINEA")%>
            </asp:Label>
        </ItemTemplate>
        <EditItemTemplate>
            <telerik:RadComboBox DataTextField="EQUIPO" DataValueField="EQUIPO" EnableLoadOnDemand="True"
                ID="RadCmbBx_Linea" runat="server" MarkFirstMatch="True" OnSelectedIndexChanged="RadCmbBx_Linea_SelectedIndexChanged"
                AutoPostBack="true">
            </telerik:RadComboBox>
            <asp:CompareValidator ValueToCompare="Select..." Operator="NotEqual" ControlToValidate="RadCmbBx_Linea"
                ErrorMessage="You must select a city!" runat="server" ID="Comparevalidator1" />
        </EditItemTemplate>
    </telerik:GridTemplateColumn>
      
    <telerik:GridNumericColumn DataField="ENERGIA_ACTIVA_HOY" UniqueName="ENERGIA_ACTIVA_HOY" HeaderText="Energia Hoy" />
      
    <telerik:GridNumericColumn DataField="ENERGIA_REACTIVA_HOY" UniqueName="ENERGIA_REACTIVA_HOY" HeaderText="Energia Hoy ReActiva" />
      
</Columns>

CodeBehind:

protected void RgridLineasISA_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem && (e.Item.IsInEditMode))
    {
        RadComboBox comboLinea = e.Item.FindControl("RadCmbBx_Linea") as RadComboBox;
        comboLinea.DataSource = new OES.Business.Equipo().ListLineasISA(); 
        comboLinea.DataBind();
        comboLinea.Items.Insert(0, new RadComboBoxItem("Select..."));
  
        if ((e.Item as GridEditableItem).IsInEditMode && (e.Item as GridEditableItem).IsDataBound && e.Item.ItemIndex != -1)
        {
            comboLinea.SelectedValue = ((OES_LineasISA)e.Item.DataItem).LINEA.ToString();
            comboLinea.Enabled = false;
    }
}
  
    protected void RgridLineasISA_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && (e.Item.IsInEditMode))
        {
            GridNumericColumnEditor editorEnerActHoy = (GridNumericColumnEditor)e.Item.EditManager.GetColumnEditor("ENERGIA_ACTIVA_HOY");
            editorEnerActHoy.NumericTextBox.ClientEvents.OnBlur = "Blur";
            editorEnerActHoy.NumericTextBox.ClientEvents.OnFocus = "Focus";
  
            GridNumericColumnEditor editorEnerReactHoy = (GridNumericColumnEditor)e.Item.EditManager.GetColumnEditor("ENERGIA_REACTIVA_HOY");
            editorEnerReactHoy.NumericTextBox.ClientEvents.OnBlur = "Blur";
            editorEnerReactHoy.NumericTextBox.ClientEvents.OnFocus = "Focus";
        }
    }


The exception is due to the CompareValidator, if I remove it then it works, but I need it in order to validate the ComboBox selected item.

How can I get rid of this execption?

Thanks!
Miguel

Nikolay Rusev
Telerik team
 answered on 23 Dec 2010
1 answer
105 views
Hi,

I wonder if there is anyone who knows how to detect an IFrame breakout condition.

Under the example http://demos.telerik.com/aspnet-ajax/window/examples/default/defaultcs.aspx :

If one selects 'Open New Window' with a URL that has IFRAME breakout detection then the site opens in the main window instead of the newly created RadWindow. I understand there isn't really a way to prevent this however I'm wondering if there's a way to detect it and prevent the main page loading this URL. I would prefer an alert message that tells the user one will navigate away from the page.

The javascript below is not the ideal solution as this confirmation is called on every page refresh, back button etc.
window.onbeforeunload = function () {
       return "This will take you away?";
}

An example of a site with IFRAME breakout detection is  www.k1664.com



Thanks
Georgi Tunev
Telerik team
 answered on 23 Dec 2010
1 answer
102 views
I have the following code
<table cellpadding="0" cellspacing="0" width="100%">
        <tr>
              
           <td>
           <asp:Panel ID="ListViewPanel1" runat="server">
        <telerik:RadListView ID="RadListView1" Width="100%" AllowPaging="True" runat="server" PageSize="9" 
            AllowSorting="true" OnNeedDataSource="RadListView1_NeedDataSource" ItemPlaceholderID="ProductsHolder"
           >
            <LayoutTemplate>
                <fieldset  id="FieldSet1" style="border:none;  padding-left :30px;">
                 
                <asp:Panel ID="ProductsHolder" runat="server" />
                
                </fieldset>
            </LayoutTemplate>
            <ItemTemplate>
             <div class="category">
          <table cellpadding="0" cellspacing="0"  >
                        <tr><td>
                <a  style='cursor:pointer;' href='<%# DetermineLink(Eval("id"), Eval("center"))%>'>
                                  <img src='<%#DetermineImage(Eval("id"), Eval("center"))%>'  border='0' hspace='0' width='<%#Eval("w")%>' height='<%#Eval("h")%>' align="middle"/>
                                  </a>
  
                        </td></tr>
                        <tr>
                              
                            <td >
                                <%#Mid(Eval("Title"), 1, 25)%>
                            </td>
                        </tr>
                        <tr><td><br /></td></tr>
                    </table>
            </div>
            </ItemTemplate>
        </telerik:RadListView>
    </asp:Panel>
           </td>
           <td valign="middle" align="center" >
 
              <telerik:RadDataPager ID="RadDataPager1" runat="server" 
                   PagedControlID="RadListView1"  PageSize="9" Height="430px" 
                   Width="16px"   >
                    
                    <Fields >
                  
                    <telerik:RadDataPagerSliderField  SliderDragText="" SliderDecreaseText="" SliderIncreaseText=""  SliderOrientation ="Vertical"  />
   
                    </Fields>
                    
                </telerik:RadDataPager>
                 
            </td>
              
        </tr>
    </table>

I am  using RadDataPagerSliderField   with this css style

.RadDataPager_Default
{
    border:none;
    background-color:Transparent;
    width:5px;
     padding-left : 45px;
     min-height:200px;
}
  
  
  
.RadDataPager_Default  .rdpSliderLabel
{
        display: none ;
        
}
.RadSlider_Default .rslTrack
        {
            border-color: #b9b9b9 #939393 #939393 #b9b9b9;
              
            height: 400px !important;
        }
.RadSlider .rslVertical .rslIncrease 
        {
            bottom: -250px !important;
        }
  
.RadSlider_Default .rslVertical a.rslHandle
{
    
      
    background-image:url('Slider/HandlesVertical.gif');
}
  
.RadSlider_Default .rslVertical a.rslDraghandle
{
     
    background:url('Slider/DragVerticalHandleRight.gif') no-repeat;
}


On my computer i am able to slide the navigation bar on click on the horizontal arrow it will go to the next page. But on other computer they can only navigate using the up and down arrows, they cant slide it. What is the reason?I need it to work on all pcs
Pavlina
Telerik team
 answered on 23 Dec 2010
1 answer
132 views
Hi everybody,

Hope you can help me... i'm going crazy with this one :S

I use a GridTemplateColumn defined as  DataType="System.DateTime". When I use isNull option in the grid filter, returns me the error: 
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: String was not recognized as a valid DateTime.

How can I solve this problem? Can anyone help me?
Thanks,
Nuno
Princy
Top achievements
Rank 2
 answered on 23 Dec 2010
1 answer
61 views
After setting content in a RadEditor control through client side script and then clicking inside the RadEditor content area, I have to type additional text before the Back or Delete buttons will work. Anyone else seen this behavior?
Rumen
Telerik team
 answered on 23 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?