# DYNGRID (CVSCOLUMN)

**URL:** <https://techcommunity.softwareag.com/t/dyngrid-cvscolumn/90556>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE, Natural-for-AJAX\
**Created:** [June 26, 2009, 1:56am UTC](https://techcommunity.softwareag.com/t/dyngrid-cvscolumn/90556 "2009-06-26T01:56:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [June 26, 2009, 1:56am UTC](https://techcommunity.softwareag.com/t/dyngrid-cvscolumn/90556/1 "2009-06-26T01:56:45Z")

</div>

I found it very useful to use the CVSCOLUMN under a TEXTGRIDSSS. I am using this under Natpages from a Natural program.

The advantages are that I can define grids dynamically in my program and change the layouts depending on what my needs are. I can therefore reuse one grid definition many times. A great time saver.

However, when I click the sort icon on the header, I get the following error.

java.lang.Error: Error accessing object of class com.softwareag.cis.adapter.ndo.NDOTEXTGRIDCollection$NDOCSVItem with accessPath

Is the problem that with dynamic grids one cannot sort the column data?

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [June 26, 2009, 11:20am UTC](https://techcommunity.softwareag.com/t/dyngrid-cvscolumn/90556/2 "2009-06-26T11:20:24Z")

</div>

Is this version NJX123? Sorting for cvscolumns in NATPAGES was not properly supported in earlier versions. But in NJX123 it should work correctly.

Best Regards,  
Christine

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [June 26, 2009, 5:33pm UTC](https://techcommunity.softwareag.com/t/dyngrid-cvscolumn/90556/3 "2009-06-26T17:33:06Z")

</div>

It is versoin NJX123. I am not sure if I am setting up the columns correctly in my Natural program though. Below is a snippet of code from the program. I am not sure about DYNSORTTITLEPROP. Apology - the indentation in the program seems to be lost when posting here.

READ DCSE-ENFORCEMENT BY SP-PERSON-DAT9-REMEDY  
STARTING FROM #SP-PERSON-DAT9-REMEDY.SP-PERSON-DAT9-REMEDY

IF DCSE-ENFORCEMENT.ID-PERSON NE DCSE-CASE.ID-PERSON-NCP  
ESCAPE BOTTOM  
END-IF  
ADD 1 TO #READ-COUNT  
INCLUDE QFCC0020 ‘235’ ‘DCSE-ENFORCEMENT.CD-ENF-REMEDY’ ‘FIELD1’  
INCLUDE QFCC0020 ‘234’ ‘DCSE-ENFORCEMENT.CD-STAT’ ‘FIELD2’  
COMPRESS  
FIELD1 ‘;’  
FIELD2 ‘;’  
DCSE-ENFORCEMENT.DATE-BEG ‘;’  
DCSE-ENFORCEMENT.DATE-END ‘;’  
DCSE-ENFORCEMENT.ID-CASE  
INTO DYNGRID.DYNGRIDVALUES (#READ-COUNT)  
END-READ  
IF #READ-COUNT \> 0  
MOVE ‘Enforcement’ TO FOLDEDNAMEPROP  
MOVE TRUE TO FOLDEDVISIBLEPROP  
MOVE FALSE TO FOLDEDPROP  
MOVE ‘Remedy;Status;“Beg Date”;“End Date”;Case’ TO DYNGRIDTITLES  
MOVE ‘250;250;70;70;100’ TO DYNGRIDWIDTHS  
MOVE ‘;;;;’ TO DYNPROPREFPROP  
MOVE ‘;;;;’ TO DYNTITLESORTPROP  
MOVE ‘left;left;left;left;left’ TO DYNALIGNSPROP  
REDUCE ARRAY DYNGRID TO (1:#READ-COUNT)  
END-IF

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [June 26, 2009, 7:59pm UTC](https://techcommunity.softwareag.com/t/dyngrid-cvscolumn/90556/4 "2009-06-26T19:59:47Z")

</div>

The missing proprefsprop property is the reason for the error you get at runtime. You don’t have to specify a sorttitleprop.  
Example layout snippet:

```auto
<csvcolumn titlesprop="mytitles" valuesprop="myvalues" widthprop="mywidth" proprefsprop="myproprefs" 
```

In your Natural code you must assign a comma separated list of names to the corresponding MYPROPREFS data field.  
Example for a grid with 3 columns:

```auto
MOVE 'mycol1;somecol2;anothercol3' TO MYPROPREFS
```

If you want you can of course additionally specify a sorttitleprop. Example for a grid with 3 columns:

```auto
MOVE 'Sorttext1;Sorttext2;Sorttext3' TO MYSORTTITLES
```

The sorttitles appear as tooltips when your mouse is over the little sort icons.

Best Regards,  
Christine

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [June 26, 2009, 8:06pm UTC](https://techcommunity.softwareag.com/t/dyngrid-cvscolumn/90556/5 "2009-06-26T20:06:48Z")

</div>

Thanks Christine - works perfectly now.

Best regards

Demos

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:57pm UTC](https://techcommunity.softwareag.com/t/dyngrid-cvscolumn/90556/6 "2021-04-02T14:57:12Z")

</div>


