Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
152 views
now this might seem like a really lame question, but i feel it is actually relevant.
Is there the option to add a smileys button?
Thanks
Grant
Top achievements
Rank 1
 answered on 28 Oct 2008
3 answers
108 views
Hi, I added the RADAJAXMANAGER in my project, but not seeing any of the camps set up, appears the only Controls... Someone knows what can be?
Sebastian
Telerik team
 answered on 28 Oct 2008
4 answers
200 views
I'm in a quest to optimize my pages, here's what I found. Let's start with a base rendering time of 9ms, a few standard controls, about 3 database calls. All this adds up to 9ms; for what it does not too bad. I measure this by turning tracing on and hitting refresh about 10 times and calculating the average rendering time (I skip the first two to avoid the warm-up times).

OK, now I'm going to add a RadMenu, just a simple instance, absolutely no items in the menu, skinning disabled... the bare minimum. Doing this jumps the render time from 9ms to 14ms, so 5ms just to add the menu on the page. I continue by adding some code that dynamically builds some menu items, about 10 menu items (including subitems). My average is now 15ms, so that code must have added 1ms. Fine, now I leave the code that builds the menu and override OnPreRender where I remove all the items in the menu. After doing this my average drops back to 14ms; my conclusion: that extra 1ms was spent rendering the output, not in what I'm doing, but let's not be too picky, let me move on to RadPanel.

I take out the OnPreRender code so my average goes back to 15ms, and I add an empty RadPanel. Same story as with the menu, just a simple panel with no items, no skin, nothing. My average is now 22ms, a 7ms jump just for adding a RadPanel that does absolutely "nothing". Next step is to add the code that builds some items, about 3 RadPanelItems each with a menu inside. Each menu has between 1 and 4 items, so nothing big. Doing this my average jumps to 34ms. So I'm thinking: 'I must be doing a lot of work for 12ms.' I do the same trick I did for the menu and on pre-render I remove the items but leave the code that generated them. After I do this the rendering time goes back down to 22ms, so whatever I'm doing to build the items doesn't really add up to much.

So, let me summarize all this. I started with 9ms which includes 3 database calls (fairly complex queries) and a number of other controls. Adding a menu with about 10 menu items adds 5ms and adding a panel bar adds another 19ms for a total of 24ms, time that does not include the code I use to generate the items. My page went from 9ms to 34ms, 3 fold increase. To say the least I'm not impressed.
Peter Zolja
Top achievements
Rank 1
 answered on 28 Oct 2008
4 answers
209 views
I have the following controls on my aspx page:

<

 

telerik:RadComboBox 
    
ID="edtSubDisciplineID" 
    
runat="server" 
    
Width="100%"
     
DataTextField="disciplineName" 
    
DataValueField="disciplineID" 
    Skin="Vista" 
    
OnClientSelectedIndexChanging="loadCostCodes" >
</telerik:RadComboBox>

 

<

 

telerik:RadComboBox 
    ID="edtCostCodeID" 
    runat="server" 
    Width="100%"
    DataTextField="costCodeFullName"
    DataValueField="costCodeID"
    Skin="Vista"
    EnableLoadOnDemand="true"
    OnItemsRequested="onCostCodeItemsRequested">
</telerik:RadComboBox>

 

 

 

and then, I've got the following Javascript on the same page:

<script type="text/javascript">
    function
loadCostCodes(item) 
    {
        var
ctrl = <%= edtCostCodeID.ClientID %>; 
        if
(item.Index > 0)
        {
            ctrl.requestItems(item.Value,
false
);
        }
        
else
        
{
            ctrl.Items = [];
            ctrl.setText(
" "
);
            ctrl.clearItems();
        }
}
</script
>

 

Problem:

When I change the selected item in the parent combo, I get the following javascript error:
    "Object doesn't support this property or method"

The problem occurs on the "item.Index" line, as well as the "ctrl.requestItems()" call.  I have tried upper and lowercase.  I have put alert() calls in there and verified I have the control is found properly.   I have verified that "item" passed into the javascript call is not null.

So, what am I missing?  I have been thru the tutorials and forums messages to no avail.  I am simply trying to get a parent/child cascading dropdown to work.  Your help is appreciated!

Jim

 

Simon
Telerik team
 answered on 28 Oct 2008
1 answer
95 views
Hello,

I want to use DatePicker Control in Dynamically created dock.
Currently i have rad chart in that dock but i want to add date picker control so user can select date and base on that date chart is going to rebind.

I tried but its not working...

Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 28 Oct 2008
1 answer
144 views
Hi, I created a scenario loosely based on your example where you click on a listbox to load a tooltip, check some languages, click a button, and update the main listbox.  I enhanced the example to use a more complex userControl as my tooltip, but in the end, it's still just a simple case of grabbing what the user entered on the tooltip UI and populating a control on the main form with those entries.

My scenario works fine when I use RadToolTip and define it in the .ASPX of my main form.  In my tooltip user control, the user clicks an "OK" button which calls a javascript function on the main page to pass back the user's entries.  Problem with this method is the usercontrol in the tooltip has a listbox that needs populating from the database and this occurs on Page_Load of the main form (even if the user never chooses to view the tooltip).  Therefore, I would like to use the LoadOnDemand feature of RadToolTipManager.

