Hi
I have below columns data returned. I want if name = actions' then in row 2 button Edit & Delete should be displayed.
Code
Columns are displayed like below
1:
name: "description"
title: "Description"Thanks
Hi
I have below columns data returned. I want if name = actions' then in row 2 button Edit & Delete should be displayed.
Columns are displayed like below
1:
name: "description"
title: "Description"Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vishal JoshiRank #377 · 6.7K reputationPosted Jun 26, 2024, 3:37 AM EDT
Hello,
It's not mentioned in which laguage need solution. but in asp.net c# you can try the code like below sample
protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e) { foreach (GridViewRow dr in GridView2.Rows) { if (e.Row.RowType == DataControlRowType.DataRow) { Button btn = new Button(); btn.Text = "Edit"; btn.ID = "Edit"; btn.Click += new EventHandler(Edit_Click); if (dr.Cells[1].Text == "actions") { dr.Cells[10].Controls.Add((Control)btn); } } } }Thanks
Ramco RamcoRank #462 · 5.4K reputationPosted Jun 26, 2024, 4:23 AM EDT
Hi
I need in Angular 17
Thanks