Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
WebSlider not visible
posted

I have a function that dynamically adds a webslider control to a web page.  However, when the page is rendered the control is invisible.  It is on the page (I can see it in the HTML), but it isn't displayed.

Am I missing an attribute, or do I have a value configured incorrectly?

       private WebSlider loadWebSlider(string fieldname, string displayas, Table tb)
        {
            WebSlider ws = new WebSlider();
            ws.EnableSecondaryValue = true;
            ws.MaxValue = 10.00;
            ws.MinValue = 0.00;
            ws.Value = 1;
            ws.SecondaryValue = 9;
            ws.ContentAlignment = SliderContentAlignment.Center;
            ws.Width = 488; // Unit.Percentage(100);
            ws.Height = 60;
            ws.Orientation = Orientation.Horizontal;
            ws.ThumbsInteractionMode = SliderThumbsInteractionMode.Lock;
            ws.Tickmarks.NumberOfLabels = 3;
            ws.Tickmarks.LabelLocation = SliderTickmarkLabelLocation.BottomOrRight;
            ws.ValueType = SliderValueType.Decimal;
            ws.ValueLabel.CssClass = "slider";
            ws.ValueLabel.Format = "${0}..${1}";
            ws.ValueLabel.Location = SliderValueLabelLocation.RightOrBottom;
            string gadgetName = "webslider_" + fieldname;
            ws.ID = gadgetName;
            ws.MinusButton.ImageUrl = "~/Images/igsli_MinusH.gif";
            ws.MinusButton.DisabledImageUrl = "~/Images/igsli_MinusDisableH.gif";
            ws.MinusButton.FocusImageUrl = "~/Images/igsli_MinusFocusH.gif";
            ws.MinusButton.HoverImageUrl = "~/Images/igsli_MinusHoverH.gif";
            ws.MinusButton.PressedImageUrl = "~/Images/igsli_MinusPressH.gif";
            ws.PlusButton.ImageUrl = "~/Images/igsli_PlusH.gif";
            ws.PlusButton.DisabledImageUrl = "~/Images/igsli_PlusDisableH.gif";
            ws.PlusButton.FocusImageUrl = "~/Images/igsli_PlusFocusH.gif";
            ws.PlusButton.HoverImageUrl = "~/Images/igsli_PlusHoverH.gif";
            ws.PlusButton.PressedImageUrl = "~/Images/igsli_PlusPressH.gif";
            ws.ShowPlusMinusButtons = false;            
            ws.Thumb.ImageUrl = "~/Images/igsli_ThumbH.gif";
            ws.Thumb.DisabledImageUrl = "~/Images/igsli_ThumbDisableH.gif";
            ws.Thumb.FocusImageUrl = "~/Images/igsli_ThumbFocusH.gif";
            ws.Thumb.HoverImageUrl = "~/Images/igsli_ThumbHoverH.gif";
            ws.Thumb.PressedImageUrl = "~/Images/igsli_ThumbPressH.gif";
            ws.SecondaryThumb.ImageUrl = "~/Images/igsli_ThumbH.gif";
            ws.SecondaryThumb.DisabledImageUrl = "~/Images/igsli_ThumbDisableH.gif";
            ws.SecondaryThumb.FocusImageUrl = "~/Images/igsli_ThumbFocusH.gif";
            ws.SecondaryThumb.HoverImageUrl = "~/Images/igsli_ThumbHoverH.gif";
            ws.SecondaryThumb.PressedImageUrl = "~/Images/igsli_ThumbPressH.gif";

            TableRow tr = new TableRow();
            TableCell tc = new TableCell();
            tc.Controls.Add(ws);
            tr.Cells.Add(tc);
            tb.Controls.Add(tr);

            return ws;
        }

 

Parents
No Data
Reply
  • 49378
    posted

    Hi littlegreendude,

    I have tested your scenario with the code you have provided (I just commented out the imaging configuration sections) and the slider was displayed on the page as expected. My tests were made using version 11.1 under Mozilla 7 an d IE9.

    What I can suggest you to try is to ensure that the table you are adding the slider to is added to the form and that the image paths are correct. In order to be able to provide more insight I would need to know your product version. A sample including the page markup would also be appreciated.

    Please tell me if this helps.

    Best Regards,

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    http://es.infragistics.com/support

     

Children