[CLOSED] NumberFieldFor and ComboBox Border(false) appears not to work?

  1. #1

    [CLOSED] NumberFieldFor and ComboBox Border(false) appears not to work?

    Hi Support,

    Html.X().NumberFieldFor(m => m.strWorkTelephone).Border(false).AllowBlank(true).AllowDecimals(true).HideTrigger(true).TabIndex(5).EmptyText("Just digits with area code e.g. 3031234567").FieldLabel("Work telephone:").Width(400)
    and

    Html.X().ComboBox().ID("SecurityQuestion3").Border(false).ReadOnly(false).ForceSelection(true).Width(350).DisplayField("strName").ValueField("intValue").EmptyText("Please select a security question").ValueNotFoundText("Please select a question")
                    .Store(Html.X().Store().AutoLoad(true).Model(Html.X().Model()
                    .IDProperty("intValue").Fields(
                        new ModelField("strName", ModelFieldType.String) { Mapping = "strName" },
                        new ModelField("intValue", ModelFieldType.Int) { Mapping = "intValue" })).Proxy(Html.X().AjaxProxy().Url(Url.Action("GetSecurityQuestions"))
                        .Reader(Html.X().JsonReader().Root("data"))
    Both work but draw borders? Is there a way I can eliminate the boarder?

    Thanks,

    Ashley
    Last edited by Baidaly; Aug 09, 2013 at 12:25 AM. Reason: [CLOSED]
  2. #2
    Hi Ashley,

    You could get rid of borders using CSS.

    Please set up
    .Cls("field-without-border")
    for the fields and define this CSS rule.
    <style>
        .field-without-border input.x-form-text {
            border-width: 0px;
            background-image: none;
        }
    </style>
  3. #3

    Still not working?

    Hi Support,

    Well if I try your solution I end up with image2.png where I still have the border but I have no number box. Image3.png shows the textboxes act normally and the number boxes and comboxes draw a border no matter of what I set just like Image1.png.

    Thanks,

    Ashley

    Click image for larger version. 

Name:	image1.png 
Views:	10 
Size:	1,018 Bytes 
ID:	6691Click image for larger version. 

Name:	image2.png 
Views:	8 
Size:	921 Bytes 
ID:	6692Click image for larger version. 

Name:	image3.png 
Views:	13 
Size:	9.9 KB 
ID:	6693
    Quote Originally Posted by Daniil View Post
    Hi Ashley,

    You could get rid of borders using CSS.

    Please set up
    .Cls("field-without-border")
    for the fields and define this CSS rule.
    <style>
        .field-without-border input.x-form-text {
            border-width: 0px;
            background-image: none;
        }
    </style>
  4. #4
    Hello!

    Can you provide sample to reproduce and version of your browser? I have the following on my machine: Click image for larger version. 

Name:	1.PNG 
Views:	13 
Size:	3.1 KB 
ID:	6694
  5. #5
    Quote Originally Posted by Baidaly View Post
    Hello!

    Can you provide sample to reproduce and version of your browser? I have the following on my machine: Click image for larger version. 

Name:	1.PNG 
Views:	13 
Size:	3.1 KB 
ID:	6694
    Hi Support,

    I "think" I am not getting my message across, please find an images attached that should help. I marked the border I am wishing to remove. This does not work in IE 10 or Google Chrome 28.0.1500.95

    Ashley

    Click image for larger version. 

Name:	image.png 
Views:	12 
Size:	3.3 KB 
ID:	6695
  6. #6
    I've tried the following sample and it works:

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET Examples</title>
        
        <style>
            .no-border .x-form-text {
                border: none !important;
                background: none;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            
            <ext:NumberField runat="server" HideTrigger="True" EmptyText="Some empty text" Padding="50" Cls="no-border"></ext:NumberField>
        </form>
    </body>
    </html>
  7. #7
    If you mean outer border then it is not field border.
    I guess that border is result of your custom css rules are used in the page. Do you use any css files?
  8. #8
    Quote Originally Posted by Baidaly View Post
    I've tried the following sample and it works:

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET Examples</title>
        
        <style>
            .no-border .x-form-text {
                border: none !important;
                background: none;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            
            <ext:NumberField runat="server" HideTrigger="True" EmptyText="Some empty text" Padding="50" Cls="no-border"></ext:NumberField>
        </form>
    </body>
    </html>
    Hi Support,

    The example you gave me removed the border around the text box, but there was a extra board be drawn somewhere. So I hacked my CSS file to bare bones and I now have the correct layout. Thus, I can only assume that I had a CSS clash that hopefully I will find later on, but for now life is good.

    Thank you,

    Ashley
  9. #9
    So you mean you are using some other CSS rules because we couldn't find any other outer border?
  10. #10

    CSS problem

    Hi Support,

    Will I have a general purpose CSS file that I "drag" around from web site to web site, and there must have been "something" in that CSS file that created the outer boarder that was messing up your controls. So, I removed all unused parts from the CSS file and then the problem went away.

    Thanks for the support,

    Ashley

Similar Threads

  1. [CLOSED] TriggerField: Editable=false doesn't work
    By reinout.mechant@imprss.be in forum 2.x Legacy Premium Help
    Replies: 15
    Last Post: May 27, 2013, 11:24 AM
  2. [CLOSED] EventStore AutoLoad=false not work?
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 28, 2012, 11:31 AM
  3. Replies: 6
    Last Post: Apr 18, 2012, 12:00 PM
  4. [CLOSED] CheckboxSelectionModel Enabled=false does not work
    By macap in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 14, 2009, 10:09 AM
  5. Replies: 2
    Last Post: Mar 29, 2009, 3:20 PM

Posting Permissions