Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
162 views

I am trying to do something similar to the RadToolTip for RadCalendar demo shown here: http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipcalendar/defaultvb.aspx.  I want to add an export button inside the UserControl for the tooltip, but can't seem to get that event to fire.  My code for the user control is below.  Any ideas?

 

Partial Class CalendarEventDetails
    Inherits System.Web.UI.UserControl
 
    Private dtSelectedDate As DateTime
    Public Property SelectedDate() As DateTime
        Get
            Return dtSelectedDate
        End Get
        Set(ByVal value As DateTime)
            dtSelectedDate = value
        End Set
    End Property
 
    Protected Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
        AddHandler lvEvents.ItemCommand, AddressOf lvEvents_ItemCommand
    End Sub
 
    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        odsEvents.SelectParameters("StartDate").DefaultValue = SelectedDate
        odsEvents.SelectParameters("EndDate").DefaultValue = SelectedDate
        lvEvents.DataBind()
    End Sub
 
    Protected Sub lvEvents_ItemCommand(sender As Object, e As ListViewCommandEventArgs)
        If e.CommandName = "Export" Then
            'Do Something
        End If
    End Sub
End Class

 

<%@ Control Language="VB" AutoEventWireup="true" CodeFile="EventDetails.ascx.vb" Inherits="CalendarEventDetails" %>
<asp:ListView runat="server" ID="lvEvents" DataSourceID="odsEvents">
    <LayoutTemplate>
        <div style="max-height: 250px; overflow-y: auto">
            <asp:PlaceHolder runat="server" ID="itemPlaceHolder"></asp:PlaceHolder>
        </div>
    </LayoutTemplate>
    <ItemTemplate>
        <asp:Label runat="server" ID="lblStartDate" Text='<%#Eval("StartDate")%>' Visible="false"></asp:Label>
        <asp:Label runat="server" ID="lblEndDate" Text='<%#Eval("EndDate")%>' Visible="false"></asp:Label>
        <div style="margin-bottom: 5px">
            <b>Category</b><br />
            <%#Eval("Category")%>
        </div>
        <div style="margin-bottom: 5px">
            <b>Title</b><br />
            <asp:Label runat="server" ID="lblTitle" Text='<%#Eval("Title")%>'></asp:Label>
        </div>
        <div style="margin-bottom: 5px">
            <b>Time</b><br />
            <%#Eval("StartDate", "{0:hh:mm tt}")%> to <%#Eval("EndDate", "{0:hh:mm tt}")%>
        </div>
        <div style="margin-bottom: 5px">
            <b>Location</b><br />
            <asp:Label runat="server" ID="lblLocation" Text='<%#Eval("Location")%>'></asp:Label>
        </div>
        <div style="margin-bottom: 5px">
            <b>Description</b><br />
            <asp:Label runat="server" ID="lblDescription" Text='<%#Eval("Description")%>'></asp:Label>
        </div>
        <div>
            <des:LinkButton runat="server" ID="btnExport" Text="Export" CommandName="Export"></des:LinkButton>
        </div>
    </ItemTemplate>
    <ItemSeparatorTemplate>
        <hr />
    </ItemSeparatorTemplate>
</asp:ListView>
<asp:ObjectDataSource ID="odsEvents" runat="server" DataObjectTypeName="CalendarEvent"
    TypeName="CalendarManager" SelectMethod="GetEventList">
    <SelectParameters>
        <asp:Parameter Name="CalendarId" Type="Int32" DefaultValue="101" />
        <asp:Parameter Name="StartDate" Type="DateTime" />
        <asp:Parameter Name="EndDate" Type="DateTime" />
        <asp:Parameter Name="CategoryId" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

Michael
Top achievements
Rank 1
 answered on 15 Oct 2015
1 answer
188 views
I'm using GridNumericColumn inside a batchmode edit grid. How to I set the width of the input field via markup? I tried ItemStyle-Width="100px" but it gets ignored
Pavlina
Telerik team
 answered on 15 Oct 2015
1 answer
169 views

Image Manager can see files, folder, and files in folders. It can also edit any Image and save it successfully. Only problem is uploading. Always get "Access to path is denied" on production server. Local running everything works. Doesn't make sense that I can edit a file that already exists and save it as a new one, but I cannot upload one. Thanks for any help.

 

I have a 2012 server, ApplicationPoolIdentity. Created a folder on the server and created a Virtual Directory to it. Gave Everyone Full permissions until I can get it working then will narrow down. Code to set path is here...

 

string path = "~/emailAssets/" + "test";
                DebugHandler.DebugMessage = "Checking and Creating Directory: " + path;
                try
                {
                    if (!Directory.Exists(Server.MapPath(path)))
                        Directory.CreateDirectory(path);
                }
                catch { throw new Exception("Could not access or create Email Assets directory. Images and Documents will not be available"); }
                string[] paths = new string[] { path };

                // Setup RadEditor
                tbBody.ImageManager.EnableAsyncUpload = true;
                tbBody.ImageManager.ViewPaths = paths;
                tbBody.ImageManager.UploadPaths = paths;
                tbBody.ImageManager.DeletePaths = paths;

Ianko
Telerik team
 answered on 15 Oct 2015
1 answer
84 views

Hi guys,

I am a bit puzzled by this one, I followed the demos and read the help file but cannot get the bars to be stacked. Here is my code:

<telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" >
    <PlotArea>
        <Series>
            <telerik:BarSeries GroupName="Project" Stacked="true">
                <Items>
                    <telerik:SeriesItem Name="ORP" YValue="8" />
                    <telerik:SeriesItem Name="Concept" YValue="42" />
                    <telerik:SeriesItem Name="Development" YValue="238" />
                    <telerik:SeriesItem Name="Industrialization" YValue="128" />
                    <telerik:SeriesItem Name="Launch" YValue="87" />
                    <telerik:SeriesItem Name="Post-Launch" YValue="36" />
                    <telerik:SeriesItem Name="Closure" YValue="6" />
                </Items>
            </telerik:BarSeries>
        </Series>
    </PlotArea>
</telerik:RadHtmlChart>

Do you have any clue why I cannot stack this serie?

Best Regards,
David

Marin Bratanov
Telerik team
 answered on 15 Oct 2015
3 answers
137 views

Hi Guys,

Please try to perform the following on the RadEditor Demo Page:

1. Empty the editor using the HTML tab.

2. Go to the Design tab and press Enter

Result: two <p> tags appears.

3. Type any line and press Enter.

Result: the word is in a <p> tag, one more <p> tag under the word.

4. Press Enter.

Result: new two <p> tags appears.

Please take a look at this video for better understanding: https://dl.dropboxusercontent.com/u/101184853/Two_p_tags.swf

Please suggest how we can fix this issue.

Ianko
Telerik team
 answered on 15 Oct 2015
3 answers
236 views

Hi,

 

i just need to group a Grid column which in fact is a check box column. It contains only checked/unchecked boxes, and i want to allow them to be grouped. Here is my part of the code. Btw, some time ago, i figured it out, but cant remember now :(

 

<Columns>
     <telerik:GridTemplateColumn UniqueName="cbDonorUniqueSelect" HeaderText="SelectAll" AllowFiltering="false" Groupable="True" ShowFilterIcon="false" HeaderStyle-Width="30px">
          <HeaderTemplate>
                <asp:CheckBox ID="cbCheckAllDonors" runat="server" AutoPostBack="True" OnCheckedChanged="cbCheckAllDonors_CheckedChanged" SkinID="" />
          </HeaderTemplate>
          <ItemTemplate>
                 <asp:CheckBox ID="cbSelectDonor" runat="server" OnCheckedChanged="cbSelectDonor_CheckedChange"/>
          </ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>​

Viktor Tachev
Telerik team
 answered on 15 Oct 2015
10 answers
483 views
is there a way to have a column with two images Up Down. depend on which image button you click on, it will move the row up or down and save the order into the database table.

Please help. thanks
Maria Ilieva
Telerik team
 answered on 15 Oct 2015
1 answer
98 views

Hello,

 

When i getting the value of the Asp TextBox mapped with radinputmanager like this

 <telerik:MaskedTextBoxSetting Mask="##.##.##.##.## lllll" SelectionOnFocus="CaretToBeginning">
            <TargetControls>
                <telerik:TargetInput ControlID="txt_phone" />
            </TargetControls>
        </telerik:MaskedTextBoxSetting>

If i get the value : this.txt_phone.Text , i get the mask inside.

When i used just radmasked textbox , i don't get the mask only the data.

thanks for your help

Maria Ilieva
Telerik team
 answered on 15 Oct 2015
1 answer
132 views

Hello Telerik Team,

We have Ticket Management kind of Web application and we have  extensively used the Telerik controls in our application.

The Telerik Version we are currently using is : 2014.2.724.45

In some of the places we used the RadAjaxPanel and placed RadGrid inside that Panel so that whenever we perform any action then the Grid content will get updated with partial refresh. We want one JavaScript function should get called when Ajax actions has been done by RadAjaxPanel. To accomplished this we used "ClientEvents-OnResponseEnd" property of RadAjaxPanel. Please refer following code:

-----------------------Code Start Here-----------------------

<script type="text/javascript" language="javascript">
    function TestJS()
    {
        alert('Hi');
    }
</script>
<telerik:RadAjaxPanel ID="RadAjaxPanel3" runat="server" EnableAJAX="true" LoadingPanelID="RadAjaxLoadingPanel1" ClientEvents-OnResponseEnd="TestJS()">

--RadGrid is located here.

</telerik:RadAjaxPanel> 

-----------------------Code End Here-----------------------​

Now in IE 11 browser the "TestJS()" function has been successively called for each action (which cause Postback) which we performed on Grid But the problem is for Chrome browser, the "TestJS()" function is getting called on each alternate action we perform on Grid. We want that for both the browsers IE11 and Chrome this functionality should work in the same way as it works in IE11.

Please help us to resolve the above issue for Chrome Browser.

Thanks,
Riz

Maria Ilieva
Telerik team
 answered on 15 Oct 2015
5 answers
173 views

A basic C# ASP.net page has a single RadGrid on a page. A RadButton with ​Auto​PostBack=false has an OnClientClicked client-side handler function assigned. This function does some long operations, so I would like to show the AjaxLoadingPanel while the browser is busy, even though there isn't any actual Ajax retrievalgoing on. But it seems as if the OnClientClicked event somehow disables or defers the call to the show method of the AjaxLoadingPanel. The panel and spinner does show up, but only after the long client-side operations are complete. Is this by design? Is there an easy work-around?

A demo ASP setup:

<form id="form1" runat="server">
  <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
  <div>
      <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
 
       
      <telerik:RadButton ID="RadButton1" runat="server" AutoPostBack="false" Text="Turn Loading Panel on" OnClientClicked="click_handler"></telerik:RadButton>
      <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="demoinfo">
          <MasterTableView>
              <Columns></Columns>
          </MasterTableView>
      </telerik:RadGrid>   
      <asp:XmlDataSource runat="server" ID="demoinfo" datafile="demoinfo.xml"/>
  </div>
  <p id="bar" style="background-color:black; display:inline; width:1px;">.</p>
</form>
<script>
      function click_handler() {
          loaderOn();
          superslow();
          //loaderOff();
      }
 
      function superslow() { //just a bunch of uselessness to simulate slow operations
          var imax = 100000;
          for (var i = 0 ; i < imax; i++) {
              var noid = $find(i.toString().trim() + "id");
              var barel = document.getElementById("bar");
              barel.style.width = Math.floor(i * (imax / 10)).toString() + "px";
              if (i % 10000 == 0) {
                  console.log("ten thousand more...");
              }
          }
      }
 
      function loaderOn() {
          lp = $find("RadAjaxLoadingPanel1")
          lp.show("RadGrid1");
      }
 
      function loaderOff() {
          lp = $find("RadAjaxLoadingPanel1")
          lp.hide("RadGrid1");
      }
 
</script>

Thanks for your help,

Justin

Maria Ilieva
Telerik team
 answered on 15 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?