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

I tried to default "END BY" as my default recurrance appointment, can you please check below code?

<script type="text/javascript">
function OnClientFormCreated(sender, eventArgs) {
$telerik.$(".rsAdvRecurrenceRangePanel .rsAdvOptionsPanel ul li:first-child").hide();
$telerik.$(".rsAdvRecurrenceRangePanel .rsAdvOptionsPanel ul li:nth-child(2)").hide();
$telerik.$('.rsAdvWeekly_WeekDays li:first-child').hide();
$telerik.$('.rsAdvWeekly_WeekDays li:last-child').hide();

}
function pageLoad() {
var $ = $telerik.$;
$(".rsRecurrenceOptionList").children().each(function (i) {
if (i < 2)
$(this).hide();
});
var $ = $telerik.$;
$(".rsRecurrenceOptionList").children().each(function (i) {
if (i ==4)
$(this).hide();
});
}
function schedulerFormCreated(scheduler, eventArgs) {
// Create a client-side object only for the advanced templates
var mode = eventArgs.get_mode();
if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert || mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
var $ = $telerik.$;
var checkbox = $("[id$='RepeatUntilGivenDate']");
checkbox.attr("checked", true);
// Initialize the client-side object for the advanced form
var formElement = eventArgs.get_formElement();
}
}

</script>

<script type="text/javascript">
function OnClientFormCreated(sender, args) {
$telerik.$(".rsAdvRecurrenceRangePanel .rsAdvOptionsPanel ul li:first-child").hide();
$telerik.$(".rsAdvRecurrenceRangePanel .rsAdvOptionsPanel ul li:nth-child(2)").hide();
$telerik.$('.rsAdvWeekly_WeekDays li:first-child').hide();
$telerik.$('.rsAdvWeekly_WeekDays li:last-child').hide();
var $ = $telerik.$;
var mode = args.get_mode();
if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert || mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
var recurrenceEditorJqueryObj = $("[id$='RangeEndDate']");
var recurrenceEditor = $find(recurrenceEditorJqueryObj.attr("id"));
var today = new Date();
today.setMonth(today.getMonth() + 6);
recurrenceEditor.set_selectedDate(today);

$(document).ready(function (event) {
$("#RadSchedulerRecurrenceEditor1_RepeatUntilGivenDate").attr('checked', true);
});
 

}
}
 
</script>
<script type="text/javascript">
$(document).ready(function (event) {
$("#RadSchedulerRecurrenceEditor1_RepeatUntilGivenDate").click(function () {
if ($('#RadSchedulerRecurrenceEditor1_RepeatUntilGivenDate').is(':checked')) {

if (RadSchedulerRecurrenceEditor1._getControl("RepeatUntilGivenDate").get_value() == "") {
alert("text is empty");
}
}
});
});
</script>

Plamen
Telerik team
 answered on 19 Jun 2015
1 answer
418 views

Hi,

We are using RadComboBox control in my asp.net application. Now we have upgraded our telerik library to 2014.2.618.45 telerik version. After upgrading the version, If I enter or select a new value from RadComboBox, it is not getting updated. Instead the old value is still retained in the control.

Scenario:

DataSource: String Array of times (Eg: "01:00 AM", "02:00 AM" and etc)

We have two text boxes one is getting start date and another one is for getting end date. Also we have two radcomboboxes one is for getting start time and another one is for end time and added custom validator (Performing this validation using JavaScript method) for both RadComboBox controls to validate end date time should be greater than start date time. 

  1. Assume while loading page the initial value of the controls "06/17/2015" "12:00 AM" in start date & time and "06/18/2015" "12:00 AM" in end date & time. 
  2. Now we are changing start date & time to "06/17/2015" "10:00 AM" and  end date & time to "06/17/2015" "11:00 AM". 
  3. While leaving the cursor from end time RadComboBox, the custom validator triggers the javascript method to validate and the date values in text boxes are getting changed to new one but the time value in the RadComboBoxes are not changed to new value. 
  4. Eventhough the new values are displayed in the RadComboBoxes, while debugging the JavaScript method, we see the previous value getting retained (Start Date time : "06/17/2015" "12:00 AM" and End Date Time "06/17/2015" "12:00 AM") and so the custom validator raises the error.

So please let us know why the RadcomboBoxes are retaining previous selected value instead of newly entered / selected one and also provide me an appropriate solution to resolve this issue.

Thanks,

Vishwam.

Plamen
Telerik team
 answered on 19 Jun 2015
2 answers
83 views

Issues:

1. When we select an image in RTE and then Apply CSS, the image loses focus and CSS is not applied to it. This issue is only in IE11.
2. When bulleting/numbering is enabled, we can unable to disable it with multiple enter key press in Chrome.

can you please help us in solving these issues ?

Khushboo
Top achievements
Rank 1
 answered on 19 Jun 2015
1 answer
71 views
how to Radhtml export pdf without client event or click event
Danail Vasilev
Telerik team
 answered on 19 Jun 2015
1 answer
45 views

Hey all,

I'm new to Telerik, can someone point me in a direction?  I'm trying to find a way to use a recordset of dates to highlight the cells of a calendar.  I know how to change the style of the cell, but I'm hoping I don't have to go one by one and loop thru them.  Ultimately, it would make sense to reload the calendar one month at a time, when a user changes it, but i'm not seeing anything out there like it.

 Also, is there a solid reference on the DayRenderEventArgs out there that i'm missing? 

Thanks.  I have a 2012.9 version I think.

 

~D

Eyup
Telerik team
 answered on 19 Jun 2015
4 answers
153 views

I have an issue with a custom Advanced Form and the Recurrence Editor Control.  I had the recurrence editor defaulting to being checked as 'End By Day'.  This is all working no problem when I choose New Appointment from the Context Menu or double click for a new appointment.  However, when we choose 'New Recurring Appointment' from the context menu it always chooses 'No End Date' as the selection criteria.  My question is how can I get the 'End By Date' to be selected when we open a 'New Recurring Appointment' from the context menu?

We have the following in the Page Pre Render when it is not initialized:

Dim endDateRadio As RadioButton = DirectCast(AppointmentRecurrenceEditor.FindControl("RepeatUntilGivenDate"), RadioButton)
endDateRadio.Checked = True

 

Plamen
Telerik team
 answered on 19 Jun 2015
1 answer
141 views

 When HTML code contains <br/> tag, it will automatically generate new <br/> tags on toggling between design & HTML tabs.

Can you please help us in solving these issues?

Ianko
Telerik team
 answered on 19 Jun 2015
8 answers
134 views
I am attempting to enable the filtering on a radrid.  I have the MasterTableView.AllowFilteringByColumn set to true.  When I run the application I get no errors, but when I click on the filter icon next to each Column I get a tiny empty box about the size of a checkbox.  The filter does not appear.
Erik
Top achievements
Rank 1
 answered on 18 Jun 2015
2 answers
127 views

I was looking through the forums and pieced together a few things to expand a group when you click the text, not just the little arrow. Just thought I'd share. 

I'm using a group header template b/c I like to customize the text. So here it is, in your template drop this in.

<groupheadertemplate>

<asp:label id="lblGridHeader" runat="server" Text='<%# Eval("someCol") %>' />
</groupheadertemplate>

 

Throw in this JS

<script type="text/javascript">

function toggleGroups(index) {

var gridClientID = '<%= RadGrid1.ClientID %>';
var grid = $find(gridClientID);
var masterTable = grid.get_masterTableView();
var groupToggles = masterTable._element.getElementsByTagName('INPUT');

if (index != null) {
if (index < groupToggles.length)
masterTable._toggleGroupsExpand(masterTable._element.getElementsByTagName('INPUT')[index], event);
}

else {
for (var i = 0; i < groupToggles.length; i++) {
masterTable._toggleGroupsExpand(masterTable._element.getElementsByTagName('INPUT')[i], event);
}
}
}
     
</script>

 Now, this part is so simple it's stupid. Took me a while before I realized how easy it was. Attach an ItemDataBound event to your grid. The, create a variable that's public for the page and initialize it to 0

MAKE SURE that is for the page, and not defined within the itemdatabound event. 

int _groupIndex = 0; //stored for the group index so we can expand/collapes on group row click

 Now, in the item data bound event, just do this. 

protected void gridCreqCat_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridGroupHeaderItem)
{
GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;

//this is an asp label b/c we need to render the <span> tag so we have something to click
Label headLbl = (Label)item.FindControl("lblGridHeader");
headLbl.Attributes.Add("onclick", "toggleGroups(" + _groupIndex.ToString() + ");");
_groupIndex++;
}
}

 

 

Michael
Top achievements
Rank 1
 answered on 18 Jun 2015
2 answers
255 views

Hello,

 

I have created a radgrid with some basic grouping functionality. I have filtering enabled for my ID column, which is also the fieldName value for my grouping. I noticed when I was trying to reduce the filter menu options to have only "no filter and "contains" the "contains" value was missing. I suspected initially that this may have been due to the fact that I was using the grouping feature, but even when I removed the grouping code from the aspx the "contains" filter option never shows up?

 

Am I missing something?

 

<telerik:RadGrid ID="RadGrid1" Skin="Outlook" 
                     ViewStateMode="Enabled" AllowFilteringByColumn="true"
                     OnNeedDataSource="RadGrid1_NeedDataSource" GridLines="Both" runat="server"
                     AutoGenerateColumns="false" AllowPaging="true">
                     <ClientSettings>
                      
                        <Selecting AllowRowSelect="true" />
                        <ClientEvents OnRowSelected="RadGrid1_RowSelected" OnRowDeselected="RadGrid1_RowDeselected" OnRowCreated="RadGrid1_RowCreated" OnGridCreated="RadGrid1_GridCreated"  />
                     </ClientSettings>
                        <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID" GroupLoadMode="Client" >
                        <SortExpressions>
                            <telerik:GridSortExpression FieldName="ID" SortOrder="Descending" />
                        </SortExpressions>
                          <GroupByExpressions >
                            <telerik:GridGroupByExpression >
                                <SelectFields>
                                    <telerik:GridGroupByField  FieldAlias="ID" FieldName="ID" HeaderText="Proposal No" FormatString="{0:D}">
                                    </telerik:GridGroupByField>
                                </SelectFields>
                                 
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="ID" SortOrder="Descending"></telerik:GridGroupByField>
                                </GroupByFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                        <Columns>
                            <telerik:GridBoundColumn AllowFiltering="true" DataField="ID" HeaderText="Proposal No." SortExpression="ID"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Revision" AllowFiltering="false"  HeaderText="Revision"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="partnumber" AllowFiltering="false" HeaderText="Part No."></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="quickship" AllowFiltering="false" HeaderText="Quickship No."></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="datequoted" AllowFiltering="false" HeaderText="Date Proposed"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="dateexpires" AllowFiltering="false" HeaderText="Date Expires"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="notes" AllowFiltering="false" HeaderText="Notes"></telerik:GridBoundColumn>
                        </Columns>
                     </MasterTableView>
                 </telerik:RadGrid>     

 

Thanks in advance,

Justin

Justin
Top achievements
Rank 1
 answered on 18 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?