Does anyone know what property I can use to retrieve the value in a datagrid cell? Below I have a button column that has a "Select" link. When I click it I want to retrieve a value in one of the columns and assign it to a variable. Can someone help. Thanks
James
<aspataGrid id="lstResults" runat="server" Visible="False" PageSize="100" AutoGenerateColumns="False" Width="60%" HorizontalAlign="Center" CellPadding="0">
<HeaderStyle Font-Bold="True" HorizontalAlign="Center"></HeaderStyle>
<Columns>
<asp:ButtonColumn Text="Select" CommandName="Select">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:ButtonColumn>
<asp:BoundColumn DataField="twp" HeaderText="TWP">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="wbs" HeaderText="WBS">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Resource" HeaderText="Resource">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="camname" HeaderText="CAM Name">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="boe" HeaderText="BOE Desc">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" Wrap="True" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>
</Columns>
</aspataGrid>
James
<aspataGrid id="lstResults" runat="server" Visible="False" PageSize="100" AutoGenerateColumns="False" Width="60%" HorizontalAlign="Center" CellPadding="0">
<HeaderStyle Font-Bold="True" HorizontalAlign="Center"></HeaderStyle>
<Columns>
<asp:ButtonColumn Text="Select" CommandName="Select">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:ButtonColumn>
<asp:BoundColumn DataField="twp" HeaderText="TWP">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="wbs" HeaderText="WBS">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Resource" HeaderText="Resource">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="camname" HeaderText="CAM Name">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="boe" HeaderText="BOE Desc">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Top"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" Wrap="True" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>
</Columns>
</aspataGrid>