Hi Rajiv,
Thanks for using Syncfusion Products.
Query 1: “Grid is Invisible”
We are unable to reproduce the issue “Grid invisibility”. Could you please send us more information about the issue or send us a sample with issue so that we could sort out the cause of the issue and provide you a better solution quickly? The information provided would be great help for us to resolve your issue.
Also could you please confirm whether you have added script manager at the end of Layout.csthml page with Combine and Minify as false? Please refer the following code snippets.
[Layout.cshtml]
…
<body>
…
@{Html.Syncfusion().ScriptManager().Combine(false).Minify(false).Render();}
…
</html>
However the “How to avoid Grid invisiblity” documentation resolves the common invisibility issues. So we suggest you to follow the steps in it and the link as follows:
Documentation link:
http://help.syncfusion.com/ug/asp.net%20mvc/grid/documents/howtoavoidgridinvisi.htm
Query 2: “row of a grid clickable to take an user to a new screen with some variables”
We are glad to let you know that we have achieved your requirement by using ‘OnRecordSelectionEvent’ clientside event. In that event handler we are opening a new window with values passed as query string. Please refer the following code snippets.
Code Snippet:
[CSHTML]
@(Html.Syncfusion().Grid<ForumSample2.Models.Student>("GenericListGrid")
…
.ClientSideEvents(eve =>
eve.OnRecordSelectionEvent("SelectionHandler"))
…
)
[JAVASCRIPT]
function SelectionHandler(sender, args) {
window.open("Grid/NewScreen?universityCode=" + args.record.UniversityCode);
}
For your convenience we have created a sample and the same can be downloaded from below link.
Sample:
http://www.syncfusion.com/downloads/support/directtrac/general/GridSample_(2)10074014.zip
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
From: Rajiv Kumar [mailto:[email protected]]
Sent: Thursday, April 17, 2014 11:59 AM
To: Syncfusion Support
Subject: RE: Syncfusion support community forum 116154, Is row
clickable?, has been updated.
Hi Sangeeth,
I was able to solve issue no 1.But for the second part Query 2: how do we write the code for this one where we are using datarow instead of an object (the highlighted text)
@using EntityFrameworSample.Models ;
@model IEnumerable<System.Data.DataRow>
<div class="sample-panel-margin" style="width: 95%;">
@(Html.Syncfusion().Grid<System.Data.DataRow>("GenericListGrid5")
.Datasource(Model)
.Caption(ViewBag.selectedEntity)
.EnableSorting() /*Sorting Enabled*/
.EnablePaging() /*Paging Enabled*/
.ClientSideEvents(How should we add the argument)
)
</div>
<script>
function SelectionHandler(sender, args) {
window.open("PropertyShowAll/Index?ID=" + args.record.id);
}
</script>
Thanks,
Rajiv
Hi Rajiv,
Thank for the update.
We have modified the sample to meet your requirement (“Datatable binding”) and the same can be downloaded from below link.
Sample:
http://www.syncfusion.com/downloads/support/directtrac/general/ForumSample2-378085080.zip
We are not able to understand your query (“How should we add argument in clientside events”) clearly. So please try the above sample and if it does not solve your issue, please get back to us with more information so that we could provide a better solution quickly.
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
Hi Rajiv,
Thank for the update.
We have modified the sample to meet your requirement (“Datatable binding”) and the same can be downloaded from below link.
Sample:
http://www.syncfusion.com/downloads/support/directtrac/general/ForumSample2-378085080.zip
We are not able to understand your query (“How should we add argument in clientside events”) clearly. So please try the above sample and if it does not solve your issue, please get back to us with more information so that we could provide a better solution quickly.
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
From: Rajiv Kumar [mailto:[email protected]]
Sent: Monday, April 21, 2014 4:30 PM
To: Syncfusion Support
Subject: RE: Syncfusion support community forum 116161, Is row
clickable?, has been updated.
Hi Alan,
It worked for me. I figured out
the reason why it was not working earlier. The details are in the attachment
with some more questions.
Thanks for all your help.
Thanks,
Rajiv
Hi Rajiv,
Thanks for the update.
Query 1: When we use a dynamic value for caption, we get the error”
We suggest you to typecast the ViewBag to string. Please refer the following code snippets.
Code Snippet:
[CSHTML]
@(Html.Syncfusion().Grid<System.Data.DataRow>("GenericListGrid")
.Datasource(Model)
.Caption((string)ViewBag.Name)
…)
Query 2: “Is it possible to select more than one variable”
We can pass multiple values using query string. Please refer the following code snippets.
Code Snippet:
[JAVACRIPT]
function SelectionHandler(sender, args) {
window.open("Grid/NewScreen?Id=" + args.record.Id+"&French="+args.record.French);
}
For your convenience we have created a sample and the same can be downloaded from below link.
Sample:
Query 3: “to have a link in the grid as shown below and be able to pass some values”
In Essential Studio Version 10.2.0.75 we have an issue with unbound column in datatable. So to get a solution for the issue, please contact us at Syncfusion Support or you may also open a support ticket by login in to direct trac account and mention this forum link for reference.
We will provide you solution for this query along with patch for the issue.
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
Hi Rajiv,
Please ignore the previous update
Query 1: When we use a dynamic value for caption, we get the error”
We suggest you to typecast the ViewBag to string. Please refer the following code snippets.
Code Snippet:
[CSHTML]
@(Html.Syncfusion().Grid<System.Data.DataRow>("GenericListGrid")
.Datasource(Model)
.Caption((string)ViewBag.Name)
…)
Query 2: “Is it possible to select more than one variable”
We can pass multiple values using query string. Please refer the following code snippets.
Code Snippet:
[JAVACRIPT]
function SelectionHandler(sender, args) {
window.open("Grid/NewScreen?Id=" + args.record.Id+"&French="+args.record.French);
}
For your convenience we have created a sample and the same can be downloaded from below link.
Sample:
http://www.syncfusion.com/downloads/support/directtrac/123862/ForumSample211258885129.zip
Query 3: “to have a link in the grid as shown below and be able to pass some values”
In Essential Studio Version 10.2.0.75 we have an issue with unbound column in datatable. So to get a solution for the issue, please contact us at Syncfusion Support or you may also open a support ticket by login in to direct trac account and mention this forum link for reference.
We will provide you solution for this query along with patch for the issue.
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S