Author Topic: Virtual Column text and css style no view grid  (Read 191 times)

necatiozbek

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 19
    • View Profile
Virtual Column text and css style no view grid
« on: July 14, 2024, 04:41:48 pm »
Hi.
ColumnModel in I create virtual column ( No Data Field. datIndx='')
I control the other cell-column and I want to write a text and style it in the virtual column.
But there is no view on the grid.

If I do this in a column with data (dataIndx='xxxx') it works

Is there a solution or a method?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Virtual Column text and css style no view grid
« Reply #1 on: July 15, 2024, 11:09:45 am »
you can use it as a hidden column.

necatiozbek

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Virtual Column text and css style no view grid
« Reply #2 on: July 15, 2024, 02:07:51 pm »
No, even if I make a hidden column, it doesn't work.

I also want to give information to the user based on the value of a column via virtual column.

Why should I make a hidden column? user must see..

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Virtual Column text and css style no view grid
« Reply #3 on: July 15, 2024, 02:17:18 pm »
Oh ok, you have to / can define dataIndx of a column even if there is no data corresponding to that field in rows.

necatiozbek

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Virtual Column text and css style no view grid
« Reply #4 on: July 15, 2024, 06:12:42 pm »
Hi

I did what you said, I've done it before.
But unfortunately it doesn't work. It doesn't even get into the rendering area console.log("creating a virtual column")  :'(

Can there be other dependencies for this process?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Virtual Column text and css style no view grid
« Reply #5 on: July 15, 2024, 07:20:48 pm »
First of all please ensure that every column in colModel has defined and unique dataIndx.

Secondly I understand that you are trying to render some values in a column depending upon values in other columns, it's column dependency and column.render is not an optimum solution to it.  I suggest that you refer to these 2 examples for setting up column dependencies:

https://paramquery.com/pro/demos/rowtemplate

https://paramquery.com/pro/demos/grid_formula

Please feel free to share a jsfiddle if you still face issues.