Click here to Skip to main content
16,011,744 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need help in c# simulation Pin
Richard MacCutchan25-Jan-11 20:58
mveRichard MacCutchan25-Jan-11 20:58 
GeneralRe: Need help in c# simulation Pin
Eddy Vluggen26-Jan-11 0:21
professionalEddy Vluggen26-Jan-11 0:21 
QuestionGridView, Trying to get some columns editable, and some columns readonly. Pin
wizardzz25-Jan-11 7:39
wizardzz25-Jan-11 7:39 
AnswerRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
Eddy Vluggen25-Jan-11 8:02
professionalEddy Vluggen25-Jan-11 8:02 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
wizardzz25-Jan-11 8:07
wizardzz25-Jan-11 8:07 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
Eddy Vluggen25-Jan-11 8:10
professionalEddy Vluggen25-Jan-11 8:10 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
wizardzz25-Jan-11 11:52
wizardzz25-Jan-11 11:52 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
Eddy Vluggen26-Jan-11 0:24
professionalEddy Vluggen26-Jan-11 0:24 
The "dt" prefix suggests that you're setting the Columns of the DataTable to readonly. The link that I posted set the readonly property on the Columns of a DataGridView. Both are possible, and seem to work correctly from a test-project;
C#
public Form1()
{
    InitializeComponent();

    DataGridView dgv = new DataGridView();
    dgv.Dock = DockStyle.Fill;
    Controls.Add(dgv);

    DataTable dt = new DataTable();
    dt.Columns.Add("Pair");
    dt.Columns.Add("Last");
    dt.Columns.Add("TimeStamp");
    //dt.Columns["Pair"].ReadOnly = true;
    //dt.Columns["TimeStamp"].ReadOnly = true;
    dt.Rows.Add();

    dgv.DataSource = dt;

    dgv.Columns[0].ReadOnly = true;
    dgv.Columns[2].ReadOnly = true;
}

Uncomment the "dt" lines if you want to test that variant Smile | :)
I are Troll Suspicious | :suss:

AnswerRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
dasblinkenlight25-Jan-11 8:11
dasblinkenlight25-Jan-11 8:11 
QuestionPlease tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 3:57
turbosupramk325-Jan-11 3:57 
AnswerRe: Please tell me why this simple shutdown application isn't working Pin
Praveen Raghuvanshi25-Jan-11 4:07
professionalPraveen Raghuvanshi25-Jan-11 4:07 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 4:53
turbosupramk325-Jan-11 4:53 
AnswerRe: Please tell me why this simple shutdown application isn't working Pin
Mirko198025-Jan-11 4:12
Mirko198025-Jan-11 4:12 
AnswerRe: Please tell me why this simple shutdown application isn't working Pin
Dave Kreskowiak25-Jan-11 4:17
mveDave Kreskowiak25-Jan-11 4:17 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
Mirko198025-Jan-11 4:25
Mirko198025-Jan-11 4:25 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 4:55
turbosupramk325-Jan-11 4:55 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 4:58
turbosupramk325-Jan-11 4:58 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
Dave Kreskowiak25-Jan-11 6:51
mveDave Kreskowiak25-Jan-11 6:51 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 7:18
turbosupramk325-Jan-11 7:18 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
Dave Kreskowiak25-Jan-11 8:08
mveDave Kreskowiak25-Jan-11 8:08 
QuestionHow to create a Module class in C# similar to VB .NET Pin
LAPEC25-Jan-11 1:23
LAPEC25-Jan-11 1:23 
AnswerRe: How to create a Module class in C# similar to VB .NET Pin
Estys25-Jan-11 1:29
Estys25-Jan-11 1:29 
GeneralRe: How to create a Module class in C# similar to VB .NET Pin
LAPEC25-Jan-11 1:40
LAPEC25-Jan-11 1:40 
GeneralRe: How to create a Module class in C# similar to VB .NET Pin
Pravin Patil, Mumbai25-Jan-11 1:52
Pravin Patil, Mumbai25-Jan-11 1:52 
GeneralRe: How to create a Module class in C# similar to VB .NET Pin
Estys25-Jan-11 2:17
Estys25-Jan-11 2:17 

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.