Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pulling data from a grid view
Message
From
29/11/2006 15:00:42
 
 
To
29/11/2006 05:07:14
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01173076
Message ID:
01173471
Views:
6
Hi! Thanks for your help. What I'm really needing though is the code for my ASPX code behind page in the postback to find which rows have been checked. I wish to store the data of the checked items in the gridview in a session variable after the form is submitted.

Thanks in advance!

Greg

>hi Greg try the following
>
><asp:GridView ID="OtherOptionsGridView" AutoGenerateColumns="false" runat="server">
>            <Columns>
>                <asp:TemplateField>
>                    <ItemTemplate>
>                        <asp:CheckBox runat="server" ID="RowLevelCheckBox" />
>                    </ItemTemplate>
>                </asp:TemplateField>
>                <asp:BoundField DataField="Name" HeaderText="Name"/>
>                <asp:BoundField DataField="msrp" HeaderText="MSRP" DataFormatString="{0:C0}" HtmlEncode="false" />
>                <asp:TemplateColumn HeaderText="Model Option">
>	           <ItemTemplate>
>		      <asp:CheckBox id="Checkbox1" runat="server" Checked='< %# DataBinder.Eval(Container, "DataItem.modeloptionid") % >'></asp:CheckBox>
>                   </ItemTemplate>
>	        </asp:TemplateColumn>
>            </Columns>
></asp:GridView>
>
>
>
>>I’m trying to grab the data in the modeloptionid of this gridview:
>>
>>
>><asp:GridView ID="OtherOptionsGridView" AutoGenerateColumns="false" runat="server">
>>            <Columns>
>>                <asp:TemplateField>
>>                    <ItemTemplate>
>>                        <asp:CheckBox runat="server" ID="RowLevelCheckBox" />
>>                    </ItemTemplate>
>>                </asp:TemplateField>
>>                <asp:BoundField DataField="Name" HeaderText="Name"/>
>>                <asp:BoundField DataField="msrp" HeaderText="MSRP" DataFormatString="{0:C0}" HtmlEncode="false" />
>>                <asp:BoundField DataField="modeloptionid" Visible="false" />
>>            </Columns>
>>        </asp:GridView>
>>
>>
>>What would be the syntax I would need to write to pull the data bound to modeloptionid.
>>
>>Thanks in advance!
>>
>>
>>Greg
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform