Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
262 views

I have a grid where I am using the EditFormsettings and a user control.  The code looks like the following

 

      <EditFormSettings UserControlName="~/TemplateUserControls/EditControls/GroupEditFormControl.ascx" EditFormType="WebUserControl">
            <EditColumn UniqueName="GroupEditFormControl">
            </EditColumn>
            <PopUpSettings Modal="true" />
        </EditFormSettings>

I have the client event set to call a javascript function to center the user control

  <ClientSettings>

        <ClientEvents OnRowDblClick="RowDblClick" OnPopUpShowing="onPopUpShowing" />
    </ClientSettings>

 

And the Javascript looks like the following.  

<script type="text/javascript">
        function onPopUpShowing(sender, eventArgs) {

                var myWidth = 0, myHeight = 0;
                if (typeof (window.innerWidth) == 'number') {
                    //Non-IE
                    myWidth = window.innerWidth;
                    myHeight = window.innerHeight;
                } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
                    //IE 6+ in 'standards compliant mode'
                    myWidth = document.documentElement.clientWidth;
                    myHeight = document.documentElement.clientHeight;
                } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
                    //IE 4 compatible
                    myWidth = document.body.clientWidth;
                    myHeight = document.body.clientHeight;
                }
               
                popUp = eventArgs.get_popUp();
                var gridWidth = myWidth;
                var gridHeight = myHeight;
                var popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px"));
                var popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px"));
                popUp.style.left = ((gridWidth - popUpWidth) / 2) +  "px";
                popUp.style.top = ((gridHeight - popUpHeight) / 2) + "px";        

       }

    </script>

 

The problem is no matter that values go into the Popup.style.left and popup.style.top values, the usercontrol is always in the same location.    I have confirmed that the Javascript is being called by putting a few "alert" calls 

For a quick test, I hard coded the top and left values (See below) to see if the user control would be at the top part of the screen

popUp.style.left = "10px";
popUp.style.top = "10px";

And the usercontrol's position did not move.

How can I center the usercontrol when using the editform function under the grid?

Attila Antal
Telerik team
 answered on 04 Jun 2019
2 answers
106 views
I'm trying to implement bootstrap 3 on my existing project.  radgrid with popup edit form works fine with PopUpShowing script found in this forum, shows as centered on page without bootstrap. But when I put radgrid to bootstrap grid cell, popup edit form shows on funny places. This happens when I have 2 columns (on bootstrap row) and grid placed to right column. As I see if I place grid to leftmost column it can calculate and set left of popup edit window.

Looks like edit popup windows stays in bootstrap cell and repositioning always start from left of this cell.

Strange thing is I also have delete confirmation dialog and this dialog centers on page perfectly.

Obviously I don't have enough knowledge. Can anyone help me please ?

Best..
Attila Antal
Telerik team
 answered on 03 Jun 2019
6 answers
480 views
Is it possible to show the name value instead of the data value on the pie chart segments? Basically, what we'd like to do is to show the data that is on the legend on the pie segment, instead of the number value. For example if I have a segment that shows Widgets, with a value of 30, currently the pie will show 30; I'd like to show the word 'Widget' instead.

Is this possible?
Marin Bratanov
Telerik team
 answered on 03 Jun 2019
7 answers
71 views
My company has 5 separate applications all having some type of dashboard.  We are looking to build an overall workbench application that would allow the applications to be loosely coupled.  Our goal is to remove core items like navigation from each sub-application and have the overall workbench application manage navigation loading each screen from sub-applications via iframes.  This allows us to keep each system loosely coupled and in the end easier to maintain diverse code bases. 

Here-in is the issue.  If each application has a set of dockable controls, how can they be docked on the overall workbench application?  Obviously we can convert each sub-application control to an ASPX and for the overall workbench dashboard, basically have one control type that loads an IFrame within its control.  From what I have seen in the support forum, this is perhaps a less than desirable solution.  If I don't go this route, is there a way I can share controls across applications without having to package every single application up as a solution.  This would be somewhat problematic since some of our customers have 2 of the apps, others 5 and so on. Worse yet is each of the 5 applications are on different release schedules which could be an extreme coordination problem.

It is for this reason alone, that we have not committed to the Telerik solutions and would greatly appreciate any design suggestions for this situation.

Thanks,
Shane

Rumen
Telerik team
 answered on 03 Jun 2019
9 answers
170 views
Hi,

we just installed FullFeatured RadEditor for MOSS and will start using it for out Intranet soon. We have also activated the Rad Spellchecker (AJAX-Version). Unfortunately I do not find the place to set the used dictionary.

For now the SpellChecker only checks English text. But it would be great to have the option to switch between the dictionaries within RadEditor before checking the RadEditor content (like the demo for RadEditor ASP shows).

Regards,

Robert Tullius
Rumen
Telerik team
 answered on 03 Jun 2019
1 answer
189 views

We are not able to exporting the radeditor data along with images and text and tables formats.

I am using below code.

 protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {              
                ResponseDocument.ExportToDocx();
            }
            catch (Exception ex)
            {
                LogHelper.LogEvent(ex, this.Request.Url.LocalPath);
            }            
        }

while exporting the data it's throwing error like 

"The Document Processing Library fails to export the RadFlowDocument in Docx".

Please help.

Rumen
Telerik team
 answered on 03 Jun 2019
6 answers
387 views
Please help me, hide  file name  which show when file uploading on server ,  i did try find it in css, but not get( 
Thanks.
Rumen
Telerik team
 answered on 03 Jun 2019
11 answers
605 views

Hi,

 

Is there an example available of how to validate the raddropdowntree in combination with AutoPostback = true?

 

TIA, Marc

Rumen
Telerik team
 answered on 03 Jun 2019
0 answers
91 views

I have a problem displaying appointments in the first row. They add to the database but disapear on the UI. 

 

Here is the code for my rad Scheduler

      <telerik:RadScheduler ID="AttendanceScheduler" runat="server" Skin="Office2007"
                    Width="100%" Height="100%"
                    StartEditingInAdvancedForm="true" SelectedView="TimelineView" 
                    DisplayDeleteConfirmation="true" DayStartTime="08:00:00" DayEndTime="18:00:00"
                    TimeZoneOffset="0:00:00" HoursPanelTimeFormat="h:mm tt" NumberOfHoveredRows="1"
                    ShowHeader="false" ShowAllDayRow="false" ShowFullTime="false" ShowNavigationPane="false"
                    GroupBy="DayOfWeek" EnableResourceEditing="true" CustomAttributeNames=""
                    EnableCustomAttributeEditing="false" VisibleAppointmentsPerDay="1"
                    OnClientRequestSuccess="requestSuccess"
                    OnClientRequestFailed="requestFailed" OnClientAppointmentsPopulating="AttendancePopulating"
                    OnClientAppointmentsPopulated="AttendancePopulated"
                    OnClientTimeSlotClick="OnClientTimeSlotClick" OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick"
                    OnClientAppointmentInserting="AttendanceInserting" OnClientAppointmentCreated="AttendanceCreated"
                    OnClientAppointmentEditing="AttendanceEditing"
                    OnClientAppointmentMoveEnd="OnAttendanceMoveEnd"
                    OnClientAppointmentResizeEnd="OnAttendanceResizeEnd">
                    <MonthView UserSelectable="false" />
                    <TimelineView ColumnHeaderDateFormat="hh:mm tt" HeaderDateFormat="hh:mm tt" NumberOfSlots="48"
                        SlotDuration="00:15:00"  GroupBy="DayOfWeek" TimeLabelSpan="1" StartTime="08:00" GroupingDirection="Vertical"
                        UserSelectable="false" />
                    <DayView UserSelectable="false" />
                    <WeekView UserSelectable="false" />
                    <WebServiceSettings Path="ClientAttendanceTemplateService.svc" ResourcePopulationMode="Manual"
                        GetResourcesMethod="GetClientAttendanceResources" GetAppointmentsMethod="GetClientAttendances"
                        InsertAppointmentMethod="InsertClientAttendance" UpdateAppointmentMethod="UpdateClientAttendance"
                        DeleteAppointmentMethod="DeleteClientAttendance" CreateRecurrenceExceptionMethod="CreateClientAttendanceRecurrenceException"
                        RemoveRecurrenceExceptionsMethod="RemoveClientAttendanceRecurrenceExceptions" />
                    <Localization ConfirmDeleteText="Are you sure you want to delete this Attendance?"
                        ConfirmDeleteTitle="Confirm Attendance Delete" />
                </telerik:RadScheduler>

 

I am adding the resources in the backend using code below

 

  private IEnumerable<Resource> GetResources()
        {
            List<Resource> resources = new List<Resource>();
            for (int i = 0; i < 7; i++)
            {

                string dayOfWeek = GetDayOfWeek(i);
                Resource res = new Resource("DayOfWeek", i, dayOfWeek);
                resources.Add(res);
            }

            return resources;
        }

        private string GetDayOfWeek(int dow)
        {
            string dayOfWeek = "";
            switch (dow)
            {
                case 1:
                    dayOfWeek = "Monday";
                    break;
                case 2:
                    dayOfWeek = "Tuesday";
                    break;
                case 3:
                    dayOfWeek = "Wednesday";
                    break;
                case 4:
                    dayOfWeek = "Thursday";
                    break;
                case 5:
                    dayOfWeek = "Friday";
                    break;
                case 6:
                    dayOfWeek = "Saturday";
                    break;
                case 0:
                    dayOfWeek = "Sunday";
                    break;

            }
            return dayOfWeek;
        }

 

Only the first row of the scheduler doesn't show the added appointment!

srivaishnav
Top achievements
Rank 1
 asked on 02 Jun 2019
5 answers
1.0K+ views

    Hi,

Wondering if you could help. I'm struggling to get a value from a ComboBox. I have the following ComboBox set up:

<sq8:ComboBox runat="server" ID="cboAgree" OnClientSelectedIndexChanged="onSelectedIndexChanged"><Items>
<sq8:ComboBoxItem runat="server" Text="Agree" Value="Agree"></sq8:ComboBoxItem>
<sq8:ComboBoxItem runat="server" Text="Disagree" Value="Disagree"></sq8:ComboBoxItem>
</Items>
</sq8:ComboBox>
<sq:BindableControl runat="server" TargetControlID="cboAgree" DataField="Agreement"></sq:BindableControl>

And the following JavaScript to get the value:

<script type="text/javascript">
   
Sys.Application.add_load(FormLoad) 
 
 function FormLoad()
  {
    onSelectedIndexChanged(true);
  
   
  function onSelectedIndexChanged(sender, eventArgs)
{
   
      var commentsGrid = document.getElementById("comms");
   
            commentsGrid.style.display = "none";
   
    var item = eventArgs.get_item();
 
    if (item == "Disagree") {
        commentsGrid.style.display = "block";
    } else {
        commentsGrid.style.display = "none";
    }
}
    
  
</script>

 

I get back the following error - "Uncaught TypeError: Cannot read property 'get_item' of undefined"

I have looked at the threads about getting ComboBox values on this forum but just can't seem to get this working.

When the value "Disagree" is selected from the combobox (id of the ComboBox is cboAgree) i want the grid to show. And when Agree is selected, i want the grid to disappear.

 

Could anyone steer me in the right direction? Thanks!

Rumen
Telerik team
 answered on 31 May 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?