Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
210 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
47 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
155 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
3 answers
288 views
How do I go about passing a parameter into the PostBackUrl property?

I would be interested in being able to do something like this:

<telerik:RadComboBox ID="combobox" runat="server" AutoPostBack="true" DataTextField="Text"
DataValueField="Value" PostBackUrl="somepage.aspx?somevalue={0}" Width="200px">
</telerik:RadComboBox>

Where {0} would be a property on the model I'm binding to the ComboBox.

Thanks,
Peter
Telerik team
 answered on 16 Apr 2012
6 answers
169 views
I'm trying to use TreeView and GridView with Entity Framework. I have a page with one TreeView, one GridView, each with it's own EntityDataSource. This far it's working.
Now I want to filter the data in the grid, so I configure the Where property of it's datasource to filter where it.CategoryID = @CategoryID. And I bind the parameter @CategoryID to the TreeView.SelectedValue. This doesn't work: All items are shown in the grid regardless which category I select in the tree. :(
If I replace the TreeView with a ComboBox, the filter works ...
Plamen
Telerik team
 answered on 16 Apr 2012
4 answers
224 views
We just discovered an issue with some RadComboBox behavior that doesn't seem quite right. We recently set the MarkFirstMatch="true" property and were running into new errors due to the combo box's SelectedValue="". It seems as though when this property is set to true that the combo box does not default to the first item during page load like it normally does. However, after the page is loaded the SelectedValue is correctly set to the first item in the drop down. 
        protected void btnTest_Click(object sender, EventArgs e) 
        { 
            MessageBox.Show(m_ddltest.SelectedValue.ToString()); 
        } 
 

To recreate this scenario we setup a little test project. Please note that the combo box is never clicked during this test. We simply load it and expect (by default) that the first item in the combo box should be selected by default.

Mark-up
    <telerik:RadComboBox ID="m_ddltest" runat="server" MarkFirstMatch="true"></telerik:RadComboBox> 
    <tst:TstButton ID="m_btnTest" runat="server" OnClick="btnTest_Click" /> 
 

Code in Page_Load where we load up the combo box. If you step through this code you will see that the SelectedValue = ""
        protected void Page_Load(object sender, EventArgs e) 
        {                
           m_ddltest.DataSource = InsuredUnitsFromSession; 
           m_ddltest.DataValueField = "InsuredUnitId"
           m_ddltest.DataTextField = "Name"
           m_ddltest.DataBind(); 
 
           string test = m_ddltest.SelectedValue.ToString(); 
        } 

However, when you click the test button the SelectedValue property is now correctly set. Why is the SelectedValue = "" during the loading of the combo box in Page_Load?
        protected void btnTest_Click(object sender, EventArgs e) 
        { 
            MessageBox.Show(m_ddltest.SelectedValue.ToString()); 
        } 
 

Thanks in advance for your assistance.
Jonathan


FvLent
Top achievements
Rank 2
 answered on 16 Apr 2012
4 answers
74 views
Updated to the new VS extension, running 2012.1.320. Have 2012 Q1 of radcontrols loaded
Created a new project generated with telerik vb web app template.
Added Scheduler Custom Edit template scenario, set as start page, code breaking in RadInputScript.js, line 308, which makes sense as line 307 just wiped it out.
Added scenario for advanced form, set that as start page, getting "Microsoft JScript runtime error: 'bind(...).bind(...).0' is null or not an object. Breaks to Advanced Form.js, line 628.
Switch back to custom edit page as start, and now it does run when I go to advanced options while insert or edit an appointment. So, somehow the borderRightWidth is ok.
Are the scenarios generated via the VS extensions or are they part of the radcontrols install?
Has anyone else tried the scenarios, with no edits, to see if they run? Should they run without any edits? Do they make changes to the web.config file as well as the forms etc. that are added?
Newbie, here, so don't know about the scenarios completeness. Looked like it was a good place to start via the videos...
Thanks for any info provided...
Brenda
Peter
Telerik team
 answered on 16 Apr 2012
3 answers
178 views

I have routes defined for all my pages in .Net. 

RouteTable.Routes.MapPageRoute("UploadPage", "upload/", "~/upload.aspx")

Then when I use the upload control it tacks on the RadUrid, which I don't have a route defined for and it causes an error. 

If I define an additional route.

Like ,

RouteTable.Routes.MapPageRoute("UploadPage", "upload/{radurid}", "~/upload.aspx") 

So it doesn't cause an error, but will it still work correctly, since it's no longer in the request.querystring, but instead pages.routdata.values ?


Bozhidar
Telerik team
 answered on 16 Apr 2012
1 answer
120 views
Good Morning,

We have recently upgraded our RadEditor within our MOSS 2007 sites to version 5.8.14.  The only issue we have at the moment is that when we use the Image Manager from within the editor whereby the Image Manager is showing Thumbnails the images contained in an Image Library, is there a way we can disable this functionality and switch to lists / grid view?

Using thumbnails is proving quite slow for us when the image library contains a large amount of images. 

Any help would be greatly appreciated.

Thanks
Hefin Jones
Stanimir
Telerik team
 answered on 16 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?