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

The problem I have is related to the RadGrid pager which is displayed in two lignes. I want to have it on one line. Do you have any suggestions to resolve this problem.
Please see the attached file.
Princy
Top achievements
Rank 2
 answered on 16 May 2014
32 answers
2.4K+ views
To whom it may concern:

Extremely weird, I try to add and remove user controls in an ASP Panel of the content page depending on an Ajax request from the navigation bar. There is no problem to load user controls dynamically in the code. However, when the user selects through the navigation bar, an Ajax request is sent to the content page wrapped in an Ajax panel for updating. At this point the last loaded user control is removed, and the user selected user control is added to the ASP Panel. All good, but JavaScript wrapped inside RadCodeBlock on the latest selected user control is not loaded. One thing worthwhile mentioning is that I load the second user control in the PreRender because AjaxRequest was triggered after the Load event and I need to flag the second control in the AjaxRequest handler for loading. I even try to use RegisterClientScriptBlock to register those JavaScripts in the code behind, but still doesn't work.

William Feng
Tonino
Top achievements
Rank 1
 answered on 16 May 2014
4 answers
258 views
function OnClientFileSelected(sender, args) {
    if ($telerik.isIE) {
        var input = args.get_fileInputField();
        if (sender.isExtensionValid(input.value)) {
            var img = document.createElement("img");
            var thumbnail = document.getElementById("thumbnail");
            thumbnail.appendChild(img);
            if (img) {
                img.style.visibility = "";
                img.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = input.value;

            }
        }
    }
    else {

        var file = args.get_fileInputField().files.item(args.get_rowIndex()); 
        if (!file) {
           showThumbnail(droppedFile);
        }
        else {
            showThumbnail(file);
        }
    }

}



function showThumbnail(file) {


    var image = document.createElement("img");
    var thumbnail = document.getElementById("thumbnail");
    image.file = file;
    thumbnail.appendChild(image);

    var reader = new FileReader()
    reader.onload = (function (aImg) {
        return function (e) {
            aImg.src = e.target.result;
        };
    }(image))
    var ret = reader.readAsDataURL(file);
    var canvas = document.createElement("canvas");

    ctx = canvas.getContext("2d");
    image.onload = function () {
        ctx.drawImage(image, 100, 100);
    }

}

 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                        <telerik:RadAsyncUpload ID="UploadImage" runat="server" 
                            
                            onfileuploaded="UploadImage_FileUploaded"   
                            MultipleFileSelection="Disabled"
                            OnClientFileSelected="OnClientFileSelected"
                            OnClientFileUploadRemoved="OnClientFileUploadRemoved"
                            MaxFileInputsCount="1"
                            AllowedFileExtensions="jpg,jpeg,png,gif" MaxFileSize="51200" 
                            ViewStateMode="Enabled">
                        </telerik:RadAsyncUpload>
                 </ContentTemplate>
             </asp:UpdatePanel>
I am using the above code to preview the uploaded image.but it is not working in IE .
This statement is returning null ."var input = args.get_fileInputField();"
Please help me .
Thanks in Advance
Plamen
Telerik team
 answered on 16 May 2014
1 answer
154 views
I have recently tried to change the forms authentication tag on my
web.config and i noticed that all the radmenus now have disappeared, i then
change back the web config and remove the domain attribute and they
work now normal.
Do anyone knows why this happens?


    <authentication mode="Forms">
      <forms name="appname" loginUrl="login.aspx" timeout="480" domain="domain.com" />
    </authentication>
Plamen
Telerik team
 answered on 16 May 2014
3 answers
167 views
Hi,
      I am using RadTimepicker. i have assigned the end time but the end time is not shown in the timevew of radtimepicker. please provide me a solution to show the End time in Timeview of radtimepicker.




Thanks
Shinu
Top achievements
Rank 2
 answered on 16 May 2014
7 answers
290 views

Hi,

      

 I have a radeditor  in my page. It works and looks fine in firefox and opera but it will display  in IE as an another control. I attached the screen shots of 3 browser.

Thanks

Velkumar

   

Ianko
Telerik team
 answered on 16 May 2014
3 answers
260 views
This pertains to version 2012.2.912.40 of the controls. Sorry I cannot update them.

I converted the edit and delete links in my grids to image buttons and now I get the following error when I click one of the buttons. 

  Multiple controls with the same ID 'EditButton' were found. FindControl requires that controls have unique IDs.

I have multiple grids in page views but they are all pretty much set up like this one just with different columns.
<telerik:RadGrid ID="grdPhones" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" CssClass="infoGrid" SkinID="TSSGridEditable">
   <MasterTableView>
      <Columns>
         <telerik:GridBoundColumn FilterControlAltText="Filter Number column" HeaderText="Number" UniqueName="phoneNumber" DataField="phoneNumber">
         </telerik:GridBoundColumn>
         <telerik:GridBoundColumn FilterControlAltText="Filter Type column" HeaderText="Type" UniqueName="phoneType" DataField="phoneType">
         </telerik:GridBoundColumn>
         <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditText="Edit" EditImageUrl="~/Images/tb_edit.gif" ButtonType="ImageButton" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25px" HeaderStyle-Width="25px">
         </telerik:GridEditCommandColumn>
         <telerik:GridEditCommandColumn UniqueName="DeleteCommandColumn" EditText="Delete" EditImageUrl="~/Images/delete16.gif" ButtonType="ImageButton" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25px" HeaderStyle-Width="25px">
         </telerik:GridEditCommandColumn>
      </Columns>
   </MasterTableView>
</telerik:RadGrid>

and the skin code but it's pretty simple

<telerik:RadGrid runat="server" SkinID="TSSGridEditable">
   <MasterTableView EditMode="PopUp" CommandItemDisplay="Top">
   </MasterTableView>
</telerik:RadGrid>

How do I get around this or is there a different way to implement images?

Shinu
Top achievements
Rank 2
 answered on 16 May 2014
5 answers
167 views
When an option in the panelbar is too long to fit on one line, it correctly wraps to a second line.

However, the CSS for the 'default' skin doesn't take that into account. It only highlights the 1st line. And since the text color is white, the text on the second line is not visible then (white on white).

This issue is not present in all color schemes. WebBlue for instance is just fine.

How can we fix this issue in the 'default' scheme?
Shinu
Top achievements
Rank 2
 answered on 16 May 2014
