DataGridView in Managed c++
-
hi friends, i want to use datagridview in c++, i am using data binding. i add object list to binding and use this binding as data source to gridview. then i set the the dataPropertyName as the member of the object. my problem is i am not able to view my data in the grid. at runtime i want to add objects to the binding so that they can be viewed in the grid. my code is as below //bs is the binding object for(int j = 0; j< CustInfo.oCust->Customer->Count;j++) bs->Add(gcnew CustomerDetails(custobject)); CustGridView->DataSource = bs; DataGridViewColumn^ column1 = gcnew DataGridViewTextBoxColumn(); column1->DataPropertyName = "m_strName"; // member of CustomerDetails column1->Name = "Name"; column1->Width = 227; CustGridView->Columns->Add(column1); DataGridViewColumn^ column2 = gcnew DataGridViewTextBoxColumn(); column2->DataPropertyName = "m_strStreet"; //// member of CustomerDetails column2->Name = "Street"; column2->Width = 120; CustGridView->Columns->Add(column2); can any one help thanks in anticipation Regds Samir