Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
252 views
I have a small web project where im using a radcalendar.

The calendar is used to show different states shown as with different background colors. In the codebehind DayRender event i set up the Background color setting the Cell CssClass for each day...

now its possible for the user to change the state on a date by clicking it. Here is the question. ? If a date has a specific color "lets say green" and the user clicks it i want to show a confirm messagebox. How do i get the clicked dates backgroundcolor in the ClientEvent.

my aspx looks like below:

 

<telerik:RadCalendar ID="uiCalendarPersonal" runat="server" AutoPostBack="True" width="170px"  
    ClientEvents-OnDateClick="OnDateClick" 
    OnDayRender="uiCalendarPersonal_DayRender">
</telerik:RadCalendar>

The javascript for OnDateClick will look something like this

function OnDateClick(calendarInstance, args) { 
   //set set_Cancel(true) to cancel AutoPostBackOnDayClick - if any;
    // here i would like to check for the clicked dates backgroundcolor
    args.set_cancel(!TraceEvent(
"OnDateClick: " + args.get_renderDay().get_date(), "Postback?")); 
} 

function TraceEvent(eventName, confirmMessage) { 
   var now = new Date(); 
   var str = "[" + now.toLocaleTimeString() + "]&nbsp;" + eventName; 
   var retValue; 
   if (confirmMessage) { 
       retValue = confirm(eventName +
":\n" + confirmMessage); 
       str += (retValue ?
"" : "&nbsp;-&nbsp;canceled"); 
       }
   if (retValue != null) 
       return retValue;
}

 

 

 

 

 

 

 

Daniel
Telerik team
 answered on 16 Feb 2009
7 answers
537 views
Is there an easy way for me to prevent html markup showing in grid columns?
I would like to server.htmlencode the contents of the field I guess.
Veselin Vasilev
Telerik team
 answered on 16 Feb 2009
3 answers
116 views
Is there any way to make custom styles context sensitive. For instance, if I have a style defined as

table.LayoutTable {...} 

I only want the style to appear when I have a table selected.

Also, if I have a specfic format for cells within this style I don't want it to show up in the CSS list. How can I hide these styles?

Example:

table.LayoutTable td {...} 
Stanimir
Telerik team
 answered on 16 Feb 2009
1 answer
127 views
I am having an issue with the calendar rendering on the production web site.  Everthing works fine on the development site.  When the code is moved to the production site the page comes up with no errors, but there are no times to schedule.  If I click on a different view nothing seems to happen.  No javascript error message appear.

any suggestions?

Scott

Peter
Telerik team
 answered on 16 Feb 2009
1 answer
222 views
Hi,
I have a grid which is edited in a pop up window (edit form). One field that is edited should be an inner data list, that can be added with editable rows. Trying to define an inner asp datalist leads to confusion between the edit commands on the grid and on the datalist.

What is the recommended way to design an inner editable list (or grid) like the one mentioned above and can be seen in this link?
edit user EditFrom

my code:
            <asp:DataList ID="AgentsDataList2" runat="server" DataSourceID="UserAgentsDatasource" 
                OnEditComman="DataList2_EditCommand" DataKeyField="UserId"> 
                <EditItemTemplate> 
                    <telerik:RadTextBox ID="tbdlAgentId" runat="server" Text='<%# Bind("AgentId") %>'> 
                    </telerik:RadTextBox> 
                    <telerik:RadComboBox ID="cmbdlSwitches" runat="server" DataSourceID="SwitchesDatasource" 
                        DataTextField="Value" DataValueField="Key" Skin="Office2007"> 
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                    </telerik:RadComboBox> 
                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="update"> 
                     
                    </asp:LinkButton> 
                    &nbsp; 
                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="cancel"> 
                     
                    </asp:LinkButton> 
                </EditItemTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblAgentId" runat="server" Text='<%# Eval("AgentId") %>' /> 
                    &nbsp;&nbsp; 
                    <asp:Label ID="lblSwitches" runat="server" Text='<%# Eval("SwitchId") %>' /> 
                    &nbsp;&nbsp; 
                    <asp:LinkButton runat="server" ID="LinkButton1" CommandName="Edit"> Edit 
                    </asp:LinkButton> 
                </ItemTemplate> 
            </asp:DataList> 
        </telerik:RadPageView> 
    </telerik:RadMultiPage> 
     <script runat="server"> 
        protected void DataList2_EditCommand(object source, 
            DataListCommandEventArgs e) 
        { 
            //something here... 
            int x = e.Item.ItemIndex; 
        } 
 
       </script> 

