Click here to Skip to main content
15,907,001 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help with reading XML Pin
Vikram A Punathambekar9-Jul-07 18:19
Vikram A Punathambekar9-Jul-07 18:19 
GeneralRe: Help with reading XML Pin
velkropie10-Jul-07 4:22
velkropie10-Jul-07 4:22 
GeneralRe: Help with reading XML Pin
Vikram A Punathambekar10-Jul-07 4:42
Vikram A Punathambekar10-Jul-07 4:42 
GeneralRe: Help with reading XML [modified] Pin
velkropie10-Jul-07 9:43
velkropie10-Jul-07 9:43 
QuestionExample DataGridView like Outlook... Pin
jsosa99-Jul-07 5:33
jsosa99-Jul-07 5:33 
AnswerRe: Example DataGridView like Outlook... Pin
velkropie11-Jul-07 11:40
velkropie11-Jul-07 11:40 
GeneralRe: Example DataGridView like Outlook... Pin
jsosa911-Jul-07 12:24
jsosa911-Jul-07 12:24 
GeneralRe: Example DataGridView like Outlook... Pin
velkropie13-Jul-07 10:53
velkropie13-Jul-07 10:53 
here is you drag and drop to get you started

void grdCampaigns_MouseDown(object sender, MouseEventArgs e)<br />
{<br />
    if (e.Button == MouseButtons.Right)<br />
    {<br />
      DataGridView.HitTestInfo info = grdCampaigns.HitTest(e.X, e.Y);<br />
      if (info.RowIndex >= 0)<br />
      {<br />
        DataRowView view = (DataRowView)<br />
               grdCampaigns.Rows[info.RowIndex].DataBoundItem;<br />
        if (view != null)<br />
          grdCampaigns.DoDragDrop(view, DragDropEffects.Copy);<br />
    }<br />
  }<br />
}


void lstCategories_DragEnter(object sender, DragEventArgs e)<br />
{<br />
  e.Effect = DragDropEffects.Copy;<br />
}


Collapse
void lstCategories_DragDrop(object sender, DragEventArgs e)<br />
{<br />
  if (e.Data.GetDataPresent(typeof(DataRowView)))<br />
  {<br />
    // Determine which category the item was draged to<br />
    Point p = lstCategories.PointToClient(new Point(e.X,e.Y));<br />
    int index = lstCategories.IndexFromPoint(p);<br />
    if (index >= 0)<br />
    {<br />
      // Get references to the category and campaign<br />
      DataRowView category = (DataRowView)lstCategories.Items[index];<br />
      DataRowView campaign = (DataRowView)<br />
                              e.Data.GetData(typeof(DataRowView));<br />
      // Get the old and new category ids<br />
      int newID = (int)category[0];<br />
      int oldID = (int)campaign[1];<br />
      // Make sure the two do not match<br />
      if (oldID != newID)<br />
      {<br />
        campaign.BeginEdit();<br />
        campaign[1] = newID;<br />
        campaign.EndEdit();<br />
      }<br />
    }<br />
  }<br />
}





The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!

Questionunable to cast object of type 'X' to type 'X' Pin
joelbasson9-Jul-07 5:22
joelbasson9-Jul-07 5:22 
AnswerRe: unable to cast object of type 'X' to type 'X' Pin
Colin Angus Mackay9-Jul-07 5:47
Colin Angus Mackay9-Jul-07 5:47 
AnswerRe: unable to cast object of type 'X' to type 'X' Pin
Martin#9-Jul-07 6:02
Martin#9-Jul-07 6:02 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Colin Angus Mackay9-Jul-07 7:16
Colin Angus Mackay9-Jul-07 7:16 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
PIEBALDconsult9-Jul-07 8:25
mvePIEBALDconsult9-Jul-07 8:25 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Luc Pattyn9-Jul-07 8:35
sitebuilderLuc Pattyn9-Jul-07 8:35 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Martin#9-Jul-07 8:41
Martin#9-Jul-07 8:41 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
PIEBALDconsult9-Jul-07 13:48
mvePIEBALDconsult9-Jul-07 13:48 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Luc Pattyn9-Jul-07 14:18
sitebuilderLuc Pattyn9-Jul-07 14:18 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Martin#9-Jul-07 8:51
Martin#9-Jul-07 8:51 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Colin Angus Mackay9-Jul-07 11:19
Colin Angus Mackay9-Jul-07 11:19 
GeneralRe: unable to cast object of type 'X' to type 'X' [modified] Pin
Martin#9-Jul-07 19:21
Martin#9-Jul-07 19:21 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Martin#9-Jul-07 19:54
Martin#9-Jul-07 19:54 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Vikram A Punathambekar9-Jul-07 17:50
Vikram A Punathambekar9-Jul-07 17:50 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Martin#9-Jul-07 19:35
Martin#9-Jul-07 19:35 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Martin#9-Jul-07 19:52
Martin#9-Jul-07 19:52 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Vikram A Punathambekar9-Jul-07 20:16
Vikram A Punathambekar9-Jul-07 20:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.