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