PC Review


Reply
Thread Tools Rate Thread

Datagrid and TableStyle in Master Detail table

 
 
Vincenzo Quacquarelli
Guest
Posts: n/a
 
      9th Nov 2007
Hi,
I have modifiy the column style of a datagrid at desing time but at runtime
the datagrid set the standard style as Width = 50 ...
The grid is linked at two table in Master/Detail
I use Visual Studio 2005 and Vb .
--
Thanks

Vincenzo


 
Reply With Quote
 
 
 
 
Arun
Guest
Posts: n/a
 
      9th Nov 2007
Couldn't really understand your problem, can you eloborate the
problem..posibly with your code snippet?

On Nov 9, 7:33 am, "Vincenzo Quacquarelli" <en...@tiscali.it> wrote:
> Hi,
> I have modifiy the column style of a datagrid at desing time but at runtime
> the datagrid set the standard style as Width = 50 ...
> The grid is linked at two table in Master/Detail
> I use Visual Studio 2005 and Vb .
> --
> Thanks
>
> Vincenzo



 
Reply With Quote
 
Vincenzo Quacquarelli
Guest
Posts: n/a
 
      10th Nov 2007
I try to be more clear:
I have modified the width column in a datagrid, using visual studio wizard
tool.
But executing the program, no modify is applied.
This situation happens in a master/detail two table set, on the detail
table.
The environment is Windows CE 5.0
Where do I go wrong ?
Thanks
Vincenzo

"Arun" <(E-Mail Removed)> ha scritto nel messaggio
news:(E-Mail Removed)...
> Couldn't really understand your problem, can you eloborate the
> problem..posibly with your code snippet?
>
> On Nov 9, 7:33 am, "Vincenzo Quacquarelli" <en...@tiscali.it> wrote:
>> Hi,
>> I have modifiy the column style of a datagrid at desing time but at
>> runtime
>> the datagrid set the standard style as Width = 50 ...
>> The grid is linked at two table in Master/Detail
>> I use Visual Studio 2005 and Vb .
>> --
>> Thanks
>>
>> Vincenzo

>
>



 
Reply With Quote
 
Arun
Guest
Posts: n/a
 
      12th Nov 2007
On Nov 10, 1:13 am, "Vincenzo Quacquarelli" <en...@tiscali.it> wrote:
> I try to be more clear:
> I have modified the width column in a datagrid, using visual studio wizard
> tool.
> But executing the program, no modify is applied.
> This situation happens in a master/detail two table set, on the detail
> table.
> The environment is Windows CE 5.0
> Where do I go wrong ?
> Thanks
> Vincenzo
>
> "Arun" <arunkumarselva...@gmail.com> ha scritto nel messaggionews:(E-Mail Removed)...
>
>
>
> > Couldn't really understand your problem, can you eloborate the
> > problem..posibly with your code snippet?

>

http://groups.google.com/group/micro...0b18ccde7392b7

http://groups.google.com/group/micro...811b91c131ff16

http://groups.google.com/group/micro...GridTableStyle

Better use word "DataGridTableStyle" and do a google compact framework
group search
http://groups.google.com/advanced_group_search
you will get lots of threads discussed the same topic and few will
really help you to start with.


Hope this helps,
Cheers,
Arun.



> > On Nov 9, 7:33 am, "Vincenzo Quacquarelli" <en...@tiscali.it> wrote:
> >> Hi,
> >> I have modifiy the column style of a datagrid at desing time but at
> >> runtime
> >> the datagrid set the standard style as Width = 50 ...
> >> The grid is linked at two table in Master/Detail
> >> I use Visual Studio 2005 and Vb .
> >> --
> >> Thanks

>
> >> Vincenzo- Hide quoted text -

>
> - Show quoted text -



 
Reply With Quote
 
Vincenzo Quacquarelli
Guest
Posts: n/a
 
      28th Nov 2007
Hi Arun,
please see this example
http://msdn2.microsoft.com/it-it/library/7bx62e55(VS.80).aspx

it contain a detailed procedure to create two datagrid in relation
(master-detail)

I have modified the width column in OrdersDatagrid
But executing the program, no modify is applied



"Arun" <(E-Mail Removed)> ha scritto nel messaggio
news:(E-Mail Removed)...
> On Nov 10, 1:13 am, "Vincenzo Quacquarelli" <en...@tiscali.it> wrote:
>> I try to be more clear:
>> I have modified the width column in a datagrid, using visual studio
>> wizard
>> tool.
>> But executing the program, no modify is applied.
>> This situation happens in a master/detail two table set, on the detail
>> table.
>> The environment is Windows CE 5.0
>> Where do I go wrong ?
>> Thanks
>> Vincenzo
>>
>> "Arun" <arunkumarselva...@gmail.com> ha scritto nel
>> messaggionews:(E-Mail Removed)...
>>
>>
>>
>> > Couldn't really understand your problem, can you eloborate the
>> > problem..posibly with your code snippet?

>>

> http://groups.google.com/group/micro...0b18ccde7392b7
>
> http://groups.google.com/group/micro...811b91c131ff16
>
> http://groups.google.com/group/micro...GridTableStyle
>
> Better use word "DataGridTableStyle" and do a google compact framework
> group search
> http://groups.google.com/advanced_group_search
> you will get lots of threads discussed the same topic and few will
> really help you to start with.
>
>
> Hope this helps,
> Cheers,
> Arun.
>
>
>
>> > On Nov 9, 7:33 am, "Vincenzo Quacquarelli" <en...@tiscali.it> wrote:
>> >> Hi,
>> >> I have modifiy the column style of a datagrid at desing time but at
>> >> runtime
>> >> the datagrid set the standard style as Width = 50 ...
>> >> The grid is linked at two table in Master/Detail
>> >> I use Visual Studio 2005 and Vb .
>> >> --
>> >> Thanks

>>
>> >> Vincenzo- Hide quoted text -

>>
>> - Show quoted text -

>
>



 
Reply With Quote
 
Arun
Guest
Posts: n/a
 
      29th Nov 2007
I followed the steps to recreate your problem, I could find a work
around.
Add a ListChanged event for the detail grid binding source
(orders_FK00BindingSource) and add the code to modify the TableStyle,
I have added the example below.

You need to add the other columns with the width of your choice and
remove the replicated code from the InitializeComponent()
If you run the code you will only see 3 columns and the width of
OrderID column is 10.

Hope this helps,
Cheers,
Arun

------------------------------------------------------------------------------------------------------------------------------------------------------------------------
private void orders_FK00BindingSource_ListChanged(object sender,
ListChangedEventArgs e)
{
System.Windows.Forms.DataGridTextBoxColumn
order_IDDataGridColumnStyleDataGridTextBoxColumn;
System.Windows.Forms.DataGridTextBoxColumn
customer_IDDataGridColumnStyleDataGridTextBoxColumn1;
System.Windows.Forms.DataGridTextBoxColumn
employee_IDDataGridColumnStyleDataGridTextBoxColumn;
order_IDDataGridColumnStyleDataGridTextBoxColumn = new
System.Windows.Forms.DataGridTextBoxColumn();
customer_IDDataGridColumnStyleDataGridTextBoxColumn1 = new
System.Windows.Forms.DataGridTextBoxColumn();
employee_IDDataGridColumnStyleDataGridTextBoxColumn = new
System.Windows.Forms.DataGridTextBoxColumn();
//
// order_IDDataGridColumnStyleDataGridTextBoxColumn
//
order_IDDataGridColumnStyleDataGridTextBoxColumn.Format =
"";

order_IDDataGridColumnStyleDataGridTextBoxColumn.FormatInfo = null;

order_IDDataGridColumnStyleDataGridTextBoxColumn.HeaderText = "Order
ID";

order_IDDataGridColumnStyleDataGridTextBoxColumn.MappingName = "Order
ID";

order_IDDataGridColumnStyleDataGridTextBoxColumn.PropertyDescriptor =
null;
order_IDDataGridColumnStyleDataGridTextBoxColumn.Width =
10;
//
// customer_IDDataGridColumnStyleDataGridTextBoxColumn1
//

customer_IDDataGridColumnStyleDataGridTextBoxColumn1.Format = "";

customer_IDDataGridColumnStyleDataGridTextBoxColumn1.FormatInfo =
null;

customer_IDDataGridColumnStyleDataGridTextBoxColumn1.HeaderText =
"Customer ID";

customer_IDDataGridColumnStyleDataGridTextBoxColumn1.MappingName =
"Customer ID";

customer_IDDataGridColumnStyleDataGridTextBoxColumn1.PropertyDescriptor
= null;
//
// employee_IDDataGridColumnStyleDataGridTextBoxColumn
//
employee_IDDataGridColumnStyleDataGridTextBoxColumn.Format
= "";

employee_IDDataGridColumnStyleDataGridTextBoxColumn.FormatInfo = null;

employee_IDDataGridColumnStyleDataGridTextBoxColumn.HeaderText =
"Employee ID";

employee_IDDataGridColumnStyleDataGridTextBoxColumn.MappingName =
"Employee ID";

employee_IDDataGridColumnStyleDataGridTextBoxColumn.PropertyDescriptor
= null;
//
// ordersTableStyleDataGridTableStyle
//
this.ordersTableStyleDataGridTableStyle = new
System.Windows.Forms.DataGridTableStyle();

this.ordersTableStyleDataGridTableStyle.GridColumnStyles.Add(order_IDDataGridColumnStyleDataGridTextBoxColumn);

this.ordersTableStyleDataGridTableStyle.GridColumnStyles.Add(customer_IDDataGridColumnStyleDataGridTextBoxColumn1);

this.ordersTableStyleDataGridTableStyle.GridColumnStyles.Add(employee_IDDataGridColumnStyleDataGridTextBoxColumn);
this.ordersTableStyleDataGridTableStyle.MappingName =
"Orders";
//
// ordersDataGrid
//
this.ordersDataGrid.DataSource =
this.orders_FK00BindingSource;
this.ordersDataGrid.TableStyles.Clear();

this.ordersDataGrid.TableStyles.Add(this.ordersTableStyleDataGridTableStyle);
}



On Nov 28, 3:52 am, "Vincenzo Quacquarelli" <en...@tiscali.it> wrote:
> Hi Arun,
> please see this examplehttp://msdn2.microsoft.com/it-it/library/7bx62e55(VS.80).aspx
>
> it contain a detailed procedure to create two datagrid in relation
> (master-detail)
>
> I have modified the width column in OrdersDatagrid
> But executing the program, no modify is applied
>
> "Arun" <arunkumarselva...@gmail.com> ha scritto nel messaggionews:(E-Mail Removed)...
>
>
>
> > On Nov 10, 1:13 am, "Vincenzo Quacquarelli" <en...@tiscali.it> wrote:
> >> I try to be more clear:
> >> I have modified the width column in a datagrid, using visual studio
> >> wizard
> >> tool.
> >> But executing the program, no modify is applied.
> >> This situation happens in a master/detail two table set, on the detail
> >> table.
> >> The environment is Windows CE 5.0
> >> Where do I go wrong ?
> >> Thanks
> >> Vincenzo

>
> >> "Arun" <arunkumarselva...@gmail.com> ha scritto nel
> >> messaggionews:(E-Mail Removed)...

>
> >> > Couldn't really understand your problem, can you eloborate the
> >> > problem..posibly with your code snippet?

>
> >http://groups.google.com/group/micro...framework.comp...

>
> >http://groups.google.com/group/micro...framework.comp...

>
> >http://groups.google.com/group/micro...framework.comp...

>
> > Better use word "DataGridTableStyle" and do a google compact framework
> > group search
> >http://groups.google.com/advanced_group_search
> > you will get lots of threads discussed the same topic and few will
> > really help you to start with.

>
> > Hope this helps,
> > Cheers,
> > Arun.

>
> >> > On Nov 9, 7:33 am, "Vincenzo Quacquarelli" <en...@tiscali.it> wrote:
> >> >> Hi,
> >> >> I have modifiy the column style of a datagrid at desing time but at
> >> >> runtime
> >> >> the datagrid set the standard style as Width = 50 ...
> >> >> The grid is linked at two table in Master/Detail
> >> >> I use Visual Studio 2005 and Vb .
> >> >> --
> >> >> Thanks

>
> >> >> Vincenzo- Hide quoted text -

>
> >> - Show quoted text -- Hide quoted text -

>
> - Show quoted text -


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Master-Detail DataGrid with conditional (detail) formatting John Sitka Microsoft Dot NET Framework Forms 0 4th Nov 2005 09:50 PM
Reproducible bug in Master-Detail DataGrid when RowFilter applied to Master jgbailey@gmail.com Microsoft Dot NET Framework Forms 0 21st Oct 2005 09:19 PM
Filtering the Detail Datagrid in a Master Detail Relationship =?Utf-8?B?Qm9i?= Microsoft ADO .NET 1 19th Dec 2004 09:00 PM
datagrid master-detail bug? =?Utf-8?B?QnJhZA==?= Microsoft Dot NET Framework Forms 1 27th May 2004 09:11 AM
DataGrid: Master-Detail LrKr Microsoft Dot NET Framework Forms 1 28th Sep 2003 05:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:36 PM.