array( array( 'header' => 'ID', 'name' => 'id', 'value'=>'$data->id', ),I need to add to it so that every TEXT id w" name="description" /> array( array( 'header' => 'ID', 'name' => 'id', 'value'=>'$data->id', ),I need to add to it so that every TEXT id w" />
89679

Yii add text before the value in EColumnsDialog

Question:

I have more or less the code in the "view":

'columns' => array( array( 'header' => 'ID', 'name' => 'id', 'value'=>'$data->id', ),

I need to add to it so that every TEXT id which displays August or early 1,2,3,4,5 was intended "TEXT" ie no display output in August this:

| ID | some_table | some_table | | TEXT_1 | samplesample | samplesample | | TEXT_2 | samplesample | samplesample | | TEXT_3 | samplesample | samplesample | | TEXT_4 | samplesample | samplesample | | TEXT_5 | samplesample | samplesample |

<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/kXyHt.png" data-original="https://i.stack.imgur.com/kXyHt.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

Answer1:

Try it like this:

'columns' => array( array( 'header' => 'ID', 'name' => 'id', 'value'=>function($data){ return "TXT".$data->id'; } ),

It's like your other question: <a href="https://stackoverflow.com/questions/26466683/yii-cgridview-error" rel="nofollow">YII CGridView error</a>

Recommend

  • How can I add a minimum of days based on hour in datetimepicker?
  • How to get the time on the current android device?
  • Scala: How to check if all items are unique in a Seq?
  • jquery date conversion chrome works but IE and firefox don't
  • PHP IntlDateFormatter wrong date/time conversion
  • How to replace spaces at the right into zeros at the left in COBOL?
  • What are some techniques to monitor multiple instances of a piece of software?
  • Laravel Carbon localization not working (get localized name of month from number)
  • HALF_PTR Windows data type
  • Is it safe to accept URL parameters for populating the `url_for` method?
  • Microsoft Excel Pivot miscalculation in Sum for positive and negative numbers
  • Why can't UI components be accessed from a backgroundworker?
  • In C what exactly happens if i use () to initialize a double dimension array instead of the {}?
  • CSS - Cannot get one spanned style to override another inherited style and align left
  • Primefaces :radioButton inside a ui:repeat
  • R convert summary result (statistics with all dataframe columns) into dataframe
  • Suppressing passwd when calling sqlplus from shell script
  • Breaking out column by groups in Pandas
  • Unable to get column index with table.getColumn method using custom table Model
  • Why is the size of this struct 32?
  • MySQL WHERE-condition in procedure ignored
  • Web-crawler for facebook in python
  • Cannot Parse HTML Data Using Android / JSOUP
  • How to delete a row from a dynamic generate table using jquery?
  • json Serialization in asp
  • Rails 2: use form_for to build a form covering multiple objects of the same class
  • trying to dynamically update Highchart column chart but series undefined
  • How get height of the a view with gone visibility and height defined as wrap_content in xml?
  • Angular 2 constructor injection vs direct access
  • Getting Messege Twice Using IMvxMessenger
  • Java static initializers and reflection
  • embed rChart in Markdown
  • How to stop GridView from loading again when I press back button?
  • Android Google Maps API OnLocationChanged only called once
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • How can I use `wmic` in a Windows PE script?
  • UserPrincipal.Current returns apppool on IIS
  • Unable to use reactive element in my shiny app
  • java string with new operator and a literal
  • How to load view controller without button in storyboard?