salaikumar
December 1st, 2005, 08:38 AM
Hello i am using datagrid control in Vc++.net.
when i set a float value to a cell, it returns the fol error.
my code is
***********
Datagrid->set_Item(1,1,System::Convert::ToSingle(textBox1->Text) );
Error
********
error C2664: 'void System::Windows::Forms::DataGrid::set_Item(int,int,System::Object __gc *)' : cannot convert parameter 3 from 'float' to 'System::Object __gc *'
The datagrid columns are of float type.
otherwise if i use toString function,
Datagrid->set_Item(1,1,System::Convert::ToSingle(textBox1->Text) );
it compiles well but, returns runtime error, cannot convert from target type to primitive type..
Pls help me
when i set a float value to a cell, it returns the fol error.
my code is
***********
Datagrid->set_Item(1,1,System::Convert::ToSingle(textBox1->Text) );
Error
********
error C2664: 'void System::Windows::Forms::DataGrid::set_Item(int,int,System::Object __gc *)' : cannot convert parameter 3 from 'float' to 'System::Object __gc *'
The datagrid columns are of float type.
otherwise if i use toString function,
Datagrid->set_Item(1,1,System::Convert::ToSingle(textBox1->Text) );
it compiles well but, returns runtime error, cannot convert from target type to primitive type..
Pls help me