1 answer
109 views
I have a simple rad grid as follows:
class AssignBanGridCtrl : WebControl
   {
       #region Fields
       private RadAjaxLoadingPanel _RadLoadingPanel = new RadAjaxLoadingPanel();
       private UpdatePanel _UpdatePanel = new UpdatePanel();
       private RadGrid _RadGrid1 = new RadGrid();   
       private PriceDealProductBanTable _PriceDealProductBanTable = new PriceDealProductBanTable();
       private PriceDealProposal _Proposal = null;  
       private bool _HasOrderRequest = false;         
       #endregion
  
        #region Constructors
  
       public AssignBanGridCtrl(PriceDealProposal proposal, bool hasOrderRequest)
           : base()
       {
       }
  
       #endregion
  
      #region Overrides
  
       protected override void OnInit(EventArgs e)
       {
           base.OnInit(e);
  
           this._RadLoadingPanel.ID = "_RadLoadingPanel";
           this._RadLoadingPanel.Transparency = 30;
           this._RadLoadingPanel.Skin = "WebBlue";
           this._RadLoadingPanel.BackgroundPosition = AjaxLoadingPanelBackgroundPosition.Center;
  
           #region Grid1
           this._RadGrid1.ID = "_RadGrid1";
           this._RadGrid1.Skin = "WebBlue";
           this._RadGrid1.Width = Unit.Percentage(100);
           this._RadGrid1.GridLines = GridLines.None;
           this._RadGrid1.PageSize = 20;
           this._RadGrid1.AllowPaging = false;
           this._RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
           this._RadGrid1.AllowSorting = true;
           this._RadGrid1.AutoGenerateColumns = false;
           this._RadGrid1.EnableLinqExpressions = false;
           this._RadGrid1.ShowGroupPanel = false;
           this._RadGrid1.ShowStatusBar = true;
           this._RadGrid1.GroupingEnabled = true;
           this._RadGrid1.ClientSettings.DataBinding.EnableCaching = true;
           this._RadGrid1.MasterTableView.Width = Unit.Percentage(100);
           this._RadGrid1.MasterTableView.Caption = "BAN List";
           this._RadGrid1.MasterTableView.EnableHeaderContextMenu = true;
           this._RadGrid1.MasterTableView.NoMasterRecordsText = "No Locations found";
  
           this._RadGrid1.NeedDataSource += RadGrid1_NeedDataSource;
             
  
           this._RadGrid1.MasterTableView.DataKeyNames = new string[] { this.xyz.ColumnName };
             
           #region Columns
           GridBoundColumn boundColumn = new GridBoundColumn();          
           this._RadGrid1.MasterTableView.Columns.Add(boundColumn);
           boundColumn.DataField = this.xyz.ColumnName;;
           boundColumn.HeaderText = "Product";
  
           boundColumn = new GridBoundColumn();
           this._RadGrid1.MasterTableView.Columns.Add(boundColumn);
           boundColumn.DataField = this.xyz.ColumnName;
           boundColumn.HeaderText = "Location";
             
           #endregion
  
           #endregion
  
           this._UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Conditional;
           this._UpdatePanel.ContentTemplateContainer.Controls.Add(this._RadLoadingPanel);
           this._UpdatePanel.ContentTemplateContainer.Controls.Add(this._RadGrid1);
           this.Controls.Add(this._UpdatePanel);
         
       }
      
    #endregion
       void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
       {  
           this.xyz= new DealId().ExecuteTypedDataTable(this._Proposal.PriceDealId);  
       }
  
       protected override void OnPreRender(EventArgs e)
       {
           base.OnPreRender(e);  
       }
   }

But this grid is not visible!
I can see that the grid is populated but still not visible. On debugging i see the grid being rendered as follows:

<div class="RadGrid RadGrid_WebBlue" id="OrderBaseCtrl_GXHyperLinkTab_ctl00_FsMain_ProposalDealBANCtrl_FsMain__RadGrid1" style="width: 100%;">
On comparision with other grids, i noticed that this <div> does not have a <table>.
PLease help me.
Princy
Top achievements
Rank 2
 answered on 16 May 2014
5 answers
135 views
I have a RadCalendar we are using and when I add the 'OnDateSelected' Client event I have a function that adds styles and a hide() via jQuery to other elements on the page.  
It seems that on the date selection the 'OnDateSelected' client event is not behaving as I thought it would be.  I thought that I would be able to add a .hide() via jQuery to an element because the date selected was finished. But it seem that after the post back of the date selection my .hide() does not trigger.

What I am doing is I have a <div> that triggers my Calendar to show() via jQuery.  What I want is when the date is selected I want the Calendar to .hide() via jQuery.  Any help is much appreciated. Thanks.


This is my code in my .ascx control:

<ClientEvents OnDateSelected="HideCalendarEnableTimes" />

<div>Click to show Calendar</div>
<telerik:RadCalendar CssClass="myCalendar">..all the good stuff here</telerik:RadCalendar>

<option disabled class="timeListBox">List of times here</option>


//jQuery below

function HideCalendarEnableTimes(sender, eventArgs) {
// alert('enable times');
$('.timeListBox').prop('disabled', false).removeClass('disabled');
$('table.RadCalendar_Special').hide();
$('#MuseumSelectedDayBox').addClass('chosen');
}





Shinu
Top achievements
Rank 2
 answered on 16 May 2014
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?