如何用autogeneratecolumns = true在gridview中用一些文本填充空单元格 [英] how to fill up empty cells with some text in gridview with autogeneratecolumns=true
问题描述
亲爱的朋友
我只想使用sqldatasource填充gridview
如果表中有一些空白列,则在gridview中它也作为空白单元格
所以我只想填充那些空白单元格
以及autogenerate column = true
没有使用模板字段
我尝试使用emprydatatext属性和emptydatatemplate,但是它不起作用
所以请给个建议
感谢
dear friends
i just want to fill up gridview withusing sqldatasource
if table have some blank column then in gridview it also came as blank cell
so i just want to fill up those blank cells
and also with autogenerate columns=true
no template field used
i tried with emprydatatext properties and emptydatatemplate but it is not working
so please give suggestions
thanks
推荐答案
<asp:boundfield headertext="Middle Name" nulldisplaytext="N/A" datafield="MiddleName" sortexpression="MiddleName" xmlns:asp="#unknown"></asp:boundfield>
这里NullDisplayText ="N/A"处理该问题.
希望对您有所帮助.
Here NullDisplayText="N/A" handle that.
Hope this can help you.
这篇关于如何用autogeneratecolumns = true在gridview中用一些文本填充空单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!