Click here to Skip to main content
15,921,694 members
Home / Discussions / C#
   

C#

 
GeneralRe: Group box text will not display an Ampersand Pin
Colin Angus Mackay22-Oct-04 13:57
Colin Angus Mackay22-Oct-04 13:57 
GeneralRe: Group box text will not display an Ampersand Pin
Tony D. Abel22-Oct-04 14:03
Tony D. Abel22-Oct-04 14:03 
GeneralTabPage OnClick Pin
quilkin22-Oct-04 12:14
quilkin22-Oct-04 12:14 
GeneralRe: TabPage onclick Pin
Heath Stewart22-Oct-04 12:43
protectorHeath Stewart22-Oct-04 12:43 
GeneralActive FTP and C# Pin
mrfricke200222-Oct-04 10:28
mrfricke200222-Oct-04 10:28 
Generaldrawing on the main menu background Pin
jcl55522-Oct-04 9:44
jcl55522-Oct-04 9:44 
GeneralRe: how to open url and login Pin
Heath Stewart22-Oct-04 12:45
protectorHeath Stewart22-Oct-04 12:45 
GeneralSerializing an object with two events; need to store the hooked-up event handlers somehow Pin
PilsnerDk22-Oct-04 8:32
PilsnerDk22-Oct-04 8:32 
QuestionRegOpenKey and similar .... marshal/P-Invoke?? Pin
Paolo Ponzano22-Oct-04 7:56
Paolo Ponzano22-Oct-04 7:56 
AnswerRe: RegOpenKey and similar .... marshal/P-Invoke?? Pin
Nick Parker22-Oct-04 10:57
protectorNick Parker22-Oct-04 10:57 
AnswerRe: RegOpenKey and similar .... marshal/P-Invoke?? Pin
Ami Bar22-Oct-04 13:56
Ami Bar22-Oct-04 13:56 
GeneralRe: RegOpenKey and similar .... marshal/P-Invoke?? Pin
Paolo Ponzano23-Oct-04 1:35
Paolo Ponzano23-Oct-04 1:35 
GeneralRe: RegOpenKey and similar .... marshal/P-Invoke?? Pin
Ami Bar23-Oct-04 5:01
Ami Bar23-Oct-04 5:01 
Generalfind the contents of a cell in a datagrid row Pin
steve_rm22-Oct-04 6:09
steve_rm22-Oct-04 6:09 
GeneralRe: find the contents of a cell in a datagrid row Pin
Heath Stewart22-Oct-04 12:59
protectorHeath Stewart22-Oct-04 12:59 
You use either the DataView you might have assigned to the DataGrid, or get the CurrencyManager and query for the DataRow with that index. Don't simply use the DataSet or DataTable because after sorting the DataGrid those rows our out of sync. An example follows:
CurrencyManager cm = (CurrencyManager)dataGrid1.BindingContext[
  dataGrid1.DataSource, dataGrid1.DataMember];
if (cm != null)
{
  // You could also just cast 'Current' to a DataRowView.
  DataView view = cm.List as DataView;
  if (view != null)
  {
    DataRowView rowView = view[rowIndex];
    object value = rowView[0];
    if (value != null) return value.ToString();
    else return null;
  }
}
An IndexOutOfRangeException may be thrown in this sample at view[rowIndex], but that should actually be a desired effect from this code (make sure you handle it, though).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralEfficient implementation of multidimensional arrays Pin
Andrew Kuklin22-Oct-04 5:03
sussAndrew Kuklin22-Oct-04 5:03 
GeneralRe: Efficient implementation of multidimensional arrays Pin
J4amieC22-Oct-04 5:24
J4amieC22-Oct-04 5:24 
GeneralRe: Efficient implementation of multidimensional arrays Pin
Utwig26-Oct-04 0:29
Utwig26-Oct-04 0:29 
QuestionWhich is faster?? Pin
exhaulted22-Oct-04 4:46
exhaulted22-Oct-04 4:46 
AnswerRe: Which is faster?? Pin
J4amieC22-Oct-04 5:16
J4amieC22-Oct-04 5:16 
GeneralRe: Which is faster?? Pin
exhaulted22-Oct-04 5:25
exhaulted22-Oct-04 5:25 
GeneralRe: Which is faster?? Pin
Colin Angus Mackay22-Oct-04 13:59
Colin Angus Mackay22-Oct-04 13:59 
GeneralRe: Which is faster?? Pin
exhaulted24-Oct-04 21:49
exhaulted24-Oct-04 21:49 
AnswerRe: Which is faster?? Pin
yoaz22-Oct-04 7:34
yoaz22-Oct-04 7:34 
AnswerRe: Which is faster?? Pin
Jankinsoo22-Oct-04 19:01
Jankinsoo22-Oct-04 19:01 

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.