Click to See Complete Forum and Search --> : Datagrid problem


saurabh_helloaish
February 4th, 2005, 06:13 AM
Hi

Please see the following code. looks very simple.

private: System::Void jobGrid_MouseDown(System::Object * sender, System::Windows::Forms::MouseEventArgs * e)
{
if(e->Button==MouseButtons::Left)
{
groupBox1->Focus();
}
}

GRID IS INITIALISED AS FOLLOWS

jobListTable = new DataTable("JobListTable");
DataGridColumnStyle* TextCol;
DataGridTableStyle* ts1 = new DataGridTableStyle();
ts1->MappingName = S"JobListTable" ;
ts1->RowHeadersVisible = false;
ts1->BackColor = Color::Ivory;
ts1->AlternatingBackColor = Color::Beige;
ts1->HeaderBackColor = Color::Black;
ts1->HeaderForeColor = Color::White;
// First Column - Serial Number
myDataColumn = new DataColumn();
myDataColumn->DataType = System::Type::GetType("System.String");
myDataColumn->ColumnName = "ID";
myDataColumn->ReadOnly = false;
myDataColumn->Unique = true;
myDataColumn->AutoIncrement = false;
//myDataColumn->AutoIncrement = true;
//myDataColumn->set_AutoIncrementSeed(1);
//style setup
TextCol = new DataGridTextBoxColumn();
TextCol->MappingName = S"ID";
TextCol->HeaderText = S"ID";
TextCol->Width = 25;
TextCol->Alignment = HorizontalAlignment::Center;
ts1->GridColumnStyles->Add(TextCol);
// add it
jobListTable->Columns->Add(myDataColumn);


NOW THE PROBLEM THAT I HAVE HERE IS THAT WHEN I AM RUNNING MY APPLICATION IN WINDOWS XP THEN IT IS WORKING FINE AND IF I RUN IT IN WINDOWS 2000 OR IN ANY OTHER VERSION THEN WHEN WE CLICK ON THE GRID THEN GRID ITEMS ARE CHENGED TO TEXTBOX HAVING CONTEXT MENU

undo
cut
copy.............


I want my menu to be there instead of this menu

help me please

saurabh_helloaish
February 7th, 2005, 04:32 AM
plz help me guys its very urgent

saurabh_helloaish
February 28th, 2005, 11:18 PM
I think no one in this forum is interested to solve each others problems.