We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Is row clickable?

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


6 Replies

RK Rajiv Kumar April 16, 2014 04:48 AM UTC

Hi ,
    I have couple of questions for the grid being used in MVC 5.
1) I got a sample application from Syncfusion support in which the grid works. I tried to copy all the entries in web.config in a new app but still the grid is not visible on the page of a new app.I don't get any error. Can I get a list of steps that is required to use the grid in a new app.
2) Is the row of a grid clickable to take an user to a new screen with some variables?

Thanks,
Rajiv



SG Sakthi G Syncfusion Team April 21, 2014 05:17 AM UTC

From: Rajiv Kumar [mailto:Rajiv.Kumar@berkadia.com]
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



AS Alan Sangeeth S Syncfusion Team April 21, 2014 12:31 PM UTC

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



SG Sakthi G Syncfusion Team replied to Alan Sangeeth S April 22, 2014 06:16 AM UTC

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:Rajiv.Kumar@berkadia.com]
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


Attachment: IssuewithDynamicCaption_ec4741d3.zip


AS Alan Sangeeth S Syncfusion Team April 23, 2014 09:13 AM UTC

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



AS Alan Sangeeth S Syncfusion Team April 23, 2014 09:19 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon