ISPrincess
Programmer
I know there is an easy answer to this, I am still a newbie though.
I have one datagrid - dgSecurity that is called upon clicking the detail button of the main data grid row - dgUsers.
above the dgSecurity grid - I have Edit/save/cancel buttons. In other words - I do not want the grid to automatically come up into edit mode, but do want one entire column/every row to open up into edit mode when the user clicks the Edit button.
Also, the column to be edited is radiobuttonlist.
Am I missing something very basic here? How would I open up the entire column to editing when the user clicks the edit button?
Here is my HTML if anyone needs to see it.
PH
I was walking home one night and a guy hammering on a roof called me a paranoid little weirdo.
In morse code.
-Emo Phillips
I have one datagrid - dgSecurity that is called upon clicking the detail button of the main data grid row - dgUsers.
above the dgSecurity grid - I have Edit/save/cancel buttons. In other words - I do not want the grid to automatically come up into edit mode, but do want one entire column/every row to open up into edit mode when the user clicks the Edit button.
Also, the column to be edited is radiobuttonlist.
Am I missing something very basic here? How would I open up the entire column to editing when the user clicks the edit button?
Here is my HTML if anyone needs to see it.
Code:
<tr>
<td align="right" colSpan="2">
<asp:button id="btnFormEdit" runat="server" CausesValidation="False" EnableViewState="False"
Text="Edit" Width="51px" Enabled="False" Visible="false"></asp:button>
<asp:button id="btnFormAccept" runat="server" Text="Accept" Width="51px" Enabled="False" Visible="false"></asp:button>
<asp:button id="btnFormCancel" runat="server" CausesValidation="False" Text="Cancel" Width="51px"
Enabled="False" Visible="false"></asp:button>
<asp:button id="btnFormClose" runat="server" CausesValidation="False" Text="Close" Width="51px"
Enabled="False" Visible="false"></asp:button>
</td></tr>
<tr><td vAlign="top">
<asp:datagrid Visible="False" id="dgSecurity" runat="server" EnableViewState="true" Width="25%"
DataKeyField="FormID" AllowSorting="True" AutoGenerateColumns="false" AllowPaging="True" PageSize="10"
OnPageIndexChanged="dgSecurity_Paging">
<SelectedItemStyle BackColor="LightSteelBlue"></SelectedItemStyle>
<HeaderStyle Font-Size="13pt" Font-Bold="True" ForeColor="White" BackColor="Navy"></HeaderStyle>
<PagerStyle Font-Size="8pt" HorizontalAlign="Right" nextpagetext="Next >" PrevPageText="< Previous"
position="TopAndBottom" />
<SelectedItemStyle BackColor="LightSteelBlue"></SelectedItemStyle>
<Columns>
<asp:TemplateColumn HeaderText="Form" ItemStyle-Wrap=False ItemStyle-Font-Size=8pt>
<ItemTemplate>
<%# databinder.eval(container.dataitem, "FormName") %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Security level" HeaderStyle-Wrap="True">
<ItemTemplate>
<%# databinder.eval(container.dataitem, "LevelName") %>
</ItemTemplate>
<EditItemTemplate>
<asp:RadioButtonlist ID="radSecurity" Runat=server
SelectedIndex='<%# databinder.eval(container.dataitem, "SecurityLevelID") %>'
DataValueField="SecurityLevelID" DataTextField="LevelName" />
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid></td></tr>
PH
I was walking home one night and a guy hammering on a roof called me a paranoid little weirdo.
In morse code.
-Emo Phillips