Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
619 views

Using the code mentioned in your article here - http://docs.telerik.com/devtools/aspnet-ajax/controls/spreadsheet/client-side-programming/events/onclientchange

 

We have a simple aspx page with RadSpreadsheet object on it, along with the code mentioned in above article for onClientChange, but that never gets hit.

What are we missing?

Vessy
Telerik team
 answered on 22 May 2017
1 answer
86 views

Support,

OnClientEnded, i used this event to trigger a java script at the end of a Play.

 

Is there any way i could run a script at the end of video play.

If you have any example please share.

Thanks

 

Eyup
Telerik team
 answered on 22 May 2017
1 answer
206 views

Hi,

I will try to explain the scenario the best way possible. I hope you can help me.

I have a page which has one user control with filters. Those filters are displayed dynamically with some information we have stored in the database. Depending on what you select in those filters, the page has to load dynamically one or more user controls with the results (each one will have a radgrid). For example, if in the filter "department", you select the departments A, B, C and D, after clicking in "Submit", we have to create four different result user controls because each department has different columns to display. So having one non-dynamic user control with a radgrid is not an option. Also I have tried having a non-dynamic user control, but creating radgrids dynamically and the results wasn't good. I have to say that I have this scenario fully working with asp.net gridviews, but I need to have better performance and more functionality. This is the main reason of using this telerik control.

I don't have any problem loading the data, but with the radgrid events (sorting, paging), the whole page does a postback and the radgrids are not there.

I'm using advanced server side binding, but I have tried simple binding too with the same result.

 

- The relevant code in the page is. This is called when you select the filters and you click in "Submit":

01.public void GetReports(List<ReportModel> reports)
02.{
03.    int count = 1;
04.    foreach (ReportModel report in reports)
05.    {
06.        DataSet ds = ReportData.GetReportData(report); // If there's no data, this function always return a dataset with one datable informing that there's no data available
07.    foreach (DataTable dt in ds.Tables)
08.        {
09.            ReportResults control = this.LoadControl("~/Reports/Controls/ReportResults.ascx") as ReportResults;
10.            control.ID = string.Format("reportResults{0}", count);
11.            control.Data = data;
12.            this.pnlResults.Controls.Add(control);
13.        }
14.    }
15.}

 

- The client side code in the user control:

<telerik:RadAjaxPanel id="pnlReport" runat="server" cssclass="panel-body nopadding" style="width: 100%; overflow: auto;">
    <telerik:radgrid id="radgrid" runat="server" cssclass="table table-striped table-hover" borderstyle="Solid"
        autogeneratecolumns="true" allowpaging="true" allowsorting="true" rendermode="Lightweight" skin="Bootstrap" onneeddatasource="radgrid_NeedDataSource">
        <pagerstyle mode="NextPrevNumericAndAdvanced" />
    </telerik:radgrid>
</telerik:RadAjaxPanel>

 

- The server side code in the user control:    

01.public DataTable Data
02.{
03.      get
04.      {
05.            return (DataTable)this.ViewState["Data"];
06.      }
07.      set
08.      {
09.             this.ViewState["Data"] = value;
10.      }
11.}
12. 
13. 
14.protected void radgrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
15.{
16.       (sender as RadGrid).DataSource = this.Data; //I have already debugged the code and I have seen that this property has data and it's displayed when I click in "Submit"
17.}

 

Thank you for your help.
Xabier
Top achievements
Rank 1
 answered on 19 May 2017
0 answers
72 views

in myDbSchedulerProvider (through webservice) > GetAppointments

I can set apt.Start , apt.Description , apt.ID , apt.Subject and those carry forward to the page.

apt.Subject = dr("Title")
apt.Start = DateTime.SpecifyKind(StartTime, DateTimeKind.Utc)
apt.Description = dr("Content")
 
apt.CssClass = "mapping" & dr("Category").replace(";", "")
apt.ForeColor = Drawing.Color.Beige
apt.BackColor = Drawing.Color.Coral
apt.Attributes("class") = "mapping" & dr("Category").replace(";", "")

but if I set any of these values, they do not carry forward.
apt.CssClass , apt.ForeColor , apt.BackColor , apt.Attributes("class")

in the click appointment javascript event I alert these values and they are blank or null
but as I said, if I alert the other ones they give correct values.

function OnClientAppointmentClick(sender, args) {
alert(apt.get_start().format("MM/dd/yyyy HH:mm")) ; //<-- good value
alert(apt.get_description()); //<-- good value
 
alert(apt.get_cssClass()); //<-- blank value
alert(apt.get_backColor()); //<-- null value
 
etc etc
Doug
Top achievements
Rank 1
 asked on 19 May 2017
0 answers
99 views
When i am setting text and saving it, sometimes is losing spacing between words. If i go and set it up correctly and save it just reverts back to the document without spacing. It doesn’t do it for every space just certain sections. I have an image attached. Could you please advice on a fix?
Evgheni
Top achievements
Rank 1
 asked on 19 May 2017
5 answers
86 views
Hello,

We have noticed that in Q3 2010 clicking on a RadToolbarButton image does not navigate to the page specified RadToolbarButton NavigateUrl. Clicking on the text or area around the text works fine. (Clicking on an image was working in Q2 2008)

Here's my code:
<style type="text/css">
     div.RadToolBarDropDown .rtbWrap
     {
         line-height: 52px;
         padding-left: 57px;
     }
        
     div.RadToolBarDropDown .rtbItemHovered,
     div.RadToolBarDropDown .rtbItemFocused, 
     div.RadToolBarDropDown .rtbItemHovered .rtbWrap,
     div.RadToolBarDropDown .rtbItemFocused .rtbWrap
     {
         background-image: none;
         background-color: #8E8E8E;
     }
 </style>
   
 <telerik:RadToolBar ID="radToolBarMenu" runat="server" Orientation="Vertical">
     <Items>
         <telerik:RadToolBarDropDown runat="server" ImageUrl="~/Images/NewReceipt.jpg" 
             Text="Receipt">
             <Buttons>
                 <telerik:RadToolBarButton runat="server" 
                     ImageUrl="~/Images/ReceiptInternal.jpg" NavigateUrl="~/Internal.aspx" 
                     Text="Internal">
                 </telerik:RadToolBarButton>
                 <telerik:RadToolBarButton runat="server" 
                     ImageUrl="~/Images/ReceiptExternal.jpg" NavigateUrl="~/External.aspx" 
                     Text="External">
                 </telerik:RadToolBarButton>
             </Buttons>
         </telerik:RadToolBarDropDown>
     </Items>
 </telerik:RadToolBar>

Is it possible to navigate when clicking on the image?

Thanks,

Matt
Rumen
Telerik team
 answered on 19 May 2017
1 answer
151 views

Hello there,

I have a requirement to validate that an expiration date is later than a hire date. Both dates are populated in a GridBoundColumn in a RadGrid. Bellow is the code for the two columns in my aspx page:

<telerik:GridBoundColumn ColumnEditorID="DateEditor" DataField="Hired" Visible="true" ReadOnly="false" HeaderText="Hired" UniqueName="gcHired" DataType="System.String" FilterControlAltText="Filter gcHired column"></telerik:GridBoundColumn>
                                                <telerik:GridDateTimeColumn ColumnEditorID="DateEditor" MinDate="2017-01-01" MaxDate="2030-12-31" DataFormatString="{0:MM/dd/yyyy}" DataField="Expires" HeaderText="Expires" UniqueName="gcExpires" FilterControlAltText="Filter column column" AllowFiltering="False" AllowSorting="False" DataType="System.DateTime" ReadOnly="false">
                                                    <HeaderStyle Width="100px"></HeaderStyle>
                                                </telerik:GridDateTimeColumn>

 

I am wondering if there is a straight forward way to achieve this. Thanks in advance!

Marin Bratanov
Telerik team
 answered on 19 May 2017
11 answers
1.2K+ views
Hello, I am trying to use clientside events to hide the edit and delete columns as well as the filter row when an export is being performed on the radgrid, then show those items again after the export.  I've managed to hide them before the export and the export looks fine other than a short empty row still being where the filter row was for pdf and word (hideFilterItem does not seem to hide it from export; excel is fine though since I'm using ExcelML).  

The part I'm having difficulty with is getting them to show up again.  I've tried attaching a few client side events (such as OnTableCreated) to this function, but everything I've tried either causes errors or does nothing:

UnhideGridEditAndDeleteColumnsAndFilterRow = function (sender, eventArgs) {
 
 // I'm using js in a separate file so I can't use radcodeblock to get ClientID
    var gridName = sender.EventTarget.toString();
 
    gridName = gridName.substring(0, gridName.indexOf("$ctl00"));
 
    var masterTableView = $find(gridName).get_masterTableView();
 
    if (masterTableView.getColumnByUniqueName("EditCommandColumn") != null && masterTableView.getColumnByUniqueName("DeleteCommandColumn") != null) {
      masterTableView.showFilterItem();
      masterTableView.showColumn(masterTableView.getColumnByUniqueName("EditCommandColumn").get_element().cellIndex);
      masterTableView.showColumn(masterTableView.getColumnByUniqueName("DeleteCommandColumn").get_element().cellIndex);
    }
 
 
  };


Is there a proper way to do this that I haven't found?
Neha
Top achievements
Rank 1
 answered on 19 May 2017
0 answers
78 views

When i use AlwaysVisible in PagerStyle for a RadGrid i can´t Access controls of the pager in databound.

 

<MastertableView  PagerStyle-AlwaysVisible="true">

protected void grdListing_ItemDataBound( object sender, GridItemEventArgs e )

{

    if (e.Item is GridPagerItem)
            {
                GridPagerItem pager = (GridPagerItem)e.Item;
                Label lblGoToPageLabel = (Label)pager.FindControl("GoToPageLabel");
                lblGoToPageLabel.Text = "mytext";

     }

}

FindControls returns null.

 

if AlwaysVisible is false FindControl returns a value.

How can i Access controls if AlwaysVisible es true?

 

Thanks

Sergio Saiz

 

 

Sergio
Top achievements
Rank 1
 asked on 19 May 2017
2 answers
261 views
Hello support team,

Heading : I am having issue with radeditor HTML formatting

Background : I am using radeditor in my aspx page, My application is reading emails from third party and then after I am displaying those emails body in my page radeditor control. As we are fetching email from third party so we don't have any control over HTML which they are sending.

Issue : Partial HTML is not displaying properly in my radeditor control

I walk through radeditor demo application postedby telerik http://demos.telerik.com/aspnet-ajax/editor/examples/builtinmodules/defaultcs.aspx and I found that it is working smooth in the demo given by you

So I create a demo application to reproduce the issue which I am facing and attached as screenshot in my post (Not able to upload zip folder though). So kindly go through it and let me know if I am missing any property that allow such thing or anything which is restrict my application to do so

P.S : I am using telerik version 2016.2.607.40

Let me know if you need any additional information

Thanks
 - Brijesh
Rumen
Telerik team
 answered on 19 May 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?