Prev: Hang in GPSCloseDevice, CloseHandle, or EventModify
Next: WebRequest.ReadWriteTimeout and CF 3.5
From: drozd on 30 Oct 2008 10:15 Glad I could help you :) I've had real problem with finding the correct mapping name myself. At one point I just started browsing through the properties using the debugger to see what table style is used if it doesn't use the one I specify and found m_tabstyActive with (fortunately) filled mappingName. I don't think you really need access to this property during runtime - just use your own table style. On the other hand, being able to access the active table style would make it a bit easier to modify the grid appearance - it wouldn't be necessary to create a new table style just for the sake of a single table. Regards, Michal On Oct 29, 10:58 am, "Kev Westwood" <kev...(a)davrich.co.uk> wrote: > Thanks Michal > > The value of the property m_tabstyActive was "MyObject". I was sure i'd > already tried this as a tablestyle mapping name but i tried it again and it > worked! > > How did you know about this property? if its there why isnt it public? i > suppose there are other hidden properties that are not exposed. How can you > findout what they are, use reflection maybe? > > Regards > Kevin > > "drozd" <drozdow...(a)gmail.com> wrote in message > > news:1bff83cb-3c11-4b59-8248-28174a815a40(a)v53g2000hsa.googlegroups.com... > On Oct 27, 4:48 pm, "Kev Westwood" <kev...(a)davrich.co.uk> wrote: > > > > > Hi Michal > > > I have tried that but to no avail. > > > I have a variable called MyList which is the datasource of the grid and is > > declared like this : > > > Dim MyList as New List(of MyObject) > > > I have also tried this variable name as the mapping. > > > If i do a GetType on MyList it returns "List`1". I have also tried this as > > the mapping name. > > > I have also tried using a bindingsource and have same problem if i use the > > name or type of the binding source > > > So heres the list of mapping names i have tried so far: > > > MyObject > > MyObject[] > > MyList > > List`1 > > Bindingsource > > MyBindingSource > > > Any other ideas? Are tablestyles the only way to make a column invisible > > in > > a datagrid in the compact framework? > > > Thanks > > Kevin > > > "drozd" <drozdow...(a)gmail.com> wrote in message > > >news:2e50031b-dbdd-4f35-bb19-0ad03762aeae(a)75g2000hso.googlegroups.com... > > On Oct 24, 12:44 pm, "Kev Westwood" <kev...(a)davrich.co.uk> wrote: > > > > Hi > > > > I'm using VS 2005 with CF2. > > > > The datasource of my datagrid is a List(of MyObject). All the properties > > > of > > > MyObject are visible as columns in the grid but i do not want all them > > > to > > > be > > > visisble so I want to create a table style to do this. However, what > > > should > > > I use for the MappingName of the table style? > > > > Thanks > > > Kevin > > > Try MyObject. > > > Kind regards, > > Micha³ > > Hi Kevin > > What you can try is debugging the bit after you assign the DataSource > property of the grid - check the dataGrid.m_tabstyActive field in the > Quick Watch window and look at the MappingName property. If the > correct name doesn't match the name you specify, a new table style is > created with the correct name and is accessible via m_tabstyActive > field. > > That's how I found out the name to use in when I had a similar > problem. > > Hope that helps, > Michal
|
Pages: 1 Prev: Hang in GPSCloseDevice, CloseHandle, or EventModify Next: WebRequest.ReadWriteTimeout and CF 3.5 |