Click here to Skip to main content
15,912,069 members
Home / Discussions / ASP.NET
   

ASP.NET

 
SuggestionRe: Detailsview InsertItem Pin
Richard Deeming16-Nov-15 2:56
mveRichard Deeming16-Nov-15 2:56 
QuestionASP.NET Pin
Member 1214037915-Nov-15 4:09
Member 1214037915-Nov-15 4:09 
AnswerRe: ASP.NET Pin
Afzaal Ahmad Zeeshan15-Nov-15 23:57
professionalAfzaal Ahmad Zeeshan15-Nov-15 23:57 
AnswerRe: ASP.NET Pin
ZurdoDev16-Nov-15 2:20
professionalZurdoDev16-Nov-15 2:20 
Questionasp.net Pin
Member 1214037915-Nov-15 3:51
Member 1214037915-Nov-15 3:51 
AnswerRe: asp.net Pin
Afzaal Ahmad Zeeshan15-Nov-15 23:58
professionalAfzaal Ahmad Zeeshan15-Nov-15 23:58 
AnswerRe: asp.net Pin
ZurdoDev16-Nov-15 2:21
professionalZurdoDev16-Nov-15 2:21 
QuestionGridview with full-screen editing question Pin
Member 1044208512-Nov-15 7:53
Member 1044208512-Nov-15 7:53 
I have a gridview control on my web page named gvItems. I have items and serial numbers defined on the gridview. I allow our customers to add serial numbers for their products. I use full-screen editing and I do not use the Edit / Update / Cancel link buttons.

As you can see in my HTML below, I have a textbox named txtSerialNum. As I load the gridview rows from my SQL stored procedure, I have a column which tells me whether this item requires a serial number. If it does require a serial number, then I want to allow them to enter it like it is now. But if the item does not require a serial number, then I want to make the textbox enabled=false or readonly.

How can I accomplish this? I assume I can use one of the gridview events but not sure which one. Here is my gridview code. I can post my C# code but the gridview is populated correctly already.

ASP.NET
<asp:GridView ID="gvItems" 
              runat="server"
              AutoGenerateColumns="False">
                <Columns>
                   <asp:TemplateField HeaderText="Sku">
                     <ItemTemplate>
                        <asp:Label ID="lblSku" runat="server" Text='<%# Eval("RmaSku") %>'>
                        </asp:Label>
                     </ItemTemplate>
                   </asp:TemplateField>  
                   <asp:TemplateField HeaderText="Description">
                     <ItemTemplate>
                        <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'>
                        </asp:Label>
                     </ItemTemplate>
                   </asp:TemplateField> 
                   <asp:TemplateField HeaderText="Serial Number">
                     <ItemTemplate>
                        <asp:TextBox ID="txtSerialNum" runat="server" Text='<%# Eval("SerialNum") %>'>
                        </asp:TextBox>
                     </ItemTemplate>                                            
                   </asp:TemplateField> 
                   <asp:TemplateField HeaderText="Problem">
                     <ItemTemplate>
                        <asp:DropDownList ID="ddlProblem" 
                                          runat="server" 
                                          DataValueField="RmaProblemId" 
                                          DataTextField="RmaProblemDescription"
                                          DataSource='<%#GetProblems()%>' 
                                          SelectedValue='<%# Eval("RmaProblemId") %>'>
                       </asp:DropDownList>
                     </ItemTemplate>
                   </asp:TemplateField> 
                   <asp:TemplateField Visible="false">
                     <ItemTemplate>
                        <asp:Label ID="lblRmaDetailId" runat="server" Text='<%# Eval("RmaDetailId") %>'>
                        </asp:Label>
                     </ItemTemplate>
                   </asp:TemplateField> 
                   <asp:TemplateField Visible="false">
                     <ItemTemplate>
                        <asp:Label ID="lblRmaSerialNumRequired" runat="server" Text='<%# Eval("RmaSerialNumRequired") %>'>
                        </asp:Label>
                     </ItemTemplate>
                  </asp:TemplateField>                                                                          
            </Columns>
</asp:GridView>

AnswerRe: Gridview with full-screen editing question Pin
Mathi Mani12-Nov-15 8:18
Mathi Mani12-Nov-15 8:18 
GeneralRe: Gridview with full-screen editing question Pin
Member 1044208512-Nov-15 9:08
Member 1044208512-Nov-15 9:08 
QuestionHelp with a connection string Pin
Member 121243549-Nov-15 13:50
Member 121243549-Nov-15 13:50 
AnswerRe: Help with a connection string Pin
Wombaticus10-Nov-15 1:09
Wombaticus10-Nov-15 1:09 
AnswerRe: Help with a connection string Pin
Richard Deeming10-Nov-15 1:21
mveRichard Deeming10-Nov-15 1:21 
GeneralRe: Help with a connection string Pin
Member 1212435410-Nov-15 12:28
Member 1212435410-Nov-15 12:28 
GeneralRe: Help with a connection string Pin
Richard Deeming11-Nov-15 1:54
mveRichard Deeming11-Nov-15 1:54 
GeneralRe: Help with a connection string Pin
Member 1212435411-Nov-15 11:59
Member 1212435411-Nov-15 11:59 
QuestionJquery Ajax method call with asp.net static webmethods Pin
ganesh.dks8-Nov-15 20:31
ganesh.dks8-Nov-15 20:31 
AnswerRe: Jquery Ajax method call with asp.net static webmethods Pin
Nathan Minier9-Nov-15 2:53
professionalNathan Minier9-Nov-15 2:53 
GeneralRe: Jquery Ajax method call with asp.net static webmethods Pin
F-ES Sitecore9-Nov-15 4:49
professionalF-ES Sitecore9-Nov-15 4:49 
GeneralRe: Jquery Ajax method call with asp.net static webmethods Pin
Nathan Minier9-Nov-15 6:05
professionalNathan Minier9-Nov-15 6:05 
GeneralRe: Jquery Ajax method call with asp.net static webmethods Pin
Richard Deeming9-Nov-15 9:04
mveRichard Deeming9-Nov-15 9:04 
GeneralRe: Jquery Ajax method call with asp.net static webmethods Pin
Nathan Minier19-Nov-15 1:23
professionalNathan Minier19-Nov-15 1:23 
AnswerRe: Jquery Ajax method call with asp.net static webmethods Pin
F-ES Sitecore9-Nov-15 4:59
professionalF-ES Sitecore9-Nov-15 4:59 
QuestionASP.NET MVC How to implement timer functionality to update dock panels on client side respective to their time intervals? Pin
glitteringsound4-Nov-15 20:41
glitteringsound4-Nov-15 20:41 
AnswerRe: ASP.NET MVC How to implement timer functionality to update dock panels on client side respective to their time intervals? Pin
Nathan Minier5-Nov-15 1:37
professionalNathan Minier5-Nov-15 1:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.