Thanks in advanced,
Ruth




Georgi Krustev
Telerik team
 answered on 16 Feb 2009
2 answers
453 views
Hi,
According to the documentation this is correct:
Event  Applies to  Description
OnValueChanged  all RadInput controls  Occurs after a new value has been assigned when the control loses focus.


However, using this code:
<telerik:RadDatePicker ID="createDateStart" OnSelectedDateChanged="filter_ValueChanged" runat="server" Width="104px" AutoPostBack="True" Skin="Office2007"> 
    <ClientEvents OnValueChanged="date_ClientDateChanged" /> 
</telerik:RadDatePicker> 


I get the following error:

Parser Error Message: Type 'Telerik.Web.UI.Calendar.DatePickerClientEvents' does not have a public property named 'OnValueChanged'.


The intellisense shows me a property called OnDateSelected but I don't see any documentation for this? So I'm not entirely sure.
What would be the proper event to use instead of OnClientDateChanged?

You guys have a great product but I can't stress enough how much greater it would be if the documentation was better and more up-to-date :)

Thanks.
Nate Pinchot
Top achievements
Rank 1
 answered on 16 Feb 2009
3 answers
137 views

Hello,

We have a ArrayList filled with Items in (n,3) pattern (n rows and 3 columns). We want to assign this ArrayLIst to Teleric Grid as data Source.

Is there any way to directly assign it ? kindly let us know ASAP.


Thanks
Shrirang

Sebastian
Telerik team
 answered on 16 Feb 2009
1 answer
136 views
this function does not work at all when useing on RTL page direction

is there any clear help or road map to use it ?

it is an importent feature for us!
Sebastian
Telerik team
 answered on 16 Feb 2009
4 answers
222 views
I'm trying to use the example for the Rad Custom Dialog, and I'm getting this error
when I click on my custom tool button.



Sys.ArgumentNullException: Dialog Parameters for the <xxx> dialog do not exist
Parameter name: dialogName

Any thoughts?

I'm using the example but I was trying to call my own user control.
I changed the "'s in the String.format to single 's because they were giving me syntax issues. I tried it both ways.

<script type="text/javascript">
Telerik.Web.UI.Editor.CommandList["InsertHyperText"] = function(commandName, editor, args)
{
var myCallbackFunction = function(sender, args){
editor.pasteHtml(String.format("<a href={0}>{1}</a> originalAttribute='href' originalPath='{0}>{1}</a>' originalAttribute='href' originalPath='{0}>{1}</a>' ", args.href, args.text))
}
editor.showDialog("InsertHyperText", {}, myCallbackFunction);
};

</script>
Darryl
Top achievements
Rank 1
 answered on 16 Feb 2009
0 answers
131 views
Hi 

I am using RadMenu (latest Ajax version) in a SharePoint 2007 (inside a PageLayout), Its working fine till i set 
EnableEmbeddedSkins to False , and point RadControls to a desired directory (I had tired number of them , but seems none of them is worknig for me). The idea is to put Skins folder inside the layout folder in 12 hive [a folder hive where sharepoint installs it files ] (though for testing I can put them any where I want) , but I dont able to get it working, When I set RadControlsDir = "/_layouts/RadConrols/Skins"  (I also tried this without /Skins)  , with Skin = WebBlue (for testing i want to start  with OTB skin), the menu appears without any skin/styles at all. For checking when I mannually browse to the skin's css e.g http://sharepoint:9090/_layouts/RadContols/Skins/WebBlue/xyz.css , I am able to access it!.

I think I am missing a setting somewhere. Any thoughts....

Thanks




..
Top achievements
Rank 1
 asked on 16 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?