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.
Unfortunately, activation email could not send to your email. Please try again.

I want to generate all rows , all cells with unique ids of gridview

Thread ID:

Created:

Updated:

Platform:

Replies:

120271 Sep 16,2015 05:32 AM Sep 17,2015 07:14 AM JavaScript 1
loading
Tags: ejGrid
Rakesh Advani
Asked On September 16, 2015 05:32 AM

Technology must be angular js and mvc

 <div  id="targetsGrid" ej-grid e-datasource="data"
                   e-columns="columns"
                   class="gridStyle"
                   e-allowresizing="true"
                   e-allowkeyboardnavigation="true"
                   e-allowscrolling="true"
                   e-allowsorting="true"
                   e-minwidth="550"
                   e-isresponsive="true"
                   e-scrollsettings-height="320"                    
                   e-allowgrouping="true"
                   e-groupsettings-groupedcolumns="targetGroupColumn"
                   e-allowfiltering="true"
                   e-filtersettings-filtertype="excel"
                   >
                </div>

   $scope.setTargetList = function (targetList) {
            $scope.data = targetList

        }


  I am sending some portion of code for your better understanding.

  I want to generate all rows , all cells with unique ids
Waiting for your quick reply.



Balaji Marimuthu [Syncfusion]
Replied On September 17, 2015 07:14 AM

Hi Rakesh,

Thank you for contacting Syncfusion support.

Query:  I want to generate all rows , all cells with unique ids
If you want to generate the cells (td) with unique ids, use the customAttributes in the Grid columns. By using this property you can modify the styles and appearance of a particular column.

Please refer to the sample and help document in the following link:
Sample: sample120271
Document: http://help.syncfusion.com/js/grid/columns#custom-attribute
http://help.syncfusion.com/js/api/ejgrid#members:columns-customattributes

angular.module('listCtrl', ['ejangular'])

        .controller("PhoneListCtrl", function ($scope) {

            $scope.columns =  [

                          { field: "EmployeeID", headerText: 'Employee ID', textAlign: ej.TextAlign.Right, width: 75 },

                          { field: "FirstName", headerText: 'First Name', textAlign: ej.TextAlign.Left, width: 100 },

                          { field: "City", headerText: 'City', textAlign: ej.TextAlign.Left, width: 100,customAttributes: { "id": "{{:EmployeeID}}" } },  // jsrender syntax usage in custom Attribute


                           . . . .

            ]

            $scope.groupedcol = ["EmployeeID"];


            $scope.onLoadClick = function () {

                var data = window.employeeView;

                var targetsGrid = $("#targetsGrid").data("ejGrid");

                $scope.data = data;

            }

           
        });



Before proceeding further, could you please share the following details?
1.       Are you want to generate unique id’s to all rows (tr) and all cells (td)?
2.       Share the requirement to generate all rows and cells with unique ids.
3.       Please explain more details about how you want the unique ids which will be helpful to analyze your requirement and provide the better solution at the earliest.



Regards,
Balaji Marimuthu


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;