Modify text values in datagrid returned by SELECT command

I would like to modify the text values after the data has been returned from the database, I need to modify the MBS1270 and the MBS1263 to look like the others when displayed in the datagrid. SelectCommand="SELECT PartNumber as 'Part Number', OnhandStockLevel as 'In Stock', DueIn as 'In Production' FROM vw_Rb_FreeStock WHERE PartNumber = 'UFP-0390B' OR PartNumber = 'UFP-0690B' OR PartNumber = 'MBS1270' OR PartNumber = 'MBS1263'"> Now, I have used the javascript to replace the values in body load, however, this messes up the sorting of the datagrid and makes the new replaced values appear on top still, because 'M' comes before 'U', and it still sorts based on the old value. Javascript: I want to replace the MBS values with values 'UFP-1690B' and 'UFP-1290B'. Is there any way to sort based on the replaced values? Or is there another approach I could take? I tried to do something similar as to how you replace the column header using the 'AS' sql function but that failed, something like that would be perfect. And no, I can't change the raw database value. Gridview code:

以上就是Modify text values in datagrid returned by SELECT command的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准