[英]How can draw a rectangle inside a cell from GridView, I using webforms c#
You can use the OnRowDataBound event of the gridview to change the contents of the cells programmatically.您可以使用 gridview 的 OnRowDataBound 事件以编程方式更改单元格的内容。
Just at a quick google I found this tutorial with an example of making a visual change to a cell based on data in the row: http://www.tutorialspanel.com/rowdatabound-event-gridview-asp-net/ "Example 1: highlight the row in red if salary is equal or above $10.000" is conceptually similar to what you're trying to do I think.只是在一个快速的谷歌我发现这个教程有一个例子,根据行中的数据对单元格进行视觉更改: http : //www.tutorialspanel.com/rowdatabound-event-gridview-asp-net/ “示例 1 :如果薪水等于或高于 10.000 美元,则以红色突出显示该行”在概念上与我认为的您尝试做的类似。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.