次のデータグリッドがあります。
1つの列と多くの行しかありません。
<asp:DataGrid id="grid1" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn DataField="something">
<ItemStyle CssClass="myclass"></ItemStyle>
</asp:BoundColumn>
</Columns>
/>
Note the myclass class in itemstyle.
When I click over a row I want to get the value in the row populated by the datasource.
I have the following jquery script:
$('.myclass').click(function () {
// I DO NO KNOW WHAT TO ADD HERE ???
});
I've tried many solutions: $(this).text, $(this).val, $(this).attr('text')
but with no success.