Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
129 views
Hi,
I have a page which is designed with multiple RadPanelBars.its working fine in all aspects except one scenario.

Problem :
If I am in bottom of page, and in Last panel bar,If i do a post back then the page focus will go to first radpanelbar or top of page.

how can I persist the position or focus in bottom of page even after post back

Ex this is what i want

Panel A
********
*
*
*********
Panel B
**********
*
*
**********
Panel C
**********
*
*
**********
Panel D
**********
*
*
**********
Button

As of now when I click on button page focus is going to panel A,even though I was working on Panel D.

I need focus to be in Panel D ,after post back also

Thanks,
A2H
A2H
Top achievements
Rank 1
 answered on 16 Apr 2012
4 answers
100 views
Hi,

I want to set focus to a RadPanelItem from server side.

I have tried the following approach

  RadPanelItem pnlitem1 = (RadPanelItem)TestPanelBar.FindItemByValue("TestPanelItem");
                pnlitem1.Focus();
                pnlitem1.Expanded = true;

But this logic is not working.

Can any one please help me how to set focus to RadPaneltem through server side.

Thanks,
A2H
A2H
Top achievements
Rank 1
 answered on 16 Apr 2012
3 answers
136 views
Good morning all. I was wondering if anyone else has has this problem. I upgraded my Rad AJAX Control dlls and suddenly my main RadGrid isn't working on one of my pages. Funny thing is the Grid works on all other pages. If I add the old dlls from the previous version it works perfectly. The markup and the back-end C# has not changed at all, just a simple upgrade. Any advice on how to fix this?

Josh
pmourfield
Top achievements
Rank 1
 answered on 16 Apr 2012
1 answer
134 views
We have an issue where if a user opens the calendar to a date that excludes certain resources and then navigates to the next week, for example, where those resources should be visible, they do not appear.  As I understand it this is a limitation of Web Service binding mode where a calendar rebind does not rebind the resources just the events.  Is there a possible work around for this?

We can of course do a full postback for this but we would need to capture the date the user was intending to navigate to and implement a great deal more client side and server side logic to make sure we delivered them to their intended date. 

Ovi
Peter
Telerik team
 answered on 16 Apr 2012
1 answer
251 views
Hi,

i have 2 controls, textbox and datepicker,

i used tooltipmanager, how i remove all tooltip on the calendar, but keep the tooltip on the textbox ?

thanks in advance.
<telerik:RadScriptManager ID="RadScriptManagerDefault" runat="server" EnableScriptCombine="false">
       </telerik:RadScriptManager>
       <telerik:RadToolTipManager runat="server" ID="ToolTipManager" AutoTooltipify="true"
           Position="TopRight" Skin="Office2007">
       </telerik:RadToolTipManager>
       <br /><br /><br />
       <asp:TextBox ID="TextBox1" runat="server" ToolTip="halo"></asp:TextBox>
       <br /><br />
       <telerik:RadDatePicker ID="RadDatePicker1" runat="server" Width="110">
       </telerik:RadDatePicker>
       <br /><br />
       <telerik:RadDatePicker ID="RadDatePicker2" runat="server" Width="110">
       </telerik:RadDatePicker>
Shinu
Top achievements
Rank 2
 answered on 16 Apr 2012
1 answer
109 views
I know a lot of discussion are about it, probably i'm dumb enough to not see how to use them for my case.

ASPX: contains a couple of ASCX (ASCX1, ASCX2). It needs a radajaxmanager
ASCX2: within I have a radwindow. as i close it I need to perform  an AjaxRequest

How to?

First, where do i place my javascript?

        function OpenNewsCategory(ID, SelCat) {
            var wnd = $find("<%=RadWindowName.ClientID%>");
            wnd.show();
            wnd.setUrl("mypgae.aspx?ID=" + ID);
        }

        function closeRadWindow(oWnd, args) {
            var arg = args.get_argument();
            var arguments;

            if (arg) {           
                 if (arg.Index != '') {                
                    arguments = arg.Index + "," + arg.bSender;
                    alert('closeRadWindow parameters ' + arguments);
                }  
                oWnd.argument = null;
            }

            ajaxManager.ajaxRequest('closeRadWindow' + arguments);
        }

Second, I would like to manage the servside code of ajaxrequest within the usercontrol and the javascript too. is it possibile?
do i need radajaxproxy? if it's so, how?

Thank you
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Apr 2012
1 answer
193 views

Hi!

We wrote an acsx control and everything seems to work well except for the disabled state. Is it possible to override the image when disabled? (See attached image.) This does not seem to work. It appears to use the enabled images and then sets the opacity.

Thanks!
Michael

.checkboxUnchecked
{
    background: #EBEFF3 url('/Images/CheckBoxUnchecked.png') no-repeat 0px 50% !important;
}
 
.checkboxChecked
{
    background: #EBEFF3 url('/Images/CheckBoxChecked.png') no-repeat 0px 50% !important;
}
 
/* not working */
.checkboxChecked.rbDisabled
{
    background: #EBEFF3 url('/Images/CheckBoxCheckedDisabled.png') no-repeat 0px 50% !important;
}
 
 
 
 
<div id="divCheckboxControls" style="display: inline-block; white-space: nowrap; margin: 2px; padding: 10px; ">
    <asp:Label ID="labelRequiredField" runat="server" text="*" cssclass="labelrequiredstyle" Visible="false" />
    <asp:Label ID="labelForCheckBox" runat="server" text="#" cssclass="labelstyle" />
    <asp:Label ID="labelForReadOnlyData" runat="server" cssclass="labelstylereadonly" Visible="false" EnableViewState="true"/>
    <telerik:RadButton ID="checkBox" runat="server" ToggleType="CheckBox" ButtonType="ToggleButton" AutoPostBack="false" CssClass="checkBox" DisabledButtonCssClass="checkBox" CausesValidation="false" EnableViewState="true">
        <ToggleStates>
            <telerik:RadButtonToggleState Text="." PrimaryIconCssClass="checkboxChecked"/>
            <telerik:RadButtonToggleState Text="." PrimaryIconCssClass="checkboxUnchecked"/>
        </ToggleStates>
    </telerik:RadButton>
</div>
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Apr 2012
1 answer
43 views
hello,

Is this " telerik:RadAjaxLoadingPanel " supports all controls like treeview, sharepoint dialog box and other controls which are not supported by ajax update panel ?

what will be the work around to support for example if i have treeview in my page ?

waiting for your reponse.

thank you.

- darshan
Vasil
Telerik team
 answered on 16 Apr 2012
6 answers
152 views
I have a RadGrid with a GridImageColumn in it.  I have enabled sorting and am able to sort all columns except the GridImageColumn.  When I move the mouse over the GridImageColumn header, I do not have the option to click on it.  I have gone through the example and can't see what I'm missing.  I am assigning the image using the ItemDataBound event (see below).  Seems like it must be something simple...

