Hello,
Are you passing the variable that has the correct data type ('MSDataGridLibType_DataSource) as the third argument of MSDataGridLib_IDataGridSetByRefDataSource function? This is an ActiveX control from Microsoft. Please refer to MSDN for more information for this control.
Mika Fukuchi
Application Engineer
National Instruments