Click here to Skip to main content
16,015,296 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple way to play audio/video file in form? Pin
Christian Graus12-Jan-07 1:05
protectorChristian Graus12-Jan-07 1:05 
GeneralRe: Simple way to play audio/video file in form? Pin
TrooperIronMan12-Jan-07 4:53
TrooperIronMan12-Jan-07 4:53 
GeneralRe: Simple way to play audio/video file in form? Pin
Christian Graus12-Jan-07 9:27
protectorChristian Graus12-Jan-07 9:27 
GeneralRe: Simple way to play audio/video file in form? Pin
Ed.Poore11-Jan-07 13:00
Ed.Poore11-Jan-07 13:00 
GeneralRe: Simple way to play audio/video file in form? Pin
TrooperIronMan11-Jan-07 14:00
TrooperIronMan11-Jan-07 14:00 
GeneralRe: Simple way to play audio/video file in form? Pin
Ed.Poore11-Jan-07 20:13
Ed.Poore11-Jan-07 20:13 
QuestionTrap DataGrid Sort Event Pin
swjam11-Jan-07 11:31
swjam11-Jan-07 11:31 
AnswerRe: Trap DataGrid Sort Event Pin
Jamestown4811-Jan-07 12:34
Jamestown4811-Jan-07 12:34 
This is from MS Help file example.
It might be usable to your occasion.
//===================================
private void sortButton_Click(object sender, System.EventArgs e)
{
// Check which column is selected, otherwise set NewColumn to null.
DataGridViewColumn newColumn =
dataGridView1.Columns.GetColumnCount(
DataGridViewElementStates.Selected) == 1 ?
dataGridView1.SelectedColumns[0] : null;

DataGridViewColumn oldColumn = dataGridView1.SortedColumn;
ListSortDirection direction;

// If oldColumn is null, then the DataGridView is not currently sorted.
if (oldColumn != null)
{
// Sort the same column again, reversing the SortOrder.
if (oldColumn == newColumn &&
dataGridView1.SortOrder == SortOrder.Ascending)
{
direction = ListSortDirection.Descending;
}
else
{
// Sort a new column and remove the old SortGlyph.
direction = ListSortDirection.Ascending;
oldColumn.HeaderCell.SortGlyphDirection = SortOrder.None;
}
}
else
{
direction = ListSortDirection.Ascending;
}

// If no column has been selected, display an error dialog box.
if (newColumn == null)
{
MessageBox.Show("Select a single column and try again.",
"Error: Invalid Selection", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
else
{
dataGridView1.Sort(newColumn, direction);
newColumn.HeaderCell.SortGlyphDirection =
direction == ListSortDirection.Ascending ?
SortOrder.Ascending : SortOrder.Descending;
}
}

Jamestown
GeneralRe: Trap DataGrid Sort Event Pin
swjam11-Jan-07 12:45
swjam11-Jan-07 12:45 
QuestionLanguage Translation in .Net Web application Pin
suvarna joshi11-Jan-07 11:09
suvarna joshi11-Jan-07 11:09 
AnswerRe: Language Translation in .Net Web application Pin
led mike11-Jan-07 11:16
led mike11-Jan-07 11:16 
QuestionHeader files included in Web Services? Pin
joeller11-Jan-07 10:34
professionaljoeller11-Jan-07 10:34 
QuestionVisual C# Pin
BlitzPackage11-Jan-07 9:20
BlitzPackage11-Jan-07 9:20 
AnswerRe: Visual C# Pin
netJP12L11-Jan-07 9:46
netJP12L11-Jan-07 9:46 
AnswerRe: Visual C# Pin
Ed.Poore11-Jan-07 9:46
Ed.Poore11-Jan-07 9:46 
GeneralRe: Visual C# Pin
TrooperIronMan11-Jan-07 12:02
TrooperIronMan11-Jan-07 12:02 
GeneralRe: Visual C# Pin
Ed.Poore11-Jan-07 12:10
Ed.Poore11-Jan-07 12:10 
GeneralRe: Visual C# Pin
TrooperIronMan11-Jan-07 12:20
TrooperIronMan11-Jan-07 12:20 
GeneralRe: Visual C# Pin
Christian Graus11-Jan-07 12:38
protectorChristian Graus11-Jan-07 12:38 
GeneralRe: Visual C# Pin
TrooperIronMan11-Jan-07 12:50
TrooperIronMan11-Jan-07 12:50 
GeneralRe: Visual C# Pin
Ed.Poore11-Jan-07 13:03
Ed.Poore11-Jan-07 13:03 
GeneralRe: Visual C# Pin
Christian Graus11-Jan-07 21:30
protectorChristian Graus11-Jan-07 21:30 
GeneralRe: Visual C# Pin
TrooperIronMan12-Jan-07 0:41
TrooperIronMan12-Jan-07 0:41 
QuestionPasting a string value to a remote application Pin
sampath Jayasinghe11-Jan-07 8:55
sampath Jayasinghe11-Jan-07 8:55 
Questionevent handler Pin
Harikrk11-Jan-07 8:20
Harikrk11-Jan-07 8:20 

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.