You are not logged in.
There appears to be a bug with the .setHidden() method of the GridEditor fluid API. When updating a record the value of the hidden column is not remembered and therefore NULL is used.
Here is a sample table:
create table customers (
id INT primary key,
first_name VARCHAR(50),
last_name VARCHAR(50),
email VARCHAR(50),
city VARCHAR(50)
);
insert into customers (id, first_name, last_name, email, city) values (1, 'Ruth', 'Walker', 'rwalker0@ezinearticles.com', 'Kyaiklat');
insert into customers (id, first_name, last_name, email, city) values (2, 'Stephanie', 'Black', 'sblack1@com.com', 'Risaralda');
insert into customers (id, first_name, last_name, email, city) values (3, 'Ruby', 'Murphy', 'rmurphy2@phoca.cz', 'Nanger');
insert into customers (id, first_name, last_name, email, city) values (4, 'Arthur', 'Lewis', 'alewis3@furl.net', 'Makilala');
insert into customers (id, first_name, last_name, email, city) values (5, 'Jeremy', 'Robertson', 'jrobertson4@biglobe.ne.jp', 'Káto Miliá');
And here is a a sample report:
def adapter = gridHelper.initDbGridEditor()
adapter.configure(report, "customers")
.setPk("id")
.columns()
.add("id")
.add("first_name", "First Name")
.add("last_name", "Last Name")
.add("email", "Email").setHidden(true)
.add("city", "City")
.done()
return adapter
And here is a workflow:
1. Current state of data
select * from customers
id first_name last_name email city
--- ------------ ------------ ---------------------------- -----------
1 Ruth Walker rwalker0@ezinearticles.com Kyaiklat
2 Stephanie Black sblack1@com.com Risaralda
3 Ruby Murphy rmurphy2@phoca.cz Nanger
4 Arthur Lewis alewis3@furl.net Makilala
5 Jeremy Robertson jrobertson4@biglobe.ne.jp Káto Miliá
2. Edit a row
3. The email is now NULL
select * from customers
id first_name last_name email city
--- ------------ ------------ --------------------------- -------------
1 Ruth QQQQQ NULL Kyaiklat
2 Stephanie Black sblack1@com.com Risaralda
3 Ruby Murphy rmurphy2@phoca.cz Nanger
4 Arthur Lewis alewis3@furl.net Makilala
5 Jeremy Robertson jrobertson4@biglobe.ne.jp Káto Miliá
This does not seem to happen if you use the "Edit" button to open the window to change the row.
You can prevent data loss by using .setEditable(false).setWidth(0), but it looks a little weird in the UI:
Versions
SQL Server 2008 SP3
ReportServer RS3.0.2-5855 (2016-05-29-17-55-24)
Offline
Hi phillipjohnson,
thx for the remark, pls. remember :
Remark. The grid editor is an experimental feature at the moment and its API might change in future versions. We are also very interested to hear your feedback in order to make the editor better fit your needs.
see: https://reportserver.net/en/guides/admi … r-Reports/
We are using it orselfs and have some funny errors as well. We look into it and get back to you.
wbr jan
Offline
Hi phillipjohnson,
we are taking a look at the bug. Thanks for reporting. We are reproducing the bug and are working on correcting it.
Best regards,
Eduardo
Offline
Hi phillipjohnson,
the bug has been corrected and will be fixed in the next reportserver release.
Best regards,
Eduardo
Offline
Great news, Eduardo - thank you :-)
Karolina
Offline