Here is the RadGrid definition:
    <telerik:RadGrid ID="grdMain" runat="server" Width="100%" AutoGenerateColumns="False" ShowFooter="false" 
                                        GridLines="None" AllowMultiRowSelection="True" 
                                        BorderStyle="None" GroupingEnabled="False" 
        Skin="Windows7" onitemcommand="grdMain_ItemCommand" 
        onitemdatabound="grdMain_ItemDataBound" 
        onsortcommand="grdMain_SortCommand" AllowSorting="True">
    <ItemStyle Wrap="False" />
    <MasterTableView TableLayout="Fixed" Width="100%" >
    <RowIndicatorColumn>
    <HeaderStyle></HeaderStyle>
    </RowIndicatorColumn>
    <ExpandCollapseColumn>
    <HeaderStyle></HeaderStyle>
    </ExpandCollapseColumn>
        <Columns>
            <telerik:GridClientSelectColumn Resizable="false" Visible="true">
                <HeaderStyle Width="30px" />
            </telerik:GridClientSelectColumn>
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="cmdView" ImageUrl="~/images/properties.png" UniqueName="View">
                <HeaderStyle Width="25px" />
            </telerik:GridButtonColumn>
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="cmdUpdate" ImageUrl="~/images/edit.png" UniqueName="Update">
                <HeaderStyle Width="25px" />
            </telerik:GridButtonColumn>
            <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" 
                UniqueName="FirstName" DataFormatString="<nobr>{0}</nobr>">
                <HeaderStyle Width="100px" />
                <FooterStyle />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" 
                UniqueName="LastName">
                <HeaderStyle />
                <ItemStyle />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CardCode" HeaderText="Prox Card Code" 
                UniqueName="CardCode">
                <HeaderStyle Width="100px" />
                <ItemStyle />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DoorCode" HeaderText="Door Code"
                UniqueName="DoorCode" DataFormatString="<nobr>{0}</nobr>">
                <HeaderStyle Width="100px" />
                <FooterStyle />
            </telerik:GridBoundColumn>
            <telerik:GridImageColumn DataType="System.Int32" HeaderText="Enabled" DataImageUrlFields="Enabled" ImageAlign="Middle" AllowSorting="true"
                UniqueName="Enabled">
                <HeaderStyle Width="100px" HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridImageColumn>
        </Columns>
    </MasterTableView>
                    <HeaderStyle BorderStyle="Solid" BorderWidth="1px" Wrap="true" />
                    <ClientSettings AllowKeyboardNavigation="True" AllowRowsDragDrop="False">
                        <Selecting AllowRowSelect="True" />
                        <Scrolling AllowScroll="false" UseStaticHeaders="True" />
                        <Resizing AllowColumnResize="true" ClipCellContentOnResize="true" ResizeGridOnColumnResize="true" />
                    </ClientSettings>
                    <FooterStyle Wrap="false" />
</telerik:RadGrid

ItemDataBound Event:
if (e.Item is GridDataItem)
 {
       e.Item.Cells[grdMain.Columns.FindByUniqueName("Update").OrderIndex].ToolTip = "Update";
       e.Item.Cells[grdMain.Columns.FindByUniqueName("View").OrderIndex].ToolTip = "View";
                  
       bool _SystemAdmin = Convert.ToBoolean(DataBinder.Eval(e.Item.DataItem, "Enabled"));
       ((Image)(((GridDataItem)e.Item)["Enabled"].Controls[0])).ImageUrl = "~/images/check_mark_checked.png";
       if (!_SystemAdmin)
       {
           ((Image)(((GridDataItem)e.Item)["Enabled"].Controls[0])).ImageUrl = "~/images/check_mark_unchecked.png";
       }
   }
Eric
Top achievements
Rank 1
 answered on 16 Apr 2012
4 answers
93 views

I am trying to drag rows from a RadGrid containing all existing appointments to the scheduler in week-view. After dropping I want to check on collisions using your given clientside function overlapsWithAnotherAppointment.

Within the clientside RowDropping method I need to get the dragged appointment to pass it to overlapsWithAnotherAppointment. I tried getting this by using scheduler.get_appointments(). My problem now is the get_appointments() function only returns appointments which are visible within the Weekview-range.

We’re using Telerik 2011.2.915.40 using a custom SchedulerProvider in which we override the GetAppointments method. I can see this function does return all appointments, also the ones which are not visible.

What should I do so get_appointments() also returns the non-visible appointments ?

Thanks for any help,

Frank

Below are some code snippits of our implementation:


RadGrid from which rows are being dragged:

<
telerik:RadGrid ID="rgActiviteiten" runat="server" GridLines="None" OnNeedDataSource="rgActiviteiten_NeedDataSource" Width="100%" AllowFilteringByColumn="false" ShowHeader="false" OnRowDrop="rgActiviteiten_RowDrop" DataKeyNames="Activiteit_ID" EnableViewState="false" >
    <ClientSettings AllowRowsDragDrop="True">
        <Selecting AllowRowSelect="True" />
        <ClientEvents OnRowDropping="rowDropping" OnRowDblClick="onRowDoubleClick" />
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="Activiteit_ID" ClientDataKeyNames="Activiteit_ID" AllowFilteringByColumn="False">
        <Columns>
            <telerik:GridBoundColumn UniqueName="P_Naam" DataField="P_Naam" HeaderText="Product" ItemStyle-Wrap="false" ItemStyle-Width="335" />
            <telerik:GridBoundColumn DataField="Activiteit_ID" UniqueName="Activiteit_ID" Visible="true" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
 
Scheduler to which rows will be dropped:
<telerik:RadScheduler ID="rsSchedulerWithProvider" runat="server" ProviderName="MyDbSchedulerProvider"
        Width="1018px" Height="100%" Culture="nl-NL" FirstDayOfWeek="Monday" SelectedView="WeekView"
        HoursPanelTimeFormat="HH:mm" CustomAttributeNames="ActiviteitType_ID, Omschrijving, Activiteit_ID, Soort"
        EnableRecurrenceSupport="false" EnableExactTimeRendering="True" OnClientNavigationCommand="OnNavigationCommand"
        AllowDelete="false" AllowEdit="false" OnAppointmentsPopulating="rsSchedulerWithProvider_AppointmentsPopulating"
        OnTimeSlotCreated="rsSchedulerWithProvider_TimeSlotCreated" OnResourcesPopulating="rsSchedulerWithProvider_ResourcesPopulating"
        OnClientAppointmentEditing="OnClientAppointmentEditing" OnClientAppointmentInserting="CreateAppointment">
        <AppointmentTemplate>
                <i><%# Eval("Omschrijving")%></i>
        </AppointmentTemplate>
        <WeekView DayEndTime="22:00:00" WorkDayStartTime="08:00:00" WorkDayEndTime="22:00:00" />
        <DayView DayEndTime="22:00:00" WorkDayStartTime="08:00:00" WorkDayEndTime="22:00:00" />
        <MonthView UserSelectable="false" />
        <TimelineView UserSelectable="false" />
</telerik:RadScheduler>
 
ClientSide function which handles the drop:
function rowDropping(sender, eventArgs) {
 
    // Fired when the user drops a grid row
    var htmlElement = eventArgs.get_destinationHtmlElement();
 
    // Bij slepen van een appointment geen check
    var isActiviteit = sender.get_id().indexOf('rgActiviteiten') > -1;
 
    if (isPartOfSchedulerAppointmentArea(htmlElement)) {
        // The row was dropped over the scheduler appointment area
        // Find the exact time slot and save its unique index in the hidden field
        var timeSlot = scheduler._activeModel.getTimeSlotFromDomElement(htmlElement);
        $get("TargetSlotHiddenField").value = timeSlot.get_index();
 
        var activiteit = null;
        if (isActiviteit) {
            var activiteit_id = eventArgs.get_draggedItems()[0].getDataKeyValue("Activiteit_ID");
             
            // NEXT LINE WILL GO WRONG SINCE scheduler.get_appointments() DOESN'T CONTAIN THE DRAGGED ITEM IF IT'S ORIGINAL DATE WAS OUTSIDE THE WEEKVIEW-RANGE
            activiteit = scheduler.get_appointments().findByID(activiteit_id);
        }
 
        // Calculate the end time of the new appointment
        // By default, new appointments span 2 rows, so we multiply the minutesPerRow property by 2
        var endTime = new Date(timeSlot.get_startTime().getTime() + scheduler.get_minutesPerRow() * minute * 2);
 
        // Check if the new appointment is overlapping with one of the existing appointments
        var app = overlapsWithAnotherAppointment(activiteit, timeSlot.get_startTime(), endTime);
        if ( app >= 0 ) {              
                eventArgs.set_cancel(true); // Cancel the event to prevent showing the insert form
        }
 
        // The HTML needs to be set in order for the postback to execute normally
        eventArgs.set_destinationHtmlElement("TargetSlotHiddenField");
    }
    else {
        // The node was dropped elsewhere on the document
        eventArgs.set_cancel(true);
    }
}
Frank
Top achievements
Rank 1
 answered on 16 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?