grid not expanding with Expand(-1)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 3 datasets I rotate to my datagrid
I apply a style to each like this and cause the grid ( gridTX ) to expand..

When I look in the debug window at the datasouce attached to the grid, those that work have a tables collection andI can see the List. In the one that is not autoexpanding correctly I can see the table name but no Tables and List. I dont know why that would appear different and if is related .. ideas ( instead I see the tablename hyperlinked & must click on it ). The table in question is a simple 2 column table and is not heiracheal. Is there a property I must address ? I load the data myself to this data set & table. Once clicked on everthing is OK. Thanks Andre

private void AttachXMLdrivenStyle(string mappTableName

string fiPath=Application.StartupPath + @"\tablestyle.xml"
AWUtilityWinForm myStyleBuilder = new AWUtilityWinForm( fiPath)
myStyleBuilder.addXMLDriveTableStyle(gridTX,mappTableName)
gridTX.Expand(-1)
}
 
Hi Andrew,

I'm not quite sure about your question. Do you want the datagrid to expand
automatically or some rows cannot be expand? If so, please try to check if
you have set the DataRelation correctly in DataSet objects. Could you
please show us your DataSet structure here? Thanks!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
It seems that the problem was caused by not specifying the table when I bound the grid

gridTX.DataSource=ds; // did not wor

BUT this works
gridTX.DataSource=ds.Tables[mappTableName]

Thanks ! Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top