ブートグリッドは、一意の値の場合、数値以外の列 ID を識別子として使用できますか?
<th data-column-id="mytextid" data-identifier="true">Unique Text ID</th>
たとえば、 selection="true" は機能しますか? または、識別子列に数値が必要ですか?
ブートグリッドは、一意の値の場合、数値以外の列 ID を識別子として使用できますか?
<th data-column-id="mytextid" data-identifier="true">Unique Text ID</th>
たとえば、 selection="true" は機能しますか? または、識別子列に数値が必要ですか?
OK、フィドルで試しました。数値以外の data-identifier を持つことができます。(IMHOはdata-row-identifierと呼ばれるべきです...)
その列にアクセスするには、data-column-identifier で設定した名前を使用するだけです。
<!-- works!! even without data-type="numeric" -->
<th data-column-id="myid" data-identifier="true">My ID</th>
<th data-column-id="info">Info</th>
</tr>
</thead>
コードは
$("#mygrid").bootgrid(
{
// other settings... and:
selection: true
}).on("selected.rs.jquery.bootgrid", function(e, rows)
{
alert("Selected: " + rows[0].myid);
});