Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Why is FilteredTextBoxExtender not working if placed in CS

Why is FilteredTextBoxExtender not working if placed in CS

Scheduled Pinned Locked Moved ASP.NET
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Herman T Instance
    wrote on last edited by
    #1

    In my code I added

                    TextBox txtOverschrijding = new TextBox();
                    txtOverschrijding.ID = "txtOverschrijding";
                    txtOverschrijding.CssClass = "DivWidth100px";
                    grdAlarmRegels.FooterRow.Cells[5].Controls.Add(txtOverschrijding);
                    AjaxControlToolkit.FilteredTextBoxExtender ftbe = new AjaxControlToolkit.FilteredTextBoxExtender();
                    ftbe.FilterType = AjaxControlToolkit.FilterTypes.Custom;
                    ftbe.FilterMode = AjaxControlToolkit.FilterModes.ValidChars;
                    ftbe.ValidChars = "1234567890.";
                    ftbe.TargetControlID = "txtOverschrijding";
    

    If I look in the gridview in the footerrow. I see the TextBox but the filtering is not working. IS there a reason or have I forgot something?

    In Word you can only store 2 bytes. That is why I use Writer.

    L 1 Reply Last reply
    0
    • H Herman T Instance

      In my code I added

                      TextBox txtOverschrijding = new TextBox();
                      txtOverschrijding.ID = "txtOverschrijding";
                      txtOverschrijding.CssClass = "DivWidth100px";
                      grdAlarmRegels.FooterRow.Cells[5].Controls.Add(txtOverschrijding);
                      AjaxControlToolkit.FilteredTextBoxExtender ftbe = new AjaxControlToolkit.FilteredTextBoxExtender();
                      ftbe.FilterType = AjaxControlToolkit.FilterTypes.Custom;
                      ftbe.FilterMode = AjaxControlToolkit.FilterModes.ValidChars;
                      ftbe.ValidChars = "1234567890.";
                      ftbe.TargetControlID = "txtOverschrijding";
      

      If I look in the gridview in the footerrow. I see the TextBox but the filtering is not working. IS there a reason or have I forgot something?

      In Word you can only store 2 bytes. That is why I use Writer.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You have added the textbox txtOverschrijding to the grdAlarmRegels.FooterRow.Cells[5].Controls collection. You also need to the FilteredTextBoxExtender 'ftbe' to the same Controls collection. Hope this will help you.

      H 1 Reply Last reply
      0
      • L Lost User

        You have added the textbox txtOverschrijding to the grdAlarmRegels.FooterRow.Cells[5].Controls collection. You also need to the FilteredTextBoxExtender 'ftbe' to the same Controls collection. Hope this will help you.

        H Offline
        H Offline
        Herman T Instance
        wrote on last edited by
        #3

        Oh yes...this helps thank you very much

        In Word you can only store 2 bytes. That is why I use Writer.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups