Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
138 views
hello 
while using grid template collumn and the dropdownlist control, i am trying to do update to the grid.
the grid is set to be always in edit mode.
while trying to use this:http://www.telerik.com/help/aspnet-ajax/grid-performing-batch-updates.html
i cannot get the values of the dropdown list.
why is that?
regards maor
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Jan 2013
1 answer
129 views
is there any way to Copy radchart and table by using button click event  in vb.net
Yavor
Telerik team
 answered on 24 Jan 2013
1 answer
608 views
hi all, i Beginner in RadScheduler control, i want create custom Appointment Template, i write this code
<telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Office2010Blue" DisplayRecurrenceActionDialogOnMove="True" ShowNavigationPane="True"
            OnClientTimeSlotContextMenuItemClicked="ClientTimeSlotContextMenuItemClicked" OnClientAppointmentContextMenuItemClicked="ClientAppointmentContextMenuItemClicked">
            <TimelineView UserSelectable="False" />
            <DayView UserSelectable="False" />
            <AppointmentContextMenus>
                <%--The appointment context menu interaction is handled on the client in this example--%>
                <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">
                    <Items>
                        <telerik:RadMenuItem Text="Detils" Value="detail">
                        </telerik:RadMenuItem>
                       
                       
                        <telerik:RadMenuItem Text="MoreStatus" Value="moreStatus">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadSchedulerContextMenu>
            </AppointmentContextMenus>
            <TimeSlotContextMenus>
                <telerik:RadSchedulerContextMenu ID="SchedulerTimeSlotContextMenu" runat="server">
                    <Items>
                        <telerik:RadMenuItem Text="New" Value="createNew" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
            </TimeSlotContextMenus>
            
            <AppointmentTemplate>
                <div class="rsAptSubject">
                    
                </div>
                <hr />
                <div style="font-style: italic; background-color: Lime"><%# Eval("FromTime")%></div>
            </AppointmentTemplate>
        </telerik:RadScheduler>

and c# code:
RadScheduler1.DataSource = _meetingService.AllMeetings().ToList()
       RadScheduler1.DataStartField = "FromTime"
       RadScheduler1.DataSubjectField = "Council.CouncilName"
       RadScheduler1.DataEndField = "ToTime"
       RadScheduler1.DataKeyField = "MeetingId"
       RadScheduler1.DataDescriptionField = "FromTime"
       ' RadScheduler1.SelectedDate = DateTime.Now
       RadScheduler1.DataBind()
but when run this page i get this error:

DataBinding: 'Telerik.Web.UI.Appointment' does not contain a property with the name 'FromTime'.


please help me for solve this problem. thanks Expert.
Plamen
Telerik team
 answered on 24 Jan 2013
2 answers
110 views
I have a RadGrid that I want to implement Row Drag & Drop as well as InPlace editing. If I set ClientSettings.Selecting.AllowRowSelect to True, then the textboxes in the Template Items do not accept input when in Update mode. I cannot place my insert cursor in the textboxes. The TextBoxes work fine when in Insert mode. If I turn off AllowRowSelect, then I can edit the textboxes. Any ideas?

Steve
Eyup
Telerik team
 answered on 24 Jan 2013
1 answer
106 views
Hello,

if i add a column at runtime in code-behind my layout breaks, i think the attached picture speaks for itself...

EDIT:
only happens with client-side scrolling on!

<ClientSettings>    
<
Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="False">         
</
Scrolling>
</
ClientSettings>




best regards
Eyup
Telerik team
 answered on 24 Jan 2013
2 answers
166 views
I would like to customize the monthview to different a different data than the dayview;
for that i tweaked the Appointment template and the AppointmentCreated event.
My problem is that the month view only shows one line, the title or header of the view and nothing more.
This behavior also messes with the pdf printing as what gets printed is what im seeing on the screen (maybe you should implement a PDFTemplate?)

Here are images of the DayView and the MonthView
Is it possible to have MonthView show what DayView shows?
Or alternatively, is it possible to print a custom set of Appointment fields, different than whats shown on MonthView? (I want to enable printing or pdf exporting on monthview but im having this display issue)
My markup:

              
 <tk:RadScheduler ID="sched" runat="server" AppointmentStyleMode="Default" DayEndTime="19:00:00" AllowInsert="true"                         AllowEdit="true" AllowDelete="true"<br>                    EnableDescriptionField="True" FirstDayOfWeek="Monday" LastDayOfWeek="Friday"<br>                    ShowNavigationPane="true" ShowFooter="true" StartEditingInAdvancedForm="true"<br>                    StartInsertingInAdvancedForm="true" Height="551px"<br>                    OnFormCreated="sched_FormCreated"<br>                    OverflowBehavior="Expand" <br>                    OnAppointmentCommand="sched_AppointmentCommand"<br>                    OnAppointmentCreated="sched_AppointmentCreated"<br>                    OnAppointmentDataBound="sched_AppointmentDataBound"<br>                    OnAppointmentDelete="sched_AppointmentDelete"<br>                    Skin="Web20"><br>                    <MonthView AdaptiveRowHeight="true" /><br>                    <AdvancedForm Modal="true" /><br>                    <ExportSettings OpenInNewWindow="true" FileName="Scheduler"><br>                        <Pdf PageTitle="Calendário" Author="CRA" Creator="CRA" Title="Calendário"></Pdf><br>                    </ExportSettings><br>                    <TimelineView UserSelectable="false" /><br>                    <AppointmentContextMenuSettings EnableDefault="true" /><br>                    <TimeSlotContextMenuSettings EnableDefault="true" /><br>                    <TimeSlotContextMenus><br>                        <tk:RadSchedulerContextMenu ID="SchedulerTimeSlotContextMenu" runat="server"><br>                            <Items><br>                                <tk:RadMenuItem Text="New Appointment" Value="CommandAddAppointment" /><br>                            </Items><br>                        </tk:RadSchedulerContextMenu><br>                    </TimeSlotContextMenus><br>                    <AppointmentContextMenus><br>                        <tk:RadSchedulerContextMenu runat="server" ID="ContextMenu1"><br>                            <Items><br>                                <%--<tk:RadMenuItem Text="Ir para dia" Value="CommandNavigateDay" />--%><br>                                <tk:RadMenuItem Text="Editar" Value="CommandEdit" /><br>                                <tk:RadMenuItem Text="Apagar" Value="CommandDelete" /><br>                                <%--<tk:RadMenuItem Text="Exportar Para PPF" Value="CommandExport"></tk:RadMenuItem>--%><br>                            </Items><br>                        </tk:RadSchedulerContextMenu><br>                    </AppointmentContextMenus><br>                    <AppointmentTemplate><br>                        <asp:Image runat="server" ID="imgRepeat" AlternateText="Repeat" ImageUrl="~/images/repeat.png" Width="15" Height="15" Visible="false"/><br>                        <asp:Label runat="server" ID="lblHeader" Font-Bold="true" /><br>                        <hr /><br>                        <table border="0"><br>                            <tr><br>                                <td style="border-color: transparent;"><span style="font-weight: bold;">Descricao: </span></td><br>                                <td style="border-color: transparent;"><br>                                    <asp:Label ID="lblDescription" runat="server" /></td><br>                            </tr><br>                            <tr><br>                                <td style="border-color: transparent;"><span style="font-weight: bold;">Participantes: </span></td><br>                                <td style="border-color: transparent;"><br>                                    <asp:Label ID="lblParticipants" runat="server" /></td><br>                            </tr><br>                            <tr><br>                                <td style="border-color: transparent;"><span style="font-weight: bold;">Duracao: </span></td><br>                                <td style="border-color: transparent;"><br>                                    <asp:Label ID="lblDates" runat="server" /></td><br>                            </tr><br>                            <tr><br>                                <td style="border-color: transparent;"><span style="font-weight: bold;">Local: </span></td><br>                                <td style="border-color: transparent;"><br>                                    <asp:Label ID="lblLocale" runat="server" /></td><br>                            </tr><br>                        </table><br>                    </AppointmentTemplate><br>                </tk:RadScheduler><br><div></div>


My AppointmentCreated :

 
<div>      protected void sched_AppointmentCreated(object sender, AppointmentCreatedEventArgs e) {<br><br>            using (DBFactory link = new DBFactory()) {<br>                int evtID = int.Parse(e.Appointment.ID.ToString());<br>                if (evtID == 0) {<br>                    evtID = SessionManager.Instance.LastInsertedCalendarEventID;<br>                }<br>                CalendarEvent ce = link.GetCalendarEvent(evtID);<br><br>                Label lblHeader = (Label)e.Container.FindControl("lblHeader");<br>                Label lblDescription = (Label)e.Container.FindControl("lblDescription");<br>                Label lbldates = (Label)e.Container.FindControl("lbldates");<br>                Label lblParticipants = (Label)e.Container.FindControl("lblParticipants");<br>                Label lblLocale = (Label)e.Container.FindControl("lbllocale");<br>                Image imgRepeat = (Image)e.Container.FindControl("imgRepeat");<br>                if (ce.RecurrenceType == "I") {<br>                    imgRepeat.Visible = true;<br>                }<br>                lblLocale.Text = string.Format("{0}", ce.EventLocation1.Location);<br>                lblHeader.Text = string.Format("{0} - {1} ", ce.EventType1.EventTypeName, ce.Subject);<br>                lblDescription.Text = string.Format("{0}", ce.Description);<br>                lbldates.Text = string.Format("{0:hh:mm}h - {1:hh:mm}h", ce.StartDate, ce.EndDate);<br>                lblParticipants.Text = string.Format("{0}", link.GetUsernamesFromEvent(evtID));<br><br>            }<br>        }<br></div>


Also, i had to re-implement recurrence because i couldnt find a good and complete tutorial on how to work with a RecurrenceEditor with templates as im doing.
Plamen
Telerik team
 answered on 24 Jan 2013
3 answers
929 views
Hi,
I would like to be about to validate that the date entered into a date picker control is either blank or a valid date. The examples use a required field validator to check that a valid date is entered. That works fine. But I would like the user to be able to enter a blank date and for that to be valid as well. But if they have entered a date then flag it as an error if the date is invalid.
Princy
Top achievements
Rank 2
 answered on 24 Jan 2013
4 answers
206 views
I have a master detail grid.  For the master grid, I use NeedDataSource.  In addtion, on the ItemDatabound event, I modify some of the columns (ex. I hide some of the command buttons for some rows).

When a row is expanded and DetailTableDataBind is fired, the detail table renders fine.  However, the modifications made to the parent table above via ItemDatabound are lost.  It is as if I need to rebind my parent table.  Have been unable to do that, though without losing my detail table view.

I posted the relevant code below. Any help would be greatly appreciated.  Thanks, Rick

void afterGrid_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
{
    var dataItem = e.DetailTableView.ParentItem;
     
    var memberId = dataItem.GetDataKeyValue("Id").ToString().ToInteger();
 
    using (var db = new DataContext())
    {
        var toBind = //retrieves the data
 
        e.DetailTableView.DataSource = toBind;
    }
}
 
void afterGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
    //Answers is name of detail data
    if (e.Item is GridDataItem && e.Item.OwnerTableView.Name != "Answers")
    {
        var item = (GridDataItem)e.Item;
        var cell = item["Remind"];
 
        if (cell.IsNotNull())
        {   //dont send if already submitted
            var data = (ReviewMember)item.DataItem;
 
            if (data.SubmitDate.HasValue)
            {
                cell.Controls.Clear();
           }
            else if (data.LastSavedDate.HasValue )
            {
                cell.Controls.Clear();
                cell.Text = "Sent";
            }
        }
    }
    else if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "Answers")
    {
        var item = (GridDataItem)e.Item;
        var data = (MemberResult)item.DataItem;
        var cell = item["Attach"];
 
        if (data.Question.Type != QuestionTypes.Upload)
        {
            cell.Controls.Clear();
        }
    }
}
 
void afterGrid_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName.Equals("Remind"))
    {
       //do some work       
       afterGrid.Rebind();
    }
    else if (e.CommandName == RadGrid.ExpandCollapseCommandName)
    {
        foreach (GridItem item in e.Item.OwnerTableView.Items)
        {
            if (item.Expanded && item != e.Item)
            {
                item.Expanded = false;
            }
        }
    }
}
Rick Atkinson
Top achievements
Rank 1
 answered on 24 Jan 2013
9 answers
557 views
I have a situation where I have one RadWindow dialog box appearing over top of another RadWindow dialog box. The smaller, topmost one simply provides the user with the ability to add a new item to a DropDown ListBox "on-the-fly".

I'm experiencing something I've never before seen with ASP.Net programming: The button's event handler does not always fire.  It *seems* to fire more consistently when I have a breakpoint in the code, which allows me to debug it in Visual Studio.

I'm posting this quandary in the RadWindow forum because I'm wondering if the presence of the two RadWindows is somehow causing a conflict with the event handling mechanism of ASP.Net.

Might anyone have any ideas how to solve this problem?

Robert
Robert
Top achievements
Rank 1
 answered on 24 Jan 2013
2 answers
134 views
Please take a look at the attached screenshots.  The lowermost dropdown listbox is your RadComboBox.

The first screenshot shows the user selecting an item in the list.  The second screenshot shows the selected item after the list has collapsed.

Both of my questions concern the second screenshot:
  1. How/where can I change how the selected info is displayed?  Ideally I'd like to add some spaces after the "Pass" value (the "240" in the example).  I'd also like to make the "Pass" value bold if I could.
  2. The yellow background highlighting is because of some global jQuery code that automatically sets the background of all textboxes on each form to yellow upon receiving focus and then removes the yellow when focus is lost.  The code looks like this:
            $(":text").focus(TextboxHighlightAndSmartSelect).blur(TextboxRemoveHighlight);
    This works great and has no effect on the traditional DropDownList control.  However, I believe it's doing its thing on your control because of the TextBox component inside it.  Ideally I'd prefer not to mess with the global jQuery code and instead would just like to nullify the added "focus" event handler for the RadComboBox only.  I tried a few things to do this but couldn't figure it out.

Robert

Robert
Top achievements
Rank 1
 answered on 24 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?