We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Grouping Control ColumnHeaders

Thread ID:

Created:

Updated:

Platform:

Replies:

90688 Oct 13,2009 01:47 PM UTC Oct 19,2009 07:19 AM UTC WinForms 4
loading
Tags: GridControl
reda
Asked On October 13, 2009 01:47 PM UTC

hi
i use Grid Grouping Control Relations to show invoice head and invoice details no problim to show them but but here in egypt we use arabic appliction interfaces so i want to change ColumnHeaders .text for Parents and change ColumnHeaders .text for Child

and my conect code:

===========================

Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source =" & Application.StartupPath & "\databind.mdb")

Dim cmd As New OleDbCommand()

Dim da As New OleDbDataAdapter()

Dim ds As New DataSet()


con.Open()


With cmd

.Connection = con

.CommandType = CommandType.TableDirect

.CommandText = "select * from Categories"

End With


da.SelectCommand = cmd

da.Fill(ds, "Categories")

GridGroupingControl1.DataSource = ds.Tables(0)
==================================================






how can i do that by code
change ColumnHeaders .text for Parents and change ColumnHeaders .text for Child



reda
Replied On October 13, 2009 07:41 PM UTC

any reply

Jisha Joy [Syncfusion]
Replied On October 14, 2009 11:12 AM UTC

Hi,

You could use the HeaderText property to achieve the desired behavior. See the code:

//Parent table
this.gridGroupingControl1.TableDescriptor.Columns["oldname"].HeaderText = "NewName";
//For the child table
this.gridGroupingControl1.GetTableDescriptor("ChildTableName").Columns["oldname"].HeaderText = "NewName";


Please let me know if this helps.

Regards,
Jisha

reda
Replied On October 17, 2009 11:38 AM UTC

thank u it works to change the caption of ColumnHeaders
------------------------------------------

but when i use filter to look for a record give me error

================================================
thats my code
==============

Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source =" & Application.StartupPath & "\databind.mdb")

Dim cmd As New OleDbCommand()

Dim da As New OleDbDataAdapter()

Dim ds As New DataSet()

Dim dt As DataTable

con.Open()


With cmd

.Connection = con

.CommandType = CommandType.TableDirect

.CommandText = "select * from Categories where(Categories.CategoryID=" & textbox1.text & ")"

End With


da.SelectCommand = cmd

da.Fill(ds, "Categories")


cmd.CommandText = "select * from Products"

da.SelectCommand = cmd

da.Fill(ds, "Products")


'cmd.CommandText = "Inventory Transactions"

'da.SelectCommand = cmd

'da.Fill(ds, "Inventory Transactions")


ds.Relations.Add("Root", ds.Tables("Categories").Columns("CategoryID"), ds.Tables("Products").Columns("CategoryID"))


'ds.Relations.Add("Secondary", ds.Tables("Products").Columns("ProductID"), ds.Tables("Inventory Transactions").Columns("TransactionID"))


gridGroupingControl1.DataSource = ds.Tables(0)


also i use the same code to farpoint spread to show grouing and word will
pl tell how to correct that code to work with gcc i want to filter the records by textbox


Jisha Joy [Syncfusion]
Replied On October 19, 2009 07:19 AM UTC

Hi Reda,

Please refer the following forum that describes textbox filtering using RecordFilters of GridGroupingControl.

http://www.syncfusion.com/support/forums/grid-windows/73569

Please let me know if you have any questions.

Regards,
Jisha

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;