joecool2005 Posted May 15, 2009 Share Posted May 15, 2009 HiI tried to generate a dataGrid like this Dim dt As DataTableDim dr As DataRow Dim theGrid As New DataGrid theGrid.BorderColor = Drawing.Color.Black theGrid.BorderWidth = 1 theGrid.GridLines = GridLines.Both theGrid.CellPadding = 3 theGrid.CellSpacing = 0 theGrid.HeaderStyle.BackColor = Drawing.Color.AliceBlue dt = New DataTable dt.Columns.Add(New DataColumn("First name", GetType(String))) dt.Columns.Add(New DataColumn("Last Name", GetType(String))) dt.Columns.Add(New DataColumn("")) dr = dt.NewRow() dr(0) = "Joe" dr(1) = "Cool" dt.Rows.Add(dr) theGrid.DataSource = New DataView(dt) theGrid.DataBind() Is it possible to add a button control on third column dr(2) ? Something like this <asp:Button id=Button1 runat="server" Text="ok" />If yes, how?ThxJoe Link to comment Share on other sites More sharing options...
shyam Posted July 12, 2009 Share Posted July 12, 2009 This is answer if you are using vb.net(web application as i know)in properties of datagrid AUTOGENERATE COLUMNAUTOGENERATE DELETE BUTTONAUTOGENERATE EDIT BUTTONOR AND YOU CAN ADD COLUMN ON CLICK IN ADD NEW COLUMN (( AT THERE SEE DOWN ( WHERE U SELECT A DATASOURCE))) Link to comment Share on other sites More sharing options...
Head Posted April 21, 2011 Share Posted April 21, 2011 The add edit and delete button seems to work. But I thought the original post was about adding a whole new table / column? I've often checked my work with co-op companies. There are a few companies (www.coop-systems.com) around here locally. I guess I'm confused why you can't just add another dr (2) function at the top under the originals? Or is this after the program is already running? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.