- Home
- Forum
- ASP.NET Web Forms (Classic)
- Como faz para ocultar colunas no grid grouping control e depois buscar o valor dessa coluna oculta?
Como faz para ocultar colunas no grid grouping control e depois buscar o valor dessa coluna oculta?
- Apr 5, 2011 02:29 PM UTC
- Apr 27, 2015 12:44 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
How do I hide and then fetch the value of hidden column?
Thanks
SIGN IN To post a reply.
11 Replies
SN
Sridhar N
Syncfusion Team
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
TO
Tomio
April 6, 2011 02:33 PM UTC
Hi, but how I do it in VB.Net?
ES
Eswari S
Syncfusion Team
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
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
TO
Tomio
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
Thanks
SN
Sridhar N
Syncfusion Team
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
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
TO
Tomio
April 14, 2011 03:10 PM UTC
TO
Tomio
April 14, 2011 03:13 PM UTC
TO
Tomio
April 14, 2011 05:13 PM UTC
RR
Ranjithkumar R G
Syncfusion Team
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]
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.
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.
RA
rajvardhanreddy
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.
AM
Abdul Matin M
Syncfusion Team
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
SIGN IN To post a reply.
- 11 Replies
- 6 Participants
-
TO Tomio
- Apr 5, 2011 02:29 PM UTC
- Apr 27, 2015 12:44 PM UTC