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

Como faz para ocultar colunas no grid grouping control e depois buscar o valor dessa coluna oculta?

Thread ID:

Created:

Updated:

Platform:

Replies:

98855 Apr 5,2011 02:29 PM UTC Apr 27,2015 12:44 PM UTC ASP.NET Web Forms (Classic) 11
loading
Tags: GridGroupingControl
Tomio
Asked On April 5, 2011 02:29 PM UTC

Hi, I'd like to hide a column in the Grouping Grid Control, but I will need the values contained in this column.
How do I hide and then fetch the value of hidden column?
Thanks


Sridhar N [Syncfusion]
Replied On April 6, 2011 06:39 AM UTC


Hi Tomio,

Thanks for using Syncfusion products.

Query #1 "Hiding and fetching data from clientside"

Your requirement to get the value of hidden column can be achieve by hiding the Column in client side using HideColumn() method and get the data from the childNodes of CurrentRow.Please refer the below code snippet.

[Javascript]

Sys.Application.add_load(Pageload);
function Pageload()
{
var gridTable = GetEGridTable($get('<%= GridGroupingControl1.ClientID %>'));
// Hiding column in client side.
gridTable.HideColumn(2);
}
function ClientChange(Odata)
{
//Fetching the hidden column value.
var company = Odata.currentRow.tableRows[0].childNodes[3].innerHTML;
alert("Hidden column value" + company);
}


For your convenience, we have created sample and the same can be downloaded from the following link.

Forum 98859 - client-46502681.zip

Query #2 "Hiding and fetching data from server side"


Your requirement to get the value of hidden column can be achieve by hiding the Column in server side using VisibleColumns.Remove method and get the data using GetValue method.Please refer the below code snippet.

[Codebehind - C#]

protected void Page_Load(object sender, EventArgs e)
{
this.GridGroupingControl1.DataSourceControlRowUpdating += new GridDataSourceControlRowUpdateEventHandler(GridGroupingControl1_DataSourceControlRowUpdating);
this.GridGroupingControl1.SelectedRecordsChanged += new Syncfusion.Grouping.SelectedRecordsChangedEventHandler(GridGroupingControl1_SelectedRecordsChanged);
//Hiding the columns in server side
this.GridGroupingControl1.TableDescriptor.VisibleColumns.Remove("Name");
}
void GridGroupingControl1_SelectedRecordsChanged(object sender, Syncfusion.Grouping.SelectedRecordsChangedEventArgs e)
{
if (e.SelectedRecord != null)
{
//Fetching the hidden column values
string name = e.SelectedRecord.Record.GetValue("Name").ToString();
Textvalue.Text = name;
}
}
For your convenience, we have created sample and the same can be downloaded from the following link.

Forum 98859 - server103088920.zip

Please let me know if you have any other questions or concerns.

Regards,
Sridhar.N






Tomio
Replied On April 6, 2011 02:33 PM UTC

Hi, but how I do it in VB.Net?


Eswari S [Syncfusion]
Replied On April 7, 2011 06:49 AM UTC

Hi Tomio,

Thanks for your interest in Syncfusion products.

We have provided response to your query in forum 98897

Could you please refer the below link for your query and follow up in the below forum.

http://www.syncfusion.com/support/forums/general/98897

Please let us know if you have any queries.

Regards,
Eswari.S



Tomio
Replied On April 13, 2011 02:49 PM UTC

Hi How do I lock the grouping by two columns, if you have a column grouped and User wants another place "to put the outar the grid removes the column that was already in the group" in gridGroupingControl in VB.NET?
Thanks



Sridhar N [Syncfusion]
Replied On April 14, 2011 06:30 AM UTC

Hi Tomio,

Thanks for the update.

We are sorry for inconvenience caused. Before we start providing the solution, Could you please give the clear description about your requirement since we are unable to understand your requirement exactly.The information provided would be of great help in providing solution.

Please let us know if any concerns.

Regards,
Sridhar N


Tomio
Replied On April 14, 2011 03:10 PM UTC

hi, it follows as Annex I want.

Tank




What I want and I do not want_bb55918f.zip

Tomio
Replied On April 14, 2011 03:13 PM UTC

hi, it follows as Annex I want.

Tank



What I want and I do not want_262c9780.zip

Tomio
Replied On April 14, 2011 05:13 PM UTC

hi, it follows as Annex I want.

Tank




What_I_want_and_I_do_not_want_fab9693e.zip

Ranjithkumar R G [Syncfusion]
Replied On April 18, 2011 05:18 PM UTC

Hi Tomio,

Thanks for using Syncfusion products.

Your requirement can be achieved by handling GroupedColumnsChanged event. Please refer to the code snippet below.

[CodeBehind-CS]



void GroupedColumns_Changed(object sender, ListPropertyChangedEventArgs e)
{
SortColumnDescriptor toRemove = new SortColumnDescriptor();
if (e.Action != ListPropertyChangedType.Remove)
{
foreach (var temp in this.ggc.TableDescriptor.GroupedColumns)
{
if (temp.Name != ((SortColumnDescriptor)e.Item).Name)
{
toRemove = temp;
}
}
this.ggc.TableDescriptor.GroupedColumns.Remove(toRemove);

}
}



Please refer to the below link to download the sample application.

sample-98855-513879950.zip

Please let me know if you have need further assistance.

Regards,
Ranjithkumar.



rajvardhanreddy
Replied On April 24, 2015 12:48 PM UTC

hi sir,
how can hide column in syncfusion grid grouping control ,after hiding i need to fetch data from that particular column. 

Abdul Matin M [Syncfusion]
Replied On April 27, 2015 12:44 PM UTC

Hi Raj,


Thanks for your interest in Syncfusion products.


We noticed that the query is same, which has been already addressed on Apr 6th, 2011 with sample and code snippet. So, please provide us with clear description about your requirement as we are unable to understand your requirement exactly. The information provided would be of great help in providing solution.


Please let us know if you need any further assistance.


Regards,

Abdul Matin M


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

;