Hi,
I am trying to create a web page whereby I first read data from Oracle Database and display the records out on the data grid. The data displayed is in order of one attribute say 'A' meaning that some records have the same value for 'A'. I need to display only 1 checkbox per group of records which has the same attribute 'A'. When the checkbox is checked, I need to update the database for all of the records with the same attribute 'A'.
Does anyone knows how this can be done? I have managed to display the checkbox for beside all the records using the following code in the .aspx file but is clueless on how to make it such that i will have 1 checkbox per group of records.
<TD><asp:datagr id id="DataGrid1" runat="server" ForeColor="Blac k" Font-Size="XX-Small" Font-Names="Verdana"
AutoGenerateCol umns="False" Width="100%" Height="100%" HorizontalAlign ="Left" AllowSorting="T rue"
BackColor="#C0C 0FF">
<AlternatingIte mStyle HorizontalAlign ="Left" BorderStyle="So lid" Width="100%" VerticalAlign=" Middle" BackColor="#FFE 0C0"></AlternatingItem Style>
<ItemStyle Font-Size="XX-Small" Font-Names="Verdana" HorizontalAlign ="Left" ForeColor="Blac k"
Width="100%" VerticalAlign=" Middle" BackColor="#C0C 0FF"></ItemStyle>
<HeaderStyle Font-Size="XX-Small" Font-Names="Verdana" Font-Bold="True" HorizontalAlign ="Center"
ForeColor="Whit e" Width="100%" VerticalAlign=" Middle" BackColor="Dark SlateBlue"></HeaderStyle>
<Columns>
<asp:TemplateCo lumn HeaderText="Pro ductName">
<ItemTemplate >
<asp:CheckBox id="CheckBox1" runat="server" AutoPostBack="T rue"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateCol umn>
<asp:BoundColum n DataField="EVEN T_ID" HeaderText="Eve nt ID"></asp:BoundColumn >
<asp:BoundColum n DataField="DEPO _ID" HeaderText="Dep ository ID"></asp:BoundColumn >
<asp:BoundColum n DataField="SEC_ ID" HeaderText="GEM S Security ID"></asp:BoundColumn >
<asp:BoundColum n DataField="SEC_ SHORT_DESC" HeaderText="Sec urity Description"></asp:BoundColumn >
<asp:BoundColum n DataField="LIST _CNTRY" HeaderText="Cou ntry"></asp:BoundColumn >
<asp:BoundColum n DataField="EX_D ATE" HeaderText="Ex-Date"></asp:BoundColumn >
<asp:BoundColum n DataField="EFFE CTIVE_DATE" HeaderText="Eff ective Date"></asp:BoundColumn >
<asp:BoundColum n DataField="CA_T YPE" HeaderText="CA Type"></asp:BoundColumn >
<asp:BoundColum n DataField="M_V_ INDICATOR" HeaderText="Ind icator"></asp:BoundColumn >
<asp:BoundColum n DataField="STAT US" HeaderText="Sta tus"></asp:BoundColumn >
<asp:BoundColum n DataField="CREA TED_BY" HeaderText="Cre ated By"></asp:BoundColumn >
<asp:BoundColum n DataField="CREA TED_DT_TM" HeaderText="Cre ated Date Time"></asp:BoundColumn >
<asp:BoundColum n DataField="LAST _MOD_BY" HeaderText="Las t Modified By"></asp:BoundColumn >
<asp:BoundColum n DataField="LAST _MOD_DT_TM" HeaderText="Las t Modified Date Time"></asp:BoundColumn >
<asp:BoundColum n DataField="CA_F ILE_STATUS" HeaderText="CA File Status"></asp:BoundColumn >
<asp:BoundColum n DataField="REMA RKS" HeaderText="Rem arks"></asp:BoundColumn >
</Columns>
</asp:datagrid></TD>
Thanks!
I am trying to create a web page whereby I first read data from Oracle Database and display the records out on the data grid. The data displayed is in order of one attribute say 'A' meaning that some records have the same value for 'A'. I need to display only 1 checkbox per group of records which has the same attribute 'A'. When the checkbox is checked, I need to update the database for all of the records with the same attribute 'A'.
Does anyone knows how this can be done? I have managed to display the checkbox for beside all the records using the following code in the .aspx file but is clueless on how to make it such that i will have 1 checkbox per group of records.
<TD><asp:datagr id id="DataGrid1" runat="server" ForeColor="Blac k" Font-Size="XX-Small" Font-Names="Verdana"
AutoGenerateCol umns="False" Width="100%" Height="100%" HorizontalAlign ="Left" AllowSorting="T rue"
BackColor="#C0C 0FF">
<AlternatingIte mStyle HorizontalAlign ="Left" BorderStyle="So lid" Width="100%" VerticalAlign=" Middle" BackColor="#FFE 0C0"></AlternatingItem Style>
<ItemStyle Font-Size="XX-Small" Font-Names="Verdana" HorizontalAlign ="Left" ForeColor="Blac k"
Width="100%" VerticalAlign=" Middle" BackColor="#C0C 0FF"></ItemStyle>
<HeaderStyle Font-Size="XX-Small" Font-Names="Verdana" Font-Bold="True" HorizontalAlign ="Center"
ForeColor="Whit e" Width="100%" VerticalAlign=" Middle" BackColor="Dark SlateBlue"></HeaderStyle>
<Columns>
<asp:TemplateCo lumn HeaderText="Pro ductName">
<ItemTemplate >
<asp:CheckBox id="CheckBox1" runat="server" AutoPostBack="T rue"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateCol umn>
<asp:BoundColum n DataField="EVEN T_ID" HeaderText="Eve nt ID"></asp:BoundColumn >
<asp:BoundColum n DataField="DEPO _ID" HeaderText="Dep ository ID"></asp:BoundColumn >
<asp:BoundColum n DataField="SEC_ ID" HeaderText="GEM S Security ID"></asp:BoundColumn >
<asp:BoundColum n DataField="SEC_ SHORT_DESC" HeaderText="Sec urity Description"></asp:BoundColumn >
<asp:BoundColum n DataField="LIST _CNTRY" HeaderText="Cou ntry"></asp:BoundColumn >
<asp:BoundColum n DataField="EX_D ATE" HeaderText="Ex-Date"></asp:BoundColumn >
<asp:BoundColum n DataField="EFFE CTIVE_DATE" HeaderText="Eff ective Date"></asp:BoundColumn >
<asp:BoundColum n DataField="CA_T YPE" HeaderText="CA Type"></asp:BoundColumn >
<asp:BoundColum n DataField="M_V_ INDICATOR" HeaderText="Ind icator"></asp:BoundColumn >
<asp:BoundColum n DataField="STAT US" HeaderText="Sta tus"></asp:BoundColumn >
<asp:BoundColum n DataField="CREA TED_BY" HeaderText="Cre ated By"></asp:BoundColumn >
<asp:BoundColum n DataField="CREA TED_DT_TM" HeaderText="Cre ated Date Time"></asp:BoundColumn >
<asp:BoundColum n DataField="LAST _MOD_BY" HeaderText="Las t Modified By"></asp:BoundColumn >
<asp:BoundColum n DataField="LAST _MOD_DT_TM" HeaderText="Las t Modified Date Time"></asp:BoundColumn >
<asp:BoundColum n DataField="CA_F ILE_STATUS" HeaderText="CA File Status"></asp:BoundColumn >
<asp:BoundColum n DataField="REMA RKS" HeaderText="Rem arks"></asp:BoundColumn >
</Columns>
</asp:datagrid></TD>
Thanks!
Comment