Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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);

Posted

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"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...