Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6782345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:43:49+00:00 2026-05-26T16:43:49+00:00

Producr codes can contain only uppercase charcters. If lowercase characters are enterd, jqgrid does

  • 0

Producr codes can contain only uppercase charcters. If lowercase characters are enterd, jqgrid does not convert them to upper case, there is not such option.
How to force uppercase conversion of entered characters in jqgrid in inline and form edit modes for text fields ?

Update

I found code in How can I force input to uppercase in an ASP.NET textbox? last answer . This code changes entered character in uppercase in keypress. Is it reasonable to use this by adding keyprees event handler to jqgrid editing controls?

function ToUpper() { 
        // So that things work both on FF and IE 
        var evt = arguments[0] || event; 
        var char = String.fromCharCode(evt.which || evt.keyCode); 

        // Is it a lowercase character? 
        if (/[a-z]/.test(char)) { 
            // convert to uppercase version 
            if (evt.which) { 
                evt.which = char.toUpperCase().charCodeAt(0); 
            } 
            else { 
                evt.keyCode = char.toUpperCase().charCodeAt(0); 
            } 
        } 

        return true; 
    } 

Used like so:

   <asp:TextBox ID="txtAddManager" onKeyPress="ToUpper()" runat="server"  
         Width="84px" Font-Names="Courier New"></asp:TextBox> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:43:49+00:00Added an answer on May 26, 2026 at 4:43 pm

    First of all you can use CSS style text-transform: uppercase to display the data typed by the user in uppercase:

    editoptions: { dataInit: function (el) { $(el).css('text-transform', 'uppercase'); }}
    

    The setting will not change the data itself. So you have to make the corresponding modification additionally. In case of form editing you can use beforeSubmit. For example, let us you have column 'name' which you need to hold uppercase. Then you first add the setting of text-transform: uppercase in dataInit (see above) and add

    beforeSubmit: function (postData) {
        postData.name = postData.name.toUpperCase();
        return [true, ''];
    }
    

    In case of inline editing there are no beforeSubmit callback function. so you can use serializeRowData if you have remote data:

    serializeRowData: function (postData) {
        postData.name = postData.name.toUpperCase();
        return postData;
    }
    

    In case of usage editurl: 'clientArray' you can fix the data in aftersavefunc parameter of editRow and saveRow:

    aftersavefunc: function (rowid) {
        var $grid = $(this),
            newName = $grid.jqGrid("getCell", rowid, 'name');
        $grid.jqGrid("setCell", rowid, 'name', newName.toUpperCase());
    }
    

    See the demo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

any idea how i can get the code below to produce this output? 1
As per https://stackoverflow.com/questions/3264227/relations-with-multiple-keys-in-doctrine-1-2 , I have two tables which (as I can't get it
I have byte array as input. I would like to convert that array to
This is an interesting problem that I’ve not been able to solve yet. I
I am creating a product that as end result will/can create e.g. 10 .sql
You can write UTF-8/16/32 string literals in C++11 by prefixing the string literal with
There is a product table which contains all the product details. A product can
Usually I have to insert some data in a DB and it can't be
How can I detect changes to a specific attribute of an NSManagedObject ? In
I want to convert a solution of <select /> box chaining I've already built

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.