Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
128 views
I have developed a subscription based web application using ASP.NET (C#). Applicaiton is used to give user accounts to different customers to download some files from website. I want to measure the bandwidth used by each customer account during downloading.
I'm using SQL Server 2008 at the backend where the user account information as well as download history and total download size are maintained on it.
Infact I want to calculate the bandwidth used by each customer during any download file process. Each customer is assigned certain amount of bandwidth. I want to calculate this during the session of a customer, not at the website level. Something exactly like "sharing-hub.com" website.
Is there any of ASP.NET RadControls can be of help?
Any comments and suggestions are welcomed.
Simon
Telerik team
 answered on 20 Mar 2012
3 answers
343 views
Why does the following not open the webpage in a new window, as expected?

<telerik:RadButton ID="RadButton15" runat="server" 
    PostBackUrl="~/CostDashboard.aspx" Skin="Default" Target="_blank" 
    Text="Costing" Visible="True" Width="200px" ButtonType="LinkButton">
</telerik:RadButton>

David Penny
Slav
Telerik team
 answered on 20 Mar 2012
1 answer
198 views
I'm applying css classes to timeslots in the OnTimeSlotCreated event.  I'm also only using the timeline view, and my scheduler is in an ajax panel and a radsplitter.  When the scheduler initially loads, all the timeslots look blank (greyed out), but when I click the Timeline button on the top right, everything renders fine.  Also, I found out that if I override the timeslot css and specify position: relative that it renders fine the first time, but is layed out on top of appointments.  Here is my scheduler code and the code-behind that sets css classes.  Any help would be greatly appreciated.
<telerik:RadScheduler runat="server" ID="RadScheduler1" TimelineView-NumberOfSlots="7" AdvancedForm-Enabled="false"
    OnClientAppointmentClick="appointmentClick" EnableExactTimeRendering="false" SelectedView="TimelineView"
    CustomAttributeNames="SRID,PhaseID" OnAppointmentContextMenuItemClicked="RadScheduler1_AppointmentContextClick"
    DataStartField="StartDate" DataEndField="EndDate" DataKeyField="PhaseID" DataSubjectField="PhaseName"
    DataSourceID="PhasesDataSource" AllowDelete="false" AllowEdit="true" AllowInsert="false" 
    OnTimeSlotCreated="RadScheduler1_TimeSlotCreated" OverflowBehavior="Scroll" EnableAjaxSkinRendering="true"
    DayView-UserSelectable="false" WeekView-UserSelectable="false" MonthView-UserSelectable="false"
    GroupBy="PhaseName" GroupingDirection="Vertical" RowHeaderWidth="150px"  >
    <AppointmentTemplate>
        <b><%# Eval("SRID") %></b>
            
    </AppointmentTemplate>
    <AppointmentContextMenus>
        <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">
            <Items>
                <telerik:RadMenuItem Text="Unschedule" Value="CommandEdit" />
            </Items>
        </telerik:RadSchedulerContextMenu>
    </AppointmentContextMenus>
    <TimelineView GroupingDirection="Vertical" NumberOfSlots="7" GroupBy="PhaseName" />
    <ResourceHeaderTemplate>
        <asp:Panel runat="server" ID="resoursePanel">
            <asp:Label ID="Label1" runat="server" Text='<%# Eval("Text") %>'></asp:Label>
        </asp:Panel>
    </ResourceHeaderTemplate>
    <ResourceTypes>
        <telerik:ResourceType KeyField="PhaseName" Name="PhaseName" TextField="PhaseName" ForeignKeyField="PhaseName"
            DataSourceID="AllPhases" />
    </ResourceTypes>
</telerik:RadScheduler>
Random r = new Random();
protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e)
{
    if (e.TimeSlot.Duration.Days == 1)
    {
        DateTime date = e.TimeSlot.Start;
        if (date.DayOfWeek != DayOfWeek.Saturday && date.DayOfWeek != DayOfWeek.Sunday)
        {
            int allocated = getAllocatedTime_Day(date,e.TimeSlot.Resource.Text);
            if (allocated <= 0)
                e.TimeSlot.CssClass += "timeslot-empty";
            else if (allocated < 25)
                e.TimeSlot.CssClass += "timeslot-low";
            else if (allocated < 45)
                e.TimeSlot.CssClass += "timeslot-mediumlow";
            else if (allocated < 65)
                e.TimeSlot.CssClass += "timeslot-medium";
            else if (allocated < 85)
                e.TimeSlot.CssClass += "timeslot-mediumhigh";
            else if (allocated <= 100)
                e.TimeSlot.CssClass += "timeslot-high";
            else if (allocated > 100)
                e.TimeSlot.CssClass += "timeslot-overbooked";
            else
                e.TimeSlot.CssClass += "timeslot-empty";
        }
    }
}
private int getAllocatedTime_Day(DateTime time,string department)
{
    return r.Next(0,120);
}
Ivana
Telerik team
 answered on 20 Mar 2012
1 answer
125 views
I need a little help.  I am having a problem opening a radwindow from a parent radwindow.  I have a radwindow that is called from a radgrid.
<CommandItemTemplate>
                               <table width="100%">
                           <tr class="customFont">
                         
                          <td align="left">
                           <asp:LinkButton ID="LinkButton2" runat="server" OnClientClick="openWin('/portals/0/NewSearch.aspx?AuthoringNames='); return false;"  >
                              <img style="border:0px;vertical-align:middle;" alt="" src="/portals/0/Images/add-icon.png" />New Search</asp:LinkButton>                              
                                 
                                    <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="openWin2('/portals/0/NewPublicationList.aspx'); return false;"  >
                              <img style="border:0px;vertical-align:middle;" alt="" src="/portals/0/Images/add-icon.png" />Import PMID List</asp:LinkButton>                              
                                                          
                              
                              <td align="left">
                             </td>
                                                  
                          <td align="right">
                              <asp:LinkButton ID="LinkButton4" runat="server" OnClientClick="refreshGrid(); return false;" >
                              <img style="border:0px;vertical-align:middle;" alt="" src="/portals/0/Images/Refresh.png" /> Refresh</asp:LinkButton>
                                  
                          </td>
                      </tr>
         
           </table>
              </CommandItemTemplate>

The linkbutton calls


function openWin2(url) {
        var oWnd = $find("<%=RadWindow1.ClientID%>");
          var authorNames = document.getElementById('<%=HiddenField1.ClientID%>').value;
          oWnd.setUrl(url + "?AuthoringNames=" + authorNames);
       var oWnd = radopen("/portals/0/NewSearch.aspx?AuthoringNames=" + authorNames, "RadWindow1");
        }
The linkbuton needs two click to call the function.  If I change the function to oWnd.Show that it works on one click but I then can't get the parentwindow from the opened radwindow to open another window.  This line totally freezes in the opened window and will not call the second window
var oWnd2 = parentRadWindowManager.open("/portals/0/QuerySaver.aspx", "RadWindow3");

and this is my originating forms radWindow code

<telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" Modal="True"
     runat="server" EnableShadow="true">
     <Windows>
         <telerik:RadWindow ID="RadWindow1" runat="server"  Modal="true" Width="750" Height="600" OnClientClose="OnClientClose" Behaviors="Close,Move"
           ReloadOnShow="true" NavigateUrl="/portals/0/NewSearch.aspx" >
         </telerik:RadWindow>
            <telerik:RadWindow ID="RadWindow2" runat="server"  Modal="true" Width="750" Height="300" OnClientClose="OnClientClose" Behaviors="Close,Move"
           ReloadOnShow="true"  >
         </telerik:RadWindow>
         <telerik:RadWindow ID="RadWindow3"  runat="server" Width="650" Height="480" Modal="true"  NavigateUrl="/portals/0/QuerySaver.aspx" >
         </telerik:RadWindow>
         </Windows>
 </telerik:RadWindowManager>



Is this because I have my link button on a radGrid?
I've tried to totally follow your demos but none have it starting from a radgrid.

Thanks

Bill

Marin Bratanov
Telerik team
 answered on 20 Mar 2012
4 answers
1.4K+ views
I'm using your demo code from
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultvb.aspxand would like to put the button call that closes the window into code.
change this:

<div style="margin-top: 4px; text-align: right;">

 <button title="Submit" id="close" onclick="returnToParent(); return false;">

 Submit</button>

 </div>

into this:

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

      Button1.Attributes("onclick") = "return returnToParent(); return false;"

  End Sub

But it takes two clicks to call the function.  All help is apprecieted

rdmptn
Top achievements
Rank 1
 answered on 20 Mar 2012
1 answer
171 views
Hi Team,

I am using rad editor. i added the custom drop down using Tools.xml file and like to set the image instead of text as heading of drop down.
<tool name="InsertElement"  type="dropdown" showicon="true" showtext="false">
     <item name="xref" Value="xref"/>
     <item name="p" Value="p"/>
        </tool>
and add the back ground image using css
span.InsertElement
{
 background-image: url(../Images/icoElemCut.png);
 background-repeat :no-repeat;
 
}

using

.rade_toolbar

.InsertElement

also.
But i didnt get the image only. I got the drop down with image. I hace attached the image.

2. I need to assign the actual content to editor after editing some text in editor.

   first time, i bind the actual text to editor. It will display correct.
   then, i can edit some text and with out saving to data base, press the Reload button.
   While reloading, i will assign the actual content from data base to editor.
   It is assigned correctly in code behind. but editor shows with edited content. 
   How to refresh/update the editor while reassigning the content.

It is urgent project. Please help me.
Thanks in advance.
Uma 

 

 

 

Rumen
Telerik team
 answered on 20 Mar 2012
4 answers
402 views
I'm working with the Telerik RadWindow, and I am writing to ask how best to add a button to the RadWindow Title Bar;

Best regards - Rob
rdmptn
Top achievements
Rank 1
 answered on 20 Mar 2012
4 answers
292 views
hi all
i want batch updates functionality with rows in rad grid.

below is the batch update with cells but i want batch updates with rows.
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx

regards
Ravi
mcamail2002@gmail.com
Shinu
Top achievements
Rank 2
 answered on 20 Mar 2012
7 answers
195 views
Hi,

Thanks for your help with previous inquiries that I've had.

I've got this issue and am confused by it.
This is something that we are trying to understand why it's happening here and not with other html elements.

Follow these steps:
1. In Design mode, add a table to the editor.
2. Got into HTML mode and wrap the table in a paragraph tag so all you get is something like:
<p>
<table>
    <tbody>
        <tr>
            <td>1</td>
            <td>2</td>
        </tr>
        <tr>
            <td>3</td>
            <td>4</td>
        </tr>
    </tbody>
</table>
</p>

Go into Design mode, and then go back into HTML mode.
And all of a sudden it looks like this:
<p>
</p>

<table>
    <tbody>
        <tr>
            <td>1</td>
            <td>2</td>
        </tr>
        <tr>
            <td>3</td>
            <td>4</td>
        </tr>
    </tbody>
</table>


Why did it do that?

If I put some random junk instead of a table and do the same thing, the content remains inside the paragraph.

This is currently driving me crazy as I cannot figure out how to fix this.

Any help would be appreciated.

Thanks,
Cameron


Rumen
Telerik team
 answered on 20 Mar 2012
1 answer
126 views
Hello,
Documentation about my question is found by using below link :
http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html

The question is when i move to another page in the grid the  var selected = {}; became null (before moving to another page the variable selected contains ids of the selected rows)
so it is not remembering the selected rows  when i move to another page in the grid
any suggestions.
Shinu
Top achievements
Rank 2
 answered on 20 Mar 2012
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?