Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
201 views
Hi All,

   I have a RadPane inside the RadSplitter control. I want to set the background image for the RadPane.
I tried to use cssclass, in which I set the background image, but it is not working. if I set the background color using cssClass, it is working fine.
Please help me to resolve this.

Thanks,

V. Raguraman.
Vessy
Telerik team
 answered on 22 Apr 2013
4 answers
127 views
Hello All,
        I created radscheduler in asp.net application, i bind the sql table values in to radscheduler. in month view for particular day i have more than 50 appointments there, so radscheduler only shows 5 appointments and they show more option, if i click the more option in month view it will throw the f is null or not an object error
       Could anyone face this issue before please reply me, i want to resolve this

Thanks.
Kate
Telerik team
 answered on 22 Apr 2013
52 answers
3.2K+ views
I am trying to change to the new AjaxManager and AjaxPanel and right off the bat I am getting the following error:

Source: System.Web
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Inner Exception: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Stack Trace: at System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) at Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) at Telerik.Web.UI.RadAjaxControl.PerformRender() at Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) at Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Form:
Query String:
Target Site: Boolean HandleError(System.Exception)


All i have done is change the radA:RadAjaxPanel to telerik:RadAjaxPanel.  I also added the <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> tag to the top of the page.  I also put a ScriptManager on the page.  Is there something I missed?

Thanks,  Jason

Tim
Top achievements
Rank 1
 answered on 22 Apr 2013
2 answers
124 views
I've been unable to find an answer to what I would think should be a simple syntax question, but what's the difference between the following tags:  <%# .... %>  and <%= ..... %>?

My hunch is that the only difference is after which page function the data is retrieved; however, I'm not about this.
Winney
Top achievements
Rank 1
 answered on 22 Apr 2013
3 answers
151 views
I have several usercontrols that utilize many RadDock elements. These usercontrols are loaded as content for multiview pages.
This is an excerpt from my default.aspx
<telerik:RadMultiPage ID="radShifts" runat="server" BorderColor="Black" BorderStyle="Inset" BorderWidth="2px" SelectedIndex="0" Width="100%">
                <telerik:RadPageView ID="pvActiveShifts" runat="server">
                    <uc2:activeshifts runat="server" />
                </telerik:RadPageView>
                <telerik:RadPageView ID="pvActivePending" runat="server">
                    <uc2:activeshiftspending runat="server" />
                </telerik:RadPageView>
                <telerik:RadPageView ID="pvCancelledPending" runat="server">
                    <uc2:cancelledshiftspending ID="cancelledshiftspending" runat="server" />
                </telerik:RadPageView>
                <telerik:RadPageView ID="pvCancelledArchived" runat="server">
                    <uc2:cancelledshiftsarchived ID="cancelledshiftsarchived" runat="server" />
                </telerik:RadPageView>
</telerik:RadMultiPage>

This is a sample usercontrol for uc2:activeshifts (I removed all of the controls in the content template to save space). This exact control can be considered identical for the remaining usercontrols.
<telerik:RadDockLayout ID="dockLayout1" runat="server" >
    <telerik:RadDockZone ID="zone1" runat="server" Orientation="Vertical" BorderStyle="None" Skin="Black">
        <telerik:RadDock ID="dockActiveShiftsFilter" runat="server" Skin="Black" Width="100%" DefaultCommands="None" Title="Filter" DockMode="Docked">
            <ContentTemplate>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="dockActiveShiftsFilled" runat="server" Skin="Black" 
            Width="100%" DefaultCommands="ExpandCollapse" Title="Shifts Filled" 
            DockMode="Docked">
            <ContentTemplate>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="dockActiveShiftsAvailable" runat="server" Skin="Black" Width="100%"
            DefaultCommands="ExpandCollapse" Title="Shifts Available" 
            DockMode="Docked">
            <ContentTemplate>
            </ContentTemplate>
        </telerik:RadDock>
    </telerik:RadDockZone>
</telerik:RadDockLayout>

On each usercontrol, I have a button that refreshes the current multipageview, when I select the button to refresh the content, the other pageview docks are rearranged in order on the page.

Each usercontrol uses a different dockzone and docklayout, so the controls shouldn't be affecting them. Is there a way to prevent the other docks from rearranging on postback?
Keith
Top achievements
Rank 2
 answered on 22 Apr 2013
3 answers
64 views
When you select a document in the document manager, the preview panel populates and the Insert button enables.  If you then delete the selected document, the data in the preview panel remains, and the Insert button is still enabled.  If the user clicks Insert, then a link is created to the document that was just deleted.

Is there a way to reset the preview panel, after the document is deleted?

Thanks!
Dave
Vessy
Telerik team
 answered on 22 Apr 2013
4 answers
135 views
I have the following Setup

TabStrip 1
TabStrip 2

TabStrip A
TabStrip B

If I click on a Tab in TabStrip 1 I populete TabStrip A + B
If I click on a Tab in TabStrip 2 I populate TabStrip A + B 

Now when I click on a Tab off TabStrip A or B I need to know if TabStrip 1 or TabStrip 2 populated the Tabstrips A + B

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

Kind of  hard to explain.

Look here to understand: http://uebersetzung.gebetsanliegen.ch/en/verse/default.aspx

Left side bible books of Old Testament. If I click a book 1. Mose (Genesis) I populate TabStrip A with the available chapters and TabStrip B with the available verses in that chapter.

Right side bible books of the New Testament. If i click on book Matthäus (Mathew)  I populate TabStrip A with the available chapters and TabStrip B with the available verses in that chapter.

Now the problem is that when I click on a verse from TabStrip B - I need to know which TabStrip was used to populate (Old or New Testament)

I could have TabStrips C + D and show hide when either TabStrip 1 or 2 is clicked but would like to have simple.

Any idea how to have this done (all Ajax)

Markus
Kate
Telerik team
 answered on 22 Apr 2013
1 answer
110 views
hey Guys - i've got a bit of a head scratcher here. i've got a combobox on a grid. i bind it on item databind. if the box comes up empty - no problem - you just click and it'll go get the list and fires the server method: OnItemsRequested.

the weird part is - if the combobox has data in it - it doesn't fire the OnItemsRequested event, but i can clear out the contents and it fires just fine.
is there something i'm missing here? it's got to be something simple. i've included partial markup for the grid - the databind method & the combobox method.
any help is totally appreciated.
thanks
rik

RAD GRID MARKUP:::

 

<telerik:RadGrid ID="WorkOrderItemsRadGrid" runat="server" AllowPaging="true" AutoGenerateColumns="false"

                        Skin="WebBlue" PageSize="8" EnableTheming="false" AllowFilteringByColumn="false" AllowCustomPaging="false"

                        OnItemDataBound="WorkOrderItemsRadGrid_ItemDataBound" OnNeedDataSource="WorkOrderItemsRadGrid_NeedDataSource"

                        Width="100%" OnItemCreated="WorkOrderItemsRadGrid_ItemCreated" AllowMultiRowSelection="true">

                        <GroupingSettings CaseSensitive="false" />

                        <PagerStyle Mode="NextPrevAndNumeric" />

                        <MasterTableView DataKeyNames="WORKORDERNUMBER,LOCATIONID,WORKORDERID,WORKORDERDETAILID,WOTYPENAME,LASTUPDATED,RACKNUMBER,LASTUPDATEDBY,MATERIALTYPE,MATERIALTYPEID,MATERIALDESCRIPTION"

                         CommandItemSettings-ShowAddNewRecordButton="false" EditMode="PopUp" CommandItemDisplay="Top"

                        AllowSorting="true" CommandItemSettings-RefreshText="Refresh" CommandItemSettings-RefreshImageUrl="~/App_Themes/GOLD Main/ToolBar/refresh_16x16.gif" >

                            <HeaderStyle HorizontalAlign="Left" />

                            <Columns>

                                <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="100px" UniqueName="RackNumberColumn"

                                    ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="Rack">

                                    <ItemTemplate>

                                        <telerik:RadComboBox ID="RackNumberGridComboBox" runat="server" Width="90px" Height="160px"

                                            Skin="WebBlue" EnableLoadOnDemand="true" AutoPostBack="true" OnItemsRequested="RackNumberGridComboBox_ItemsRequested"

                                            AllowCustomText="false" HighlightTemplatedItems="true" DataValueField="RACKID"

                                            DataTextField="RACKNUMBER" DropDownWidth="210px">

                                            <HeaderTemplate>

                                                <ul class="woCustomerDropDown" style="width: 180px;">

                                                    <li class="woCustomerCol" style="width: 120px;">Rack Number</li>

                                                    <li class="woCustomerCol" style="width: 60px;">Utilization</li>

                                                </ul>

                                            </HeaderTemplate>

                                            <ItemTemplate>

                                                <ul class="woCustomerDropDown" style="width: 180px;">

                                                    <li class="woCustomerCol" style="width: 120px;">

                                                        <%# DataBinder.Eval(Container.DataItem, "RACKNUMBER") %></li>

                                                    <li class="woCustomerCol" style="width: 60px;">

                                                        <%# DataBinder.Eval(Container.DataItem, "UTILIZATION") %></li>

                                                </ul>

                                            </ItemTemplate>

                                        </telerik:RadComboBox>

                                    </ItemTemplate>

                                </telerik:GridTemplateColumn>

                                <telerik:GridBoundColumn DataField="WORKORDERITEMDISPLAY" HeaderText="Work Order"

                                    HeaderStyle-Width="80px" FilterControlWidth="60px" />

                               

                            </Columns>

                        </MasterTableView>

                    </telerik:RadGrid>

RAD GRID DATABIND:

protected void WorkOrderItemsRadGrid_ItemDataBound(object sender, GridItemEventArgs e)

        {

            GridCommandItem cmndItem = (GridCommandItem)WorkOrderItemsRadGrid.MasterTableView.GetItems(GridItemType.CommandItem)[0];

            LinkButton btn = (LinkButton)cmndItem.FindControl("RebindGridButton");

            ((System.Web.UI.WebControls.TableCell)(btn.Parent)).HorizontalAlign = HorizontalAlign.Left;

 

            if (e.Item is GridDataItem)

            {

                GridDataItem boundItem = (GridDataItem)e.Item;

                string wonumber = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["WORKORDERNUMBER"]);

                string woid = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["WORKORDERID"]);

                string locationid = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["LOCATIONID"]);

                string wodetailid = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["WORKORDERDETAILID"]);

                string lastracknumber = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["RACKNUMBER"]);

                string lastrackid = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["RACKID"]);

                string lastupdate = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["LASTUPDATED"]);

                string lastupdateby = Convert.ToString(boundItem.OwnerTableView.DataKeyValues[boundItem.ItemIndex]["LASTUPDATEDBY"]);

                int materialtypeid = Convert.ToInt32(boundItem.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["MATERIALTYPEID"]);

                string materialdesc = boundItem.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["MATERIALDESCRIPTION"].ToString();

 

                if (lastracknumber != "")

                {

             RadComboBox rackBox = boundItem.FindControl("RackNumberGridComboBox") as RadComboBox;

 

                    using (TruckingBC tbc = new TruckingBC())

                    {

rackBox.DataSource = tbc.GetRackNumbers(DivisionID,lastracknumber);

                          rackBox.DataBind();

                                            }

                }

 

        }

 

 

 

COMBO BOX ON GRID EVENTS:

 

 

protected void RackNumberGridComboBox_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)

        {

            RadComboBox comboBox = (RadComboBox)sender;

            using (TruckingBC tbc = new TruckingBC())

            {

                comboBox.DataSource = tbc.GetRackNumbers(DivisionID);

                comboBox.DataBind();

            }

        }

 

 

Hristo Valyavicharski
Telerik team
 answered on 22 Apr 2013
3 answers
236 views

Hello,

I am attempting to display the appointments created by a radscheduler on the radcalendar (simply by highlighting the day on the calendar and populating the tooltip). It appears that there is no clear way to integrate the scheduler with the calendar. The reason this is difficult is because of the recurring requests. The radscheduler receives a pattern and does all the work for you. To highlight the days on a radcalendar, I don't want to have to parse the pattern myself. My idea was...to create an invisible radscheduler, populate it, and in some appointment rendering event, create a list of appointments to display in the calendar. So far my problem is, I can't find the right event...radSched_AppointmentDataBound does not fire for every appointment in a recurrence, just the first run. Below is an example of what I was attempting in the AppointmentDataBound event.

protected void radSched_AppointmentDataBound(object sender, SchedulerEventArgs e)
        {
            RadCalendarDay rcd = new RadCalendarDay();
            CalendarEventItems cei;
              
            rcd.Date = e.Appointment.Start;
            rcd.ToolTip = e.Appointment.Subject;
            rcd.ItemStyle.BackColor = System.Drawing.Color.Red;
  
            if (DateTime.Now < rcd.Date)
            {
                cei = new CalendarEventItems();
                cei.EventStartDateTime = e.Appointment.Start;
                cei.EventName = e.Appointment.Subject;
                cei.EventEndDateTime = e.Appointment.End;
                cei.EventDescription = e.Appointment.Description;
                lsUpcomingEvents.Add(cei);
            }
  
            radCal.SpecialDays.Add(rcd);
        }


Is there a different event or strategy I can use to grab each appointment for a given month? Is there some other way I can integrate the radscheduler into a radcalendar? Somebody else has had to have had this idea before...

Markus
Top achievements
Rank 2
 answered on 22 Apr 2013
2 answers
203 views
I am converting an app to RadGrid controls, and I would like advice on the best way to convert some code that I had running in a DataGrid's RowDataBound event:
Private Sub gvAvailableTasks_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvAvailableTasks.RowDataBound
 
        If Not gvAvailableTasks.SelectedRow Is Nothing Then
            If gvAvailableTasks.SelectedRow.ID = e.Row.ID Then
                Exit Sub
            End If
        End If
 
        If e.Row.RowType = DataControlRowType.DataRow Then
            Dim dd As DateTime
            dd = CType(e.Row.Cells(6).Text, DateTime)
 
            If dd < Date.Now Then
                e.Row.Cells(6).BackColor = Drawing.Color.Red
            Else
 
                If DateDiff(DateInterval.Hour, Date.Now, dd) < 5 Then
                    e.Row.Cells(6).BackColor = Drawing.Color.Orange
                ElseIf DateDiff(DateInterval.Hour, Date.Now, dd) < 9 Then
                    e.Row.Cells(6).BackColor = Drawing.Color.Yellow
                End If
            End If
 
            ' Alert message
 
            Dim s As String = e.Row.Cells(5).Text
 
            If s.Trim <> " " And s.Trim <> "" Then
                e.Row.Cells(5).BackColor = Drawing.Color.Yellow
            End If
 
        End If
    End Sub

Basically the code changes the color of the due date to let the user know what is late. The last bit changes the background color if an alert message exists.

Thanks for your help!
David
Top achievements
Rank 1
 answered on 22 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?