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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change text in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

15105 Jun 11,2004 03:10 AM UTC Nov 13,2008 03:27 AM UTC Windows Forms 6
loading
Tags: Grouping
Jonas
Asked On June 11, 2004 03:10 AM UTC

I am using the GridGroupingControl to display readonly data and have a couple of question that I can not find the answer for in the documentation. Is it possible to change the text "Drag a column header here to group by that column" and maybe also to hide the text containing the name of the dataset visible in the drop area? Is it possible to print the content of a grid in the way the user has arranged it? How should I do to remove/hide the insert row?

Administrator [Syncfusion]
Replied On June 11, 2004 02:37 PM UTC

Hi Jonas, the text "Drag a column header here to group by that column" is hard-coded but there is a little trick to change it: Try handling groupingControl.GridGroupDropArea.PrepareViewStyleInfo. Check for e.Style.Text to replace the old text with new text when the text is "Drag ..." We will provide a property for that in future so that you can more easily replace that text. Printing could be done using GridPrintDocument, for example: GridControlBase grid = groupingGrid.TableControl; if (grid != null) { try { GridPrintDocument pd = new GridPrintDocument(grid); //Assumes the default printer if (PrinterSettings.storedPageSettings != null) { pd.DefaultPageSettings = PrinterSettings.storedPageSettings ; } PrintDialog dlg = new PrintDialog() ; dlg.Document = pd; dlg.AllowSelection = true; dlg.AllowSomePages = true; DialogResult result = dlg.ShowDialog(); if (result == DialogResult.OK) { pd.Print(); } } catch(Exception ex) { MessageBox.Show("An error occurred attempting to preview the file to print - " + ex.Message); } } To hide the insert row, you can groupingGrid.TableDescriptor.AllowNew = false; Thanks for your interest. Stefan

Jonas
Replied On June 14, 2004 08:10 AM UTC

Thanks a lot! All of the three suggested solutions worked well and solved my issues.

Grace Chao
Replied On December 28, 2007 12:01 AM UTC

My co-worker has an alternative solution for question 1: grid.TableDescriptor.Name = string.Empty; instead of handling event.


Jisha Joy [Syncfusion]
Replied On December 31, 2007 05:10 AM UTC

Hi Grace,

Thank you for your suggestion.

Regards,
Jisha


Karsten Brocksieper
Replied On July 3, 2008 09:43 AM UTC

Hello,

in this thread Stefan has told about a property to change the text "Drag a column..."


We will provide a property for that in future so that you can more easily replace that text.


I would like to ask if this is implemented in the meantime.

Regards,
Karsten




Administrator [Syncfusion]
Replied On November 13, 2008 03:27 AM UTC



>I am using the GridGroupingControl to display readonly data and have a couple of question that I can not find the answer for in the documentation.
>
>Is it possible to change the text "Drag a column header here to group by that column" and maybe also to hide the text containing the name of the dataset visible in the drop area?
>
>Is it possible to print the content of a grid in the way the user has arranged it?
>
>How should I do to remove/hide the insert row?


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

;