How can i add cell in specific column for each row in gridview,i want to use RowCreated Events.
i have gridview that has 3 columns (ProductName, Price, Count) i get (ProductName, Price) from database, and i want to add value for (count), ex: (Kitkat, 2$ ) i want to add number 5 to (count) column, i want to handle this operation when each row created.
Thanks
Since you haven’t shown your markup, I’m going to assume (based on your comment) that the first two columns are
<BoundFields>. If that’s the case, I would add a third column as a<TemplateField>, place aLabelin it, and use theRowDataBoundevent to add the correct number to theLabel.Here is what the markup would look like:
And the code-behind: