asp.net网格视图 [英] asp.net grid view

查看:57
本文介绍了asp.net网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个自动生成列为true的gridview.
现在,我有一个编辑命令字段,我希望它出现在gridview的右侧.

应该怎么做?

请帮助我

Hi all,

I have a gridview in which auto generate columns are true.
Now I have a edit command field and I want that it comes on right hand side of gridview.

How should it be done?

Help me please

推荐答案

您可以像下面这样尝试,
You can try like bellow,
Protected Sub Load_GridView(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.Load
      Try
          GridView1.Columns.Clear()
          'Dim col As New BoundField
          'col.DataField = "ProfileId"
          'col.HeaderText = "ID"
          'GridView1.Columns.Add(col)
          Dim colf As CommandField = New CommandField
          colf.EditText = "Edit"
          'colf.UpdateText = "Update"
          'colf.CancelText = "Cancel"
          'colf.ShowCancelButton = True
          'colf.ShowEditButton = True
          'colf.ShowSelectButton = True
          'GridView1.Columns.Add(colf)
          GridView1.Columns.Insert(0, colf)
      Catch ex As Exception
      End Try
  End Sub


这篇关于asp.net网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