Is there a way to create a label or text in gridview, that overwrites certain cells in a certain row if certain conditions are met?

Is there a way to create a label or text in gridview, that overwrites certain cells in a certain row if certain conditions are met?

I’m working with asp.net and I have created a grid view as below. When Status text is set to a particular status I want to cover all of the cells, apart from the status text, in that row with a warning.

I’m only in my second month as a professional developer and this is my first time posting, so please forgive any errors!

I’m working with asp.net and I have created a grid view as below. When Status text is set to a particular status I want to cover all of the cells, apart from the status text, in that row with a warning.

The data comes from an MQ string and is managed by a separate class. I’m thinking that a row databound event might be the way to go. I’m thinking something like the code below

Gridview:

 <asp:GridView runat="server" ID="gridDisc"  GridLines="none" AutoGenerateColumns="false" CellPadding="2" HeaderStyle-backColor="#CCEEFF" OnRowDataBound="gridDisc_RowDataBound" >
        &lt;AlternatingRowStyle CssClass="ep1" /&gt;
        &lt;Columns&gt;
            &lt;asp:BoundField DataField="StatusText" /&gt;
            &lt;asp:TemplateField&gt;
                &lt;ItemTemplate&gt;
                    &lt;asp:Label ID="lblPartDesc" runat="server"&gt;&lt;/asp:Label&gt;
                &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
            &lt;asp:BoundField DataField="Qty" /&gt;
            &lt;asp:BoundField DataField="UOI" /&gt;
            &lt;asp:TemplateField&gt;
                &lt;ItemTemplate&gt;
                    &lt;asp:Label ID="lblStockDetails" runat="server"&gt;&lt;/asp:Label&gt;
                &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
            &lt;asp:TemplateField&gt;
                &lt;ItemTemplate&gt;
                    &lt;asp:Label ID="lblDealerInv" runat="server"&gt;&lt;/asp:Label&gt;
                &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
            &lt;asp:BoundField DataField="Listprice" /&gt;
            &lt;asp:BoundField DataField="DiscCode" /&gt;
            &lt;asp:BoundField DataField="OptiInd" /&gt;
            &lt;asp:BoundField DataField="Weight" /&gt;
            &lt;asp:BoundField DataField="ExchangeSurcharge" /&gt;
        &lt;/Columns&gt;
    &lt;/asp:GridView&gt;

Code behind:

protected void gridDisc_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            PartEnquiryLine line = (PartEnquiryLine)e.Row.DataItem;
            Label lbl = (Label)e.Row.FindControl("lblStatusDetails");
             if (line.StatusText == Text["280"])
            {
                lbl.Text = Text["290"]
            }

But I haven’t been able to find any guidance on how to create a label that would cover specific cells in that row when triggered. I may be way off with this, but how would I do it?

c-sharp asp.net

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Hire ASP.Net Developers

Looking to outsource your asp dot net development requirement? ASP.Net is a special feature of the DOT Net framework created by Microsoft. At [HourlyDeveloper.io](https://hourlydeveloper.io/ "HourlyDeveloper.io"), we have a team of experienced...

Various ways of redirecting a request in Asp.Net Core

ASP.NET Core web applications often need to redirect a request to another resource based on some condition. There are multiple ways in which you can accomplish this task in ASP.NET Core MVC and Razor&#160;&#8230;

Routing in MVC - ASP.NET Core Demystified

ASP.NET Core MVC has introduced quite a few concepts that new (or new-to-ASP.NET) web developers might have some difficulty getting caught up with. My ASP.NET Core Demystified series is designed to help these developers get started building their own custom, full-fledged, working AASP.NET Core applications. In

What is the ASP.Net Machine Account on my Computer?

Some users have reported the existence of the ASP.Net machine account. In this article, I will discuss what is asp.net machine account in windows 10/7 and how to disable it, asp.net machine account password, and can I delete asp.net machine account? .NET Framework is an application on Windows that requires the installation to run several apps or games. However, when the .NET Framework is downloaded and installed, the application automatically creates an ASP NET machine account.

Add asp.net Identity in empty project

LIKE | COMMENT | SHARE | SUBSCRIBE Today, in this tutorial you will see the process of adding an ASP.NET Identity to the ASP.NET Web Application developed in...