Replies: 2 comments 1 reply
-
Hello look at the examples: in part2 you can passs query params |
Beta Was this translation helpful? Give feedback.
0 replies
-
in GroupGrid protected getColumns() {
var columns = super.getColumns();
Q.first(columns, x => x.field == 'GroupName').format = ctx => {
let item: GroupRow = ctx.item;
return `<a href="/Dashboard/Voting?groupId=${item.Id}" class="view-edit-group">${item.GroupName}</a>`;
}
return columns;
} in VotingGrid protected onViewSubmit() {
if (!super.onViewSubmit()) {
return false;
}
var q = Q.parseQueryString();
var request = this.view.params as Serenity.ListRequest;
if (q["groupId"]) {
request.Criteria = Serenity.Criteria.and(request.Criteria, [['GroupId'], '=', q["groupId"]]);
} else {
request.Criteria = Serenity.Criteria.and(request.Criteria, [['GroupId'], '=', -999]);
}
return true;
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi everyone how are you ?
i have hard idea want to execute and need your help in it please
i previously add discussion about 2 forms in 1 but i was so wrong not this idea is required
the required idea is i have 2 row (groups, voting ) when i click on groups the grid of group will open normally, press on new group dailouge will open to insert name of groups
enter the name and press save all that normally
now that what i need
when i press on group1 it supposed open the following page
but retrived only the votes that related to that group so if there is no votes related to that group it open empty and i can create new one
how can i execute that hard idea :(
Beta Was this translation helpful? Give feedback.
All reactions