edora Posted August 19, 2003 Posted August 19, 2003 How am i add a column after the column 2, which is column for delete and edit>? anyone could help me? thanks my form is as belowuntitled.bmp Quote
Brijesh81 Posted August 20, 2003 Posted August 20, 2003 Pls. try like this... DataGrid dgYourGrid; TemplateColumn dgNewCol= new TemplateColumn(); dgNewCol.HeaderText = "Product"; dgNewCol.ItemStyle.Width = 200; //...set other properties of the column.... //Now add the column to the grid.. dgYourGrid.Columns.Add(dgNewCol); Quote
edora Posted August 21, 2003 Author Posted August 21, 2003 Hi guys, need your help with this. I want, when I check the checkbox in the datagrid and click on the edit button(outside the datagrid), it will displa the edit form which is all the data was there to be edited. Below is my code done in vb.net and now i want to change it to asp.net ** For Each objItem In lvContacts.checkedItem If objItem.Checked = True Then objSMS.GetContactList() dtContact = objSMS.ContactList drEdit = dtContact.Select("System_ID = " & objItem.SubItems(2).Text) intGroupID = drEdit(0)("Group_ID") 'MsgBox(m_check.SubItems(2).Text) objSMS.GetGroup() dtGroup = objSMS.Group drGroup = dtGroup.Select(" System_ID = '" & intGroupID & "'") edit_contactlist.cboEditGroup.Text = drGroup(0)("Name") edit_contactlist.txtEditName.Text = objItem.SubItems(0).Text edit_contactlist.txtEditMobileURL.Text = objItem.SubItems(1).Text edit_contactlist.ID = objItem.SubItems(2).Text edit_contactlist.ShowDialog() End If Next lvContacts supposed to replace with datagrid. But whenever i replaced it , it will give this error command "syntax error" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.