logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
MrMiles  
#1 Posted : Wednesday, February 14, 2018 7:05:35 PM(UTC)
MrMiles

Rank: Newbie

Groups: Registered
Joined: 12/20/2017(UTC)
Posts: 7
United States
Location: Indiana

Thanks: 2 times
I would like to take the id from a row in the report and open a modal that would display related information from my application.
epf  
#2 Posted : Tuesday, February 20, 2018 2:28:56 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
It is probably possible but you have to handle all the javascript code in a custom template:
Using the Report Designer, select your Model View in tree view, set use custom template to True and edit your custom cshtml Template.

Then add the JavaScript you want where the table is created (no example so far....).
It is here:
Code:
                            <tbody>
                                @for (int row = page.DataTable.BodyStartRow; row < page.DataTable.BodyEndRow; row++)
                                {
                                    ResultCell[] line = page.DataTable.Lines[row];
                                    <tr class="@((row - page.DataTable.BodyStartRow) % 2 == 1 ? " " : " odd")">
                                        @for (int col = 0; col < line.Length; col++)
                                        {
                                            ResultCell cell = line[col];
                                            string className = cell.IsTitle && col == 0 ? "cell_title" : "cell_value";
                                            className = cell.IsTotal ? "cell_value_total" : className;
                                            <td class='@className' style='@cell.CellCssStyle' @Raw(Model.GetNavigation(cell))>@Raw(cell.HTMLValue)</td>
                                        }
                                    </tr>
                                }
                            </tbody>


thanks 1 user thanked epf for this useful post.
MrMiles on 2/27/2018(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.