Telerik Forums
UI for ASP.NET AJAX Forum
20 answers
1.1K+ views

Hi
Following are the lines from my HTML page.  I want to control the position of popup window duing add/edit.
It should be center align to the screen/browser window.  How do set it ?
 

Regards
JD

<MasterTableView CommandItemDisplay="TopAndBottom" EditMode="PopUp"   Width="100%" 
DataKeyNames="PropertyID" GridLines="Both"
PagerStyle-AlwaysVisible="True"
>

 

<EditFormSettings EditFormType="Template" PopUpSettings-Width="900px" 
CaptionFormatString="Edit Property: {0}"
CaptionDataField="PropertyName"
InsertCaption="Add New Property"
  
PopUpSettings-ScrollBars="Vertical">
Attila Antal
Telerik team
 answered on 17 Dec 2020
3 answers
1.0K+ views

hi,
i want to display next,Previous and finish button in all radwizard steps .in step 0 (first step) previous button disabled and in last step next button disabled and finish button must be enabled. Is this possible in rad WIzard UI

  <telerik:RadWizard RenderMode="Lightweight"
                    runat="server"
                    ID="ManualOrderWizard"
                  
                    DisplayProgressBar="False"
                    DisplayCancelButton="True"
                    DisplayNavigationBar="False"
                    Skin="Office2007"
                    OnNextButtonClick="ManualOrderWizard_NextButtonClick"
                    Localization-Finish="Create Order" Localization-Cancel="Close" OnCancelButtonClick="ManualOrderWizard_CancelButtonClick">
                    <%-- OnCancelButtonClick="">--%>
                     
                    <WizardSteps>
                        <telerik:RadWizardStep ID="AddMembership" StepType="Step" runat="server">
                            <uc:UCAddMembership runat="server" ID="UCAddMembership" />
                        </telerik:RadWizardStep>
                        <telerik:RadWizardStep ID="AddItems" StepType="Step" runat="server">
                            <uc:UCAddItems runat="server" ID="AddItem" />
                        </telerik:RadWizardStep>
                        <telerik:RadWizardStep ID="CustomerShipping" StepType="Step" runat="server">
                            <%--<uc:UCAddMembership runat="server" ID="UCAddMembership2" />--%>
                        </telerik:RadWizardStep>
                        <telerik:RadWizardStep ID="GiftMessages" StepType="Step" runat="server">
                           <%-- <uc:UCAddMembership runat="server" ID="UCAddMembership3" />--%>
                        </telerik:RadWizardStep>
                        <telerik:RadWizardStep ID="AddbilltoCustomer" StepType="Step" runat="server">
                            <%--<uc:UCAddMembership runat="server" ID="UCAddMembership4" />--%>
                        </telerik:RadWizardStep>
                        <telerik:RadWizardStep ID="ReviewOrderTotal" StepType="Step" runat="server">
                            <%--<uc:UCAddMembership runat="server" ID="UCAddMembership5" />--%>
                        </telerik:RadWizardStep>
                        <telerik:RadWizardStep ID="OrderPayments" StepType="Step" runat="server">
                           <%-- <uc:UCAddMembership runat="server" ID="UCAddMembership6" />--%>
                        </telerik:RadWizardStep>
                        <telerik:RadWizardStep ID="AddNotes" StepType="Step" runat="server">
                           <%-- <uc:UCAddMembership runat="server" ID="UCAddMembership7" />--%>
                        </telerik:RadWizardStep>
                        <telerik:RadWizardStep ID="ReviewOrder" StepType="Finish" runat="server">
                            <%--uc:UCAddMembership runat="server" ID="UCAddMembership8" />--%>
                        </telerik:RadWizardStep>
                    </WizardSteps>

                </telerik:RadWizard>

Peter Milchev
Telerik team
 answered on 16 Dec 2020
3 answers
200 views

Hi Telerik Team,

I'm having an issue with the drill down functionality, I'm binding the data source to the org chart control on Page Load Event and I have a drill down handler when the user click on the drill down icon.

 

The data tables I'm using to bind the org chart are:

1). OrgChartStructure (Which will be defined the levels of the organization chart)

Id | ParentID|Title

1    NULL     CEO (PK)

2     1            President

3     2            VP Sales

2). Org Chart

Id| NodeID| FirstName|LastName| Title|ImgPath

1    1             John        Doe            CEO

2     2            Jane        Doe            President

3     2            James     Doe            VP Sales

 

My Code:

 

<div class="demo-container no-bg">
    <div class="search">
        <telerik:RadSearchBox RenderMode="Lightweight" runat="server"  ID="RadSearchBox1" DataTextField="FullName" DataValueField="NodeID" EnableAutoComplete="true"
            OnClientSearch="onClientSearch" Skin="Silk">
        </telerik:RadSearchBox>
        <div class="rocBreadCrumb"></div>
    </div>
    <telerik:RadOrgChart ID="rocOrgChart"
        runat="server"
        RenderMode="Lightweight"
        EnableCollapsing="true"
        EnableDrillDown="true"
        EnableGroupCollapsing="true"
        Skin="Silk"
        DataFieldID="ID" DataFieldParentID="ParentID"
        DataTextField="FullName" DataImageUrlField="ImgPath">
    </telerik:RadOrgChart>
</div>

BackCode:

 

 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not Page.IsPostBack Then
            GenerateOrgChart()
        End If
    End Sub

 

 Public Sub GenerateOrgChart()
        Try
            Dim ds_orgStructure As DataSet = sqhBI20.ReturnDataSetFromSproc("spGetOrgChartStructure")
            Dim dt_orgStucture As DataTable = ds_orgStructure.Tables(0)
            If Not dt_orgStucture Is Nothing Then
                rocOrgChart.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "ID"
                rocOrgChart.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "ParentID"
                rocOrgChart.GroupEnabledBinding.NodeBindingSettings.DataSource = ds_orgStructure
            End If


            Dim ds_OrgChart As DataSet = sqhBI20.ReturnDataSetFromSproc("SpGetOrgChart")
            Dim dt_OrgChart As DataTable = ds_OrgChart.Tables(0)
            If Not dt_OrgChart Is Nothing Then
                rocOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "ID"
                rocOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "NodeID"
                rocOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataTextField = "FullName"
                rocOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataImageUrlField = "ImgPath"
                rocOrgChart.RenderedFields.ItemFields.Add(New Telerik.Web.UI.OrgChartRenderedField() With {.DataField = "NodeID"})
                rocOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataSource = ds_OrgChart
            End If
            rocOrgChart.DataBind()

            RadSearchBox1.Text = ""
            RadSearchBox1.DataSource = ds_OrgChart
            RadSearchBox1.DataBind()

        Catch ex As Exception
            Throw New Exception(ex.ToString())
        End Try
    End Sub

 

Public Sub rocOrgChart_DrillDown(sender As Object, e As Telerik.Web.UI.OrgChartDrillDownEventArguments) Handles rocOrgChart.DrillDown
    
        Dim item = New OrgChartGroupItem() With {.DataItem = "NodeID"}
        e.SourceNode.Renderer.Controls.Remove(e.SourceNode.Nodes.Renderer)
        e.SourceNode.GroupItems.Clear()
        e.SourceNode.Nodes.Clear()
        e.SourceNode.GroupItems.Add(item)

    End Sub

 

Peter Milchev
Telerik team
 answered on 16 Dec 2020
4 answers
2.6K+ 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
113 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
564 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
222 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
233 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
Iron
Veteran
 asked on 14 Dec 2020
1 answer
132 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
499 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
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
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
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?