Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
2.5K+ views

I have a RadGrid that i use to select records then display said record in a different frame/page. this is working exactly as i want it to.

Starting off, the grid is empty. the customer makes a search and it is then populated with the relevant data.

i need to be able to automatically select the first row and it then fire off the "OnSelectedIndexChanged" function i have created.

i have tried using the

grid.MasterTableView.Items[0].Selected = true;

in my codebehind. and while it does highlight the first row, it does not select/click on it to fire off the "OnSelectedIndexChanged" function.

i have also tried the clientevents options of ongridcreated, ondatabound, etc and they dont work as intended. when the page loads, before the grid is populated these client events keep firing over and over.

i need it to only fire once, when the grid is populated after a search.

 

I am really stumped here, and could use assistance.

Jeff
Top achievements
Rank 1
 answered on 16 Dec 2020
1 answer
105 views
It seems references to telerik is breaking Microsoft Report Designer. Every time I try to add a dataset to a report, visual studio crushes and closes without giving an error message. Adding a report via Report Wizard does not also work and throws the error "Could not load file or assembly 'Microsoft.AnalysisServices.AdomdClient" even though I have installed the said library. If I remove all reference to telerik everything works. I'm using Telerik UI for ASP.NET AJAX R2 2020, visual studio 2019 with target framework of 4.8. I have tested earlier version like Telerik UI for ASP.NET AJAX R2 2019 but I'm getting the same error. I have been trying to resolve this error for the last 5 days without success. Any help will be appreciated. Thanks.
Rumen
Telerik team
 answered on 15 Dec 2020
3 answers
548 views
Since I have variable widht numbers in my masked textbox I would like to remove the empty spaces when the textbox loses focus (on display).
So for example something that on focus appears like +39__-12__-1234____ should appear like +39-12-1234 when the box loose focus and not like +39  -12  -1234
Also it seems that pressing the "del" key leaves empty spaces. In a mask like ####-#### it doesn't make much sens to have 12 4-1 34 with spaces in the middle.
Of course when you retrieve the values all this is fixed but preventing it in the input and a correct display on blur would be nice. 
Rana
Top achievements
Rank 1
 answered on 14 Dec 2020
5 answers
210 views
Hi,

I am exporting Html content within RadEditor to Docx format using the following code in ASP.NET:

        Telerik.WinControls.RichTextBox.Model.DocxFormatProvider provider = new Telerik.WinControls.RichTextBox.Model.DocxFormatProvider();
            Telerik.WinControls.RichTextBox.Model.RadDocument document = new HtmlFormatProvider().Import(FCKeditorESI.GetHtml(EditorStripHtmlOptions.None));
            

            Telerik.WinControls.RichTextBox.Model.RadDocument htmlDoc;
            var htmlContent = FCKeditorESI.GetHtml(EditorStripHtmlOptions.None);
            var importer = new HtmlFormatProvider();
            var exporter = new DocxFormatProvider();

            using (var stream = new MemoryStream())
            {
                var writer = new StreamWriter(stream);
                writer.Write(htmlContent);
                writer.Flush();
                stream.Seek(0, SeekOrigin.Begin);
                htmlDoc = importer.Import(stream);
            }
            
            //htmlDoc.Measure(RadDocument.MAX_DOCUMENT_SIZE);
            //htmlDoc.Arrange(new RectangleF(PointF.Empty, htmlDoc.DesiredSize));
            var bytes = exporter.Export(htmlDoc);

            Response.Clear();
            Response.ContentType = "application/msword";
            Response.AddHeader("Content-Disposition", "attachment;filename= exportusingtelerik.docx");
            Response.BinaryWrite(bytes);
            Response.End();


The content is exported to "docx" format, but with the following issues:
1. The exported Word file only displays the "normal" content which was entered in RadEditor. Content which was entered with "track changes" in not exported at all.

2. When opening the "docx" file in Apache OpenOffice 4, it gives the following error:
General error.
General input/output error.


I have attached the Html content (Content.jpg) and exported document (exportusingtelerik.jpg) herewith for reference.

