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 9128277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:28:40+00:00 2026-06-17T07:28:40+00:00

In YiiBootstrap TbGridView , the columns headers are defaulting with ^ for sorting like

  • 0

In YiiBootstrap TbGridView, the columns headers are defaulting with ^ for sorting like this.

Its mentioned in the file \protected\extensions\bootstrap\widgets\TbDataColumn.php on the line 28 like

if ($sort->resolveAttribute($this->name) !== false)
    $label .= '<span class="caret"></span>';

Because of this its showing as column header with down arrow next to the label.

I want my column headers not to have the caret symbol next to them, but I don’t want to change this in the source widget as it would mean we would have issues updating the extension in future.

Is there any way to do this with the properties on the TbGridView widget itself?

  • 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-06-17T07:28:41+00:00Added an answer on June 17, 2026 at 7:28 am

    If you don’t want to disable sorting on that column (which would get rid of it too), then your only way really is to use your own widget. As the TbDataColumn class is, for some reason, hard coded into the TbGridView. (you can see here Source)

    You can inherit from the TbGridView, override that function and replace it with a function that calls your EDataColumn class instead. Then you can do the same with the ETbDataColumn inherit from the TbDataColumn and just override the function you need.

    e.g.

    Yii::import('Bootstrap.widgets.TbGridView');
    Yii::import('ext.widgets.ETbDataColumn');
    
    /**
     * Bootstrap grid data column.
     */
    class ETbGridView extends TbGridView
    {
    
        public function createDataColumn($text)
        {
             if (!preg_match('/^([\w\.]+)(:(\w*))?(:(.*))?$/', $text, $matches))
                        throw new CException(Yii::t('zii', 'The column must be specified in the format of "Name:Type:Label", where "Type" and "Label" are optional.'));
    
                $column = new ETbDataColumn($this);
         ......
    

    But if your feeling in a giving back mood, you can always alter the YiiBootstrap TbGridView to use a parameter to determine which column class to use, and submit a pull request to YiiBootstrap here: https://bitbucket.org/Crisu83/yii-bootstrap/pull-requests
    To get the change put in the source code and solve this problem for everyone else too 🙂

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

Sidebar

Related Questions

I am using this extension: Yii-Bootstrap , along with this less extension: less In
i installed this extension http://www.cniska.net/yii-bootstrap/ , is possible when i make an ajax request
I have been trying to implement twitter bootstrap extension in Yii but cannot do
I'm try to load the Yii Bootstrap extension in the admin module only but
I have integrated yii bootstrap extension in to my site. I have a page
I have been using Yii Bootstrap in an application for a while. Now, I
I'm pretty new to Yii as well as Twitter Bootstrap, I am trying to
So I have Yii-user and Yii-bootstrap. I want to load the registration form with
i came across a little quest i am trying to convert this link that
Iam a yii newbie (started a week ago) and i want to use the

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.