I was able to convert my scenario to using that method for loading the tooltip, but I wasn't sure how best to return results from the tooltip.  I tried with my original method (of javascript function on main page) and it didn't work.  What would be the best way (server-side or client-side) to get data off the tooltip when the user clicks the "OK" button on the tooltip?
Svetlina Anati
Telerik team
 answered on 28 Oct 2008
2 answers
272 views
Am I missing something?

I have a requirement to load a list (AJAX preferred) when a user clicks a date on a RadCalendar.

Example:

A page with a Calendar and a grouped repeater on it. When a user clicks a date on the calendar control, the grouped repeater displays all the events for that day (even if they are recurring).

The trouble is, I don't understand how the RadCalendar works. I don't see a click event associated with the control, and the Demo's don't really show me a good example of how to accomplish this.

Can someone please wind me up and point me in the right direction?

Thanks!
johnv
Top achievements
Rank 2
 answered on 28 Oct 2008
3 answers
459 views

Hello

I’m trying to return a column value from a radgrid client-side after a LinkButton is clicked in a GridTemplateColumn (the other columns are generated dynamically) and open a radWindow.  I have looked through the documentation and posts and found some useful information but am still unable to accomplish this task.

I am able to return the correct value using the following code when different rows are clicked in the grid:

SCRIPT

----------------------------------

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

   

<script type="text/javascript">

 function RowSelected(sender, eventArgs)

 {

   var dataItem = $get(eventArgs.get_id());

   var grid = sender;

   var MasterTable = grid.get_masterTableView();

   var row = MasterTable.get_dataItems()[dataItem.rowIndex - 1];

   var cell = MasterTable.getCellByColumnUniqueName(row, "appID");

   //here cell.innerHTML holds the value of the cell

   //alert(cell.innerHTML);

  

   var window = radopen("../appointmentInfo.aspx?EID=" + cell.innerHTML,"RadWindow1");

   window.center();

 }

</script>

</telerik:RadCodeBlock>

----------------------------------

GRID CODE

----------------------------------

<telerik:RadGrid id="gridResults" runat="server" Skin="Telerik" AllowSorting="True" GridLines="None" DataSourceID="ObjectDataSource1" Style="left: 0px; top: 5px; position: relative;" Width="950px" ShowGroupPanel="True">

<MasterTableView allownaturalsort="False" DataSourceID="ObjectDataSource1" ClientDataKeyNames="appID" DataKeyNames="appID">

<RowIndicatorColumn>

<HeaderStyle Width="20px"></HeaderStyle>

</RowIndicatorColumn>

<ExpandCollapseColumn>

<HeaderStyle Width="20px"></HeaderStyle>

</ExpandCollapseColumn>

<Columns>

<telerik:GridTemplateColumn HeaderText="View" UniqueName="TemplateColumn">

<ItemTemplate>

<asp:LinkButton ID="lnkBtnView" runat="server" CommandName="ViewApp" Style="position: relative" ToolTip="View the Appointment" OnClientClick="GetSelectedID()">View</asp:LinkButton>

</ItemTemplate>

</telerik:GridTemplateColumn>

</Columns>

</MasterTableView>

<ClientSettings AllowDragToGroup="True">

<ClientEvents OnCommand="function(){}" OnRowSelected="RowSelected" />

<Selecting AllowRowSelect="True" />

</ClientSettings>

<FilterMenu EnableTheming="True" Skin="Telerik">

<CollapseAnimation Duration="200" Type="OutQuint" />

</FilterMenu>

</telerik:RadGrid>

----------------------------------

The above code works properly.  However, I would like to open the window when the link button in the grid is clicked rather than when a row is clicked.  The following code works when I call the ‘GetSelectedID’ function from the ‘OnClientClick’ event for the link button, but always returns value from the first row due to the index setting of [0] when getting the value for var DataItem.

function GetSelectedID()

{

    var DataItem = $find("<%= gridResults.ClientID %>").get_masterTableView().get_dataItems()[0];

    var keyValue = DataItem.getDataKeyValue("appID")

    var oWnd = radopen("../appointmentInfo.aspx?EID=" + keyValue,"RadWindow1");

    oWnd.Center();

      

    //alert(keyValues);

}

Is there a way to return the index of the row that is clicked in function GetSelectedID() or an alternate way of accomplishing this?

Thanks for any suggestions,

Brian

Brian
Top achievements
Rank 1
 answered on 28 Oct 2008
5 answers
198 views
is there a way to expand and collapse the panelitem using server side thanks.i only see example for the client side
Simon
Telerik team
 answered on 28 Oct 2008
3 answers
301 views
I'm currently trying to use the RadPanelbar to display a drawer or slide-out effect (the old Quicktime client is about the best quick example I can think of).  To do this so far I've got a couple of top level nodes with no text each of which has a single item under them which is opened or closed via the client side script.  So far functionality is working perfectly and it renders as intended in 3 of the 4 browsers but IE is giving me a headache.  Despite the fact that no top level A tag or text is rendered IE still displays the RootGroup LI elements at full height.  Overwriting the styles as follows:
.rpRootGroup .rpItem
    {
        font-size: 0px;
        padding:0px;
        margin:0px;
    }

    .rpSlide .rpGroup .rpItem
    {
        font-size:100%;
    }
gets rid of most of the vertical space but still leaves me with about 2px of height per top level LI element.

Any suggestions on how to get around this strange spacing?

Paul
Telerik team
 answered on 28 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?