Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
134 views
When the RadScheduler is in MonthView, I want to be able to highlight multiple days that span more than one week.  We have implemented a custom context menu when the user right-clicks in the highlighted area, that adds an all-day appointment for each day in the highlighted range once they have selected an option.  The problem is we can only highlight a week at a time (on the same row) to get this to work.  Once we span multiple rows, the date range does not work.

Is there some property that lets us achieve this?

function OnClientTimeSlotClick(sender, eventArgs) {
    if (!sender.get_readOnly()) {
        var startTime = sender._rowSelectionState.rowSelectionStartSlot._startTime;
        var endTime = sender._rowSelectionState.rowSelectionEndSlot._startTime;
        var dateStart = window.document.getElementById("<%= DateStart.ClientID %>");
        var dateEnd = window.document.getElementById("<%= DateEnd.ClientID %>");
        dateStart.value = startTime.toDateString();
        dateEnd.value = endTime.toDateString();
    }
}

Protected Sub RadScheduler_TimeSlotContextMenuItemClicking(ByVal sender As Object, ByVal e As TimeSlotContextMenuItemClickingEventArgs)
    Dim scheduler As RadScheduler = DirectCast(sender, RadScheduler)
    Dim MyDateStart As Date
    Dim MyDateEnd As Date
    If Me.DateStart.Value <> "" Then
        'date range set
        MyDateStart = CDate(Me.DateStart.Value)
        MyDateEnd = CDate(Me.DateEnd.Value).AddDays(1)
        If Not ((e.TimeSlot.Start >= MyDateStart) And (e.TimeSlot.End <= MyDateEnd)) Then
            'single cell is NOT within highlighted range; reset dates
            MyDateStart = e.TimeSlot.Start
            MyDateEnd = e.TimeSlot.End
        End If
    Else
        'date range NOT set
        MyDateStart = e.TimeSlot.Start
        MyDateEnd = e.TimeSlot.End
    End If
    For Each appt As Appointment In scheduler.Appointments.GetAppointmentsInRange(MyDateStart, MyDateEnd)
        'delete appointment(s)
        Appointments.Remove(FindById(appt.ID))
    Next
    AddAppointment(scheduler, MyDateStart, MyDateEnd, e.MenuItem.Text, e.MenuItem.Value)
End Sub
Bob
Top achievements
Rank 2
 answered on 01 Jun 2012
3 answers
427 views
1st problem: Probably a simply problem, the page runs fine but the ASP.NET Radcontrols don't display in the Designer - see attached screen capture - "Error Rendering Control - button" - in the Bin\ folder are: Telerik.Web.UI.dll, Telerik.Web.UI.Skins.dll and Telerik.Web.UI.xml. Again, it runs fine.

2nd problem: I can't drag any ASP.NET Radcontrol to the Designer, the control doesn't get placed on to the page. I CAN drag any Standard control (i.e. button, textbox, etc...) which works fine, but not Telerik controls. I've been typing them in the Source, but it'd be really nice to drag them too.

Thank you in advance!

Kind regards,
Derek
Derek
Top achievements
Rank 1
 answered on 01 Jun 2012
0 answers
97 views
Hello,

Prompt character is always showing in RadMaskedTextbox. I want to show Prompt character only when I focus on textbox,.

How can I do this ?
Atchut
Top achievements
Rank 1
 asked on 01 Jun 2012
2 answers
171 views
Hello,

Can we apply mask edit extender to rad numeric textbox ?

I want to use mask for my numeric textbox. 

Thanks in advance
Atchut
Top achievements
Rank 1
 answered on 01 Jun 2012
0 answers
386 views
Hi,

I have a grid with two GridButtonColumn columns. In the ItemCommand event handler I want to extract the key value of the clicked row. First, I've used the following technique:
var keyValue = (e.Item as GridDataItem).GetDataKeyValue("keyField"));

It worked with one of the columns but soon I've found out that it doesn't work with the other one. In this case it always extract the key value from the very first row. So I've used another technique (directly from your documentation):
GridDataItem item = MyGrid.Items[int.Parse(e.CommandArgument)];
var keyValue = item.GetDataKeyValue("keyField");

This technique works with the second column but - surprise, surprise :-) - it doesn't work with the first one (where e.CommandArgument is always empty).

OK, I can deal with it (when e.CommandArgument is empty use one technique, when not empty - another) but I'm curious, what is the rule. I don't set the CommandArgument value explicitly - in any case. The columns are not designed identically but the differences seem to be not vital:
  • CommandName standard (RadGrid.DeleteCommandName) / non-standard
  • ImageUrl declared / declared but further adjusted dynamically (ItemDataBound, ImageButton control found, its ImageUrl attribute adjusted)
  • not sortable / sortable

The worst is that I've tried to reproduce all that stuff in a test application but I've failed (only the first technique worked - e.CommandArgument was always empty).

Can the authors of RadGrid check, when they set CommandArgument to the index in the Items collection and when - not?

PS.
I'm using Q1 2010 version of RadControls for ASP.NET Ajax
Tomasz M.Lipiński
Top achievements
Rank 1
 asked on 01 Jun 2012
2 answers
128 views
I have been attempting to get a detail table working connecting through a LINQ data source in a Grid. When I attempt to expand the detail table, the ID for the SelectParameter is being passed through as null. Does anyone know why this might be happening?

ASPX code:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rgFacilities">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgFacilities" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid DataSourceID="ldsFacilities" AutoGenerateColumns="false" AllowPaging="True" PageSize="20" AllowSorting="True" ID="rgFacilities" runat="server">
    <MasterTableView DataKeyNames="FacilityID" DataSourceID="ldsFacilities" AllowMultiColumnSorting="False" GroupLoadMode="Server">
        <DetailTables>
            <telerik:GridTableView DataKeyNames="EquipmentID" DataSourceID="ldsEquipment" Width="100%"
                runat="server" AutoGenerateColumns="true">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="FacilityID" MasterKeyField="FacilityID" />
                </ParentTableRelation>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
            <telerik:GridBoundColumn SortExpression="Name" HeaderText="Facility Name"
                DataField="Name" UniqueName="Name">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="City" HeaderText="City"
                DataField="City" UniqueName="City">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="Region" HeaderText="State/Province"
                DataField="Region" UniqueName="Region">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="Country" HeaderText="Country"
                DataField="Country" UniqueName="Country">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn SortExpression="Description" HeaderText="Description"
                DataField="Description" UniqueName="Description" AllowSorting="false">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
 
<asp:LinqDataSource ID="ldsFacilities" OnSelecting="ldsFacilities_Selecting" runat="server">
</asp:LinqDataSource>
<asp:LinqDataSource ID="ldsEquipment" OnSelecting="ldsEquipment_Selecting" runat="server">
    <SelectParameters>
        <asp:SessionParameter Name="FacilityID" SessionField="FacilityID"/>
    </SelectParameters>
</asp:LinqDataSource>

Data Source Selecting Code:

protected void ldsFacilities_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
    Data.EcofitDataContext db = new Data.EcofitDataContext();
 
    e.Result = (from f in db.Facilities
                select f);
}
 
protected void ldsEquipment_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
    Data.EcofitDataContext db = new Data.EcofitDataContext();
 
 
    e.Result = (from eq in db.Equipments
                where eq.FacilityID == Guid.Parse(e.SelectParameters["FacilityID"].ToString())
                select eq);
}

Any help would be greatly appreciated!
Brendan
Top achievements
Rank 1
 answered on 01 Jun 2012
1 answer
124 views

See the Image .
How Can i Get the Value Of the Rad Filter In the server side

Thanks Advance,
Mohamed.
Richard
Top achievements
Rank 1
 answered on 01 Jun 2012
2 answers
136 views

When I have a RadDatePicker on a page that has Enabled = "false", the rendering causes an increased page size. Making it enabled again makes the problem go away.

Further more, if I make the dateinput portion of the raddatepicker invisible, the problem goes away.

Using Telerik 2012.1.215.40.

Here's the markup

<telerik:RadDatePicker ID="RadDateStart" Width="180px" EnableTyping="false" runat="server" EnableEmbeddedSkins="true" Enabled="false">
    <Calendar ID="Calendar1" UseRowHeadersAsSelectors="False" runat="server" UseColumnHeadersAsSelectors="False"
        ViewSelectorText="x" EnableEmbeddedSkins="true">
        <SpecialDays>
            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="#BCDDFF" />
        </SpecialDays>
    </Calendar>
    <DateInput ID="DateInput1" DisplayDateFormat="MMM dd, yyyy" runat="server" DateFormat="M/d/yyyy" ReadOnly="True">
    </DateInput>
    <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDatePicker>
Gerry
Top achievements
Rank 1
 answered on 01 Jun 2012
5 answers
1.2K+ views
Hi,

I've attached a screen shot of the issue.

Note that this only occurs when the DatePopupButton-Visible is set to false.

Here's the markup:
<tr id="trMRPShipDate" runat="server">
<td>MRP Ship Date</td>
<td></td>
<td>
<div style="position:relative; height:20px">
<telerik:RadDatePicker ID="dpMRPShipDate" Width="90px" EnableTyping="false" DatePopupButton-Visible="false"
style="position:absolute; top:0px; left:0px" runat="server" EnableEmbeddedSkins="true">
<Calendar ID="Calendar1" UseRowHeadersAsSelectors="False" runat="server" UseColumnHeadersAsSelectors="False"
ViewSelectorText="x" EnableEmbeddedSkins="true">
<SpecialDays>
<telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="#BCDDFF" >
<ItemStyle BackColor="#BCDDFF" />
</telerik:RadCalendarDay>
</SpecialDays>
</Calendar>
<DateInput ID="DateInput3" DisplayDateFormat="MMM dd, yyyy" runat="server" DateFormat="M/d/yyyy"
ReadOnly="True" AutoPostBack="True">
</DateInput>
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDatePicker>
<asp:ImageButton ID="imgCancelMRPShipDate" runat="server" ImageUrl="~/Pics/Cancel.gif" Style="position:absolute; top:4px; left:122px" OnClick="imgCancelShipDate_Click" Width="16px" Visible="false" />
<asp:LinkButton runat="server" ID="lnkShipDateChangeLog" Text="Change Log" style="position:absolute; top:4px; left:98px; white-space:nowrap" onclick="lnkShipDateChangeLog_Click" />
</div>
</td>
</tr>
Gerry
Top achievements
Rank 1
 answered on 01 Jun 2012
1 answer
77 views
Hi,

                      I implemented scheduler and i have one problem
i have my appintments on same day with same time..

means i have 2 appoointments at 9.00Am..i want to display same thing in scheduler in week view.

but both are overiding and display is not clear..

i want to display second apponitement in next line..how is it possible..

please provide me the solution...
Plamen
Telerik team
 answered on 01 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?