Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
19 views

I have a RadGrid that required two separate Edit Buttons used for InPlace EditMode. I have created two GridButtonColumns each with a unique CommandName. I am capturing these button presses in the RadGrid.ItemCommand method. What I need, however, is some way of displaying a Confirm and a Cancel button while in Edit Mode for each of these edit buttons.  How can I achieve this?

Thanks!

Vasko
Telerik team
 answered on 12 Jun 2024
1 answer
17 views

If I set the background color of dates in a raddatepicker the background color will show when I hover over the date but not before I do.

If I set the render mode to lightweight the background color does show upon the raddatepicker showing.

Does anyone else have this problem?

Here is the control

<telerik:RadDatePicker ID="rdpPickUpDate" runat="server"  >
   <Calendar OnDayRender="Calendar_OnDayRender" ></Calendar>
</telerik:RadDatePicker>

 

Here is the code to set the background color to red for Mondays

        protected void Calendar_OnDayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
        {
            if (e.Day.Date.DayOfWeek == DayOfWeek.Monday)
            {
                RadCalendarDay calendarDay = new RadCalendarDay();
                calendarDay.Date = e.Day.Date;

                calendarDay.ItemStyle.BackColor = System.Drawing.Color.Red;


                calendarDay.Repeatable = Telerik.Web.UI.Calendar.RecurringEvents.DayAndMonth;

                rdpPickUpDate.Calendar.SpecialDays.Add(calendarDay);
            }
        }

 

Does anyone have any ideas

Vasko
Telerik team
 answered on 10 Jun 2024
4 answers
38 views
When I click "Get latest" the 2024.2.513 version is downloaded but does not appear in the dropdownlist so I cannot apply the update to my projects.
Rumen
Telerik team
 answered on 10 Jun 2024
1 answer
17 views

We have the RadImageGallery implemented on page. The code behind loads up one or more images by reading in an array of bytes from each file.  Occasionally, an exception is thrown when one of those images is invalid (corrupt or some other issue).  OK, that's fine, but we would like to trap the exception and handle the error in a particular way.  But... we don't seem to be able to trap it other than in our last-chance global exception handler.

The binary data is created in the NeedDataSource event, and that returns successfully.  I've added other events and set breakpoints in each of them, and they all return ok.  So, is there an event we can handle that would be appropriate for a simple try/catch block?

Pretty simple markup for the RadImageGallery control (note, all the events after the OnNeedDataSource were added simply to test out if there was a place we could try/catch the exception, but no exception was thrown in those events):

    <telerik:RadImageGallery ID="galleryImages" runat="server" RenderMode="Lightweight"
        DisplayAreaMode="Image" LoopItems="true" DataImageField="ImageBytes" DataDescriptionField="Description" DataTitleField="Title"
        OnNeedDataSource="galleryImages_NeedDataSource"
        OnDataBinding="galleryImages_DataBinding"
        OnImageRequested="galleryImages_ImageRequested" 
        OnItemCreated="galleryImages_ItemCreated" 
        OnPreRender="galleryImages_PreRender">
    </telerik:RadImageGallery>

 

Code behind for NeedDataSource (which returns successfully):

    protected void galleryImages_NeedDataSource(object sender, Telerik.Web.UI.ImageGalleryNeedDataSourceEventArgs e)
    {
        galleryImages.Visible = false;

        FileManager fileManager = new FileManager ();
        DataTable dt = fileManager.GetFileList();
        var imageFiles = fileManager.GetGalleryImages(dt);

        if (imageFiles.Count() == 0)
        {
            txtNotes.Text = "There are no image files to display.";
            return;
        }

        try
        {
            galleryImages.DataSource = imageFiles;
            galleryImages.Visible = true;
        }
        catch (Exception ex)
        {
            LogException(ex);
            ErrorMessage("An unexpected occurred while reading one or more the image files");
        }

        if (fileManager.HasErrors)
        {
            txtErrors.Text = "The following errors were encountered:<br/><ul>" + String.Join("<li>", fileManager.ErrorList) + "</ul>";
        }
    }

 

Library code that reads image files into byte arrays (also return successfully):

        public List<GalleryImage> GetGalleryImages(DataTable srcDataTable)
        {

            //...


            foreach (DataRow dr in query)
            {
                CustomImageFile f = new CustomImageFile(dr);                

                try
                {
                    byte[] byteArray = File.ReadAllBytes(f.FullFileName);
                    GalleryImage img = new GalleryImage
                    {
                        ImageBytes = byteArray,
                        Description = $"{f.Description}", // [{f.Name}]
                    };
                    imageList.Add(img);
                }
                catch (Exception ex)
                {
                    Errors.Add($"{f.Name} could not be read");
                    LogException(ex);                    
                }
            }
            return imageList;
        }

 

Yet when there is an invalid file encountered, we get this:

[ArgumentException: Parameter is not valid.]
   System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) +1162080
   Telerik.Web.UI.BinaryImageFormatHelper.CreateImgFromBytes(Byte[] data) +69

[ArgumentException: The provided binary data may not be valid image or may contains unknown header]
   Telerik.Web.UI.BinaryImageFormatHelper.CreateImgFromBytes(Byte[] data) +120
   Telerik.Web.UI.BinaryImageTransformationFilter.ProcessImageInternal(Byte[] image) +44
   Telerik.Web.UI.BinaryImageTransformationFilter.ProcessImage(Byte[] image) +20
   Telerik.Web.UI.BinaryImageFilterProcessor.ProcessFilters(Byte[] imageData) +112
   Telerik.Web.UI.RadBinaryImage.ProcessImageData() +57
   Telerik.Web.UI.RadBinaryImage.OnPreRender(EventArgs e) +20
   System.Web.UI.Control.PreRenderRecursiveInternal() +90
   System.Web.UI.Control.PreRenderRecursiveInternal() +163

 

Attila Antal
Telerik team
 answered on 07 Jun 2024
1 answer
13 views

Hello,

Is Editor support both rtl and ltr modes for editor content? For ex. Is it possible to create a table with 2 columns, where left column content is ltr on english and right column is rtl on arabic?

For a while I found only separate examples and not found rtl/ltr buttons in the Editor.

Rumen
Telerik team
 answered on 06 Jun 2024
1 answer
17 views

If you have a page with Telerik UI for ASP.NET AJAX RadHtmlChart and try to add Kendo UI for jQuery Notification to that page...
The JavaScript:

var notif = jqueryobject.kendoNotification({appendTo: "#appendto"}).data("kendoNotification");

You cannot call notif.show() because notif is undefined.
We added a kendoNotification to our skin and on pages that use Telerik UI for ASP.NET AJAX RadHtmlChart causes this problem. Other pages with other Telerik UI for ASP.NET AJAX controls work fine.
We have also seen this issue on one other Telerik UI for ASP.NET AJAX control: RadClientDataSource
Any work-around to get this working?

Rumen
Telerik team
 answered on 05 Jun 2024
2 answers
16 views
mike
Top achievements
Rank 1
Iron
 answered on 03 Jun 2024
1 answer
15 views

Is it possible in radgrid to allow a collapsed group to be selected by row and then drag and drop to new grid and all the collapsed rows under the group are dropped?

 

 

Vasko
Telerik team
 answered on 03 Jun 2024
1 answer
10 views
Is it possible to load an image from SQL server rather than specifying an ImageUrl?
Vasko
Telerik team
 answered on 03 Jun 2024
1 answer
20 views
 

Recently I've been expressing some weird behavior with the MultiSelect displaying and extra dropdown next to the control (see attached image).  This is just standard markup, nothing fancy. Is there a property setting I'm missing? 

 

Thanks for any help you can provide.

<telerik:RadMultiSelect ID="msLOB" runat="server" Width="100%" Filter="StartsWith" Placeholder="Select LOB" DataTextField="text" DataValueField="value" Skin="Silk" RenderMode="Lightweight">
    <Items>
       <telerik:MultiSelectItem Text="All" Value="All" Selected="false"></telerik:MultiSelectItem>
       <telerik:MultiSelectItem Text="Commercial-Large" Value="Commercial-Large" Selected="false"</telerik:MultiSelectItem>
       <telerik:MultiSelectItem Text="Commercial-Small" Value="Commercial-Small" Selected="false"></telerik:MultiSelectItem> 
        <telerik:MultiSelectItem Text="Commercial-Individual" Value="Commercial-Individual" Selected="false"> 
        </telerik:MultiSelectItem>
       <telerik:MultiSelectItem Text="Medicare-MAPD" Value="Medicare-MAPD" Selected="false"></telerik:MultiSelectItem>
  </Items>
</telerik:RadMultiSelect>


Vasko
Telerik team
 answered on 03 Jun 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Michael
Top achievements
Rank 1
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Michael
Top achievements
Rank 1
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?