Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

banging my head re: gridview with web app:just getting a row value

$
0
0
V/S 2012
Web app(ASP)

I have a gridview, deriving data from a sql DB
A simple 2 column view, with the 1st column being a Select link(one instance for each row)

I've tried figuring out the 'DataKeys' scheme, with no luck..

Here's my gridview code from the aspx:
Code:

        <asp:GridView ID="gv_main" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames="Select,Aaron Medlen" Height="720px" Width="231px">
            <Columns>
                <asp:CommandField ButtonType="Link" ShowSelectButton="true" />
                <asp:BoundField DataField="Aaron_Medlen" HeaderText="userName" SortExpression="user_name" />
            </Columns>
        </asp:GridView>

For now, all I want to do is see that if I hit 'Select' on any row, that the row's value(2nd column) posts to the text box I have on the aspx

seems soo easy...
yet, here I am

Thanks lads,
Rich

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>