Hi,
I am using Infragistics grid in MVC3. In the Infragistics grid i want a column to have a checkbox and this checkbox is checked based on the data from the database. Could you please guide me how to do with MVC3 razor.
thanks.
Hi Suresh,
FYI - starting in 12.1, this functionality will be supported out of the box in the grid, without the need to create a template:
example:
{ headerText: 'Is Postponed', key: 'IsPostponed', dataType: 'bool', width: '200px', format: 'checkbox' }
format: 'checkbox' is the new functionality. see the attached screenshot - that's how it looks like.
Hope it helps. Thanks,
Angel
Hi Alex,
As you said , i added the script for the checkbox in my ig grid ,
$("#resultGrid").igGrid({ columns: [ { headerText: "Ballot Id", key: "BallotId", width: 100 }, { headerText: "Account Name", key: "AccountName", width: 300 }, { headerText: "Shares to vote", key: "Sharestovote", type: 'number', width: 125 }, { headerText: "Vote String", key: "VoteString", width: 125 }, { headerText: "Vote String Summary", key: "VoteStringSummary", width: 125 }, { headerText: "Voted Date", key: "LastVotedDate", width: 125 }, { headerText: "Voted FM User", key: "LastVoteFmUser", width: 125 }, { headerText: "Voted User", key: "LastVotedUser", width: 125 }, { headerText: "Iss User", key: "IssUser", width: 125 }, { headerText: "IS Selected", key: "IsSelected", dataType: "bool",width: 75, format:"checkbox" }, { headerText: "Account ID", key: "AccountID", hidden: true }, { headerText: "IsShareBlocking", key: "IsShareBlocking", hidden: true }, { headerText: "Location ID", key: "LocationID", hidden: true }, { headerText: "Meeting ID", key: "MeetingID", hidden: true }, { headerText: "pxVote User ID", key: "pxVoteUserID", hidden: true }, { headerText: "Vote cutoff Date", key: "Votecutoffdate", hidden: true }, ], features: [ { name: 'RowSelectors' }, { name: 'Selection', mode: "cell", multipleSelection: true } ], dataType: "json", width: '100%', //column resizing renderCheckboxes: true, dataSource: jQuery.parseJSON(data) //JSON Array }); } the data source from my view model [{"AccountID":5845,"AccountName":"Invesco Asia Infrastructure Fund","BallotId":83492125,"IsShareBlocking":false,"LocationID":9590,"MeetingID":1210362,"Sharestovote":17203300.00000,"Votecutoffdate":"2018-04-16T15:00:00","IsSelected":false,"pxVoteUserID":null,"IssUser":null,"VoteString":null,"VoteStringSummary":null,"LastVotedDate":null,"LastVotedUser":null,"LastVoteFmUser":null}]Can you please suggest me what to do for above ?
It isn't clear what you are asking here. Please also create a new thread rather than following up on a thread that is six years old for new questions. You can reference the older thread in your new post if it is relevant.