Is there any setting required which will export all content, including track changes and metadata information?

Thanks.
Rumen
Telerik team
 answered on 14 Dec 2020
0 answers
206 views
hi sir,
             i use the above code posted on 11 -10-20216 that one we have facing the problem when we selected the year is hide  and click ok that year show in textbox. below example i show in screenshot.

the enable.png i put only one 
.monthCellClass {
        display: none;
    }
but it show month also 
the disable.png  i put both 
     .monthCellClass {
        display: none;
    }
 
   .rcSelected {
        display:none;
    }

it dose not show month but select year is not show that i mark in red box.

Note: I need to show only year not month.
M Kumar
Top achievements
Rank 1
Iron
Veteran
 asked on 14 Dec 2020
1 answer
124 views

Hi, i'm starting with Telerik.

I'm trying to understand a particular behavior about RowIndex. I'm checking RowIndex of each GridViewItem and it's not going like expected.

Instead of list 1,2,3 it's showing 2, 4, 6. I'm wondering why is it happening.

 

Vessy
Telerik team
 answered on 11 Dec 2020
7 answers
485 views

Hi there,

I am using the RadCheckBoxList and I want to color an individual ButtonListItem.
The attributes propery is not available, so I am not able to set the styling of an individual item.
                RadCheckBoxList radCheckBoxList = (RadCheckBoxList)radPanelItem.Items[0].FindControl("radCheckBoxList");

                if (radCheckBoxList != null)
                {
                    // Iterate items.
                    foreach (ButtonListItem radCheckBoxItem in radCheckBoxList.Items)
                    {
                        // Set ValueID.
                        string valueID = radCheckBoxItem.Value;
 
                        //
                        string text = radCheckBoxItem.Text;
 
                        // Calculate total checkbox.
                        int total = CalcCheckBoxTotal(propertyID, valueID, partTable, getPartValuesByCommodityCode.PartValueTable);
                        radCheckBoxItem.Text = text + " (" + total + ")";
 
                        // Set color checkbox to silver when total.
                        if (total == 0)
                        {
                            // radCheckBoxItem.Attributes.Add("style", "color:Silver;");
                        }
                    }
                }

The property is available when you use the regular System.Web.UI.WebControls.CheckBoxList control.
Any idea how to set the color of an individual item?

Regards,

Marcel

Rumen
Telerik team
 answered on 10 Dec 2020
1 answer
117 views

Good Day:

  I need to copy the contents out if a cell in a row.  I am able to highlight the text, but when I try to right click, I am unable.  Any thoughts on the settings I need to change to allow for this?

The setting for my grid are below.

  <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" datasourceid="sqldsJobs" 
        AllowFilteringByColumn="True" Skin="Telerik" Height="350px" AutoGenerateColumns="False" AllowPaging="True" GridLines="None" > 

        <MasterTableView ClientDataKeyNames="ukid" AllowMultiColumnSorting="true" DataKeyNames="ukid" datasourceid="sqldsJobs" CommandItemDisplay="Top">

 

        <CommandItemSettings ExportToPdfText="Export to Pdf" ShowAddNewRecordButton="False"  ShowExportToExcelButton="True"></CommandItemSettings>

        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>

        <Columns>   .....        </Columns>

        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
         </EditFormSettings>

        </MasterTableView>
   <ClientSettings EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings> 

        <FilterMenu EnableImageSprites="False"></FilterMenu>

        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>

 

 

Thanks,

 

Omar

Rybovich IT Department
Top achievements
Rank 1
 answered on 10 Dec 2020
1 answer
56 views

I am trying to get all filter editors to have the same width and look align.

Please help, I am new here, still learning.

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 09 Dec 2020
22 answers
284 views
Hi,

I am having issues with the following server for the CDN: aspnet-scripts.telerikstatic.com

See attached Firebug screengrab showing the delay.

This happens consistently, and is getting very, very frustrating.

Any ideas?

Cheers,
-alex
Rumen
Telerik team
 answered on 09 Dec 2020
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?