Hi Piotr,

the main point in Datagrid for columns in "columns", but is an Array (maybe
we could consider to change it to ArrayList?)

In the current implementation, you need to change all the array, and should
throw away what you have and create a fresh instances of all new columns
and add dataproviders with data to create rows.

If we had an ArrayList, maybe making an "addItem()" or "addItemAt()" to the
columns collection could handle just the addition of that column
without the need to be so aggressive with the rest of data.



El lun., 20 jul. 2020 a las 12:53, Piotr Zarzycki (<
piotrzarzyck...@gmail.com>) escribió:

> Hi Guys,
>
> I have requirements to have DataGrid where I'm adding/removing columns
> dynamically. I'm basically going trough the code and trying to figure out
> how everything works and how to approach that problem.
>
> I see that Jewel DataGrid is using class called DataGridButtonBar - It
> seems to me that I should just manipulate that one - basically adding:
>
> header.dataProvider = myNewColumns.
>
> However it does not gives me required result, even more my existing columns
> are displaying "undefined" in header text.
>
> My general question how would you approach this ?
>
> Thanks,
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to