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. Image for the cookie policy date

How to search a value in a hidden column gridgroupcontrol?

Hi, I have a gridgroupingcontrol with four columns: "User," "plan," "Code", "PID".

Only the columns "Code", "PID" I do not want to show the User,
so I removed these two fields on the property VisibleColumns gridgroupincontrol.

Just what I need to get the cell value that is in the column "Code",
starting at a selection of any line.

How do I get this value in VB?

Thank


5 Replies

ES Eswari S Syncfusion Team April 7, 2011 06:48 AM UTC

Hi Tomio,

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:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
AddHandler GridGroupingControl1.DataSourceControlRowUpdating, AddressOf GridGroupingControl1_DataSourceControlRowUpdating
AddHandler GridGroupingControl1.DataSourceControlRowUpdating, AddressOf GridGroupingControl1_DataSourceControlRowUpdating
'Hiding the columns in server side
Me.GridGroupingControl1.TableDescriptor.VisibleColumns.Remove("Code")
Me.GridGroupingControl1.TableDescriptor.VisibleColumns.Remove("PID")
End Sub

Private Sub GridGroupingControl1_SelectedRecordsChanged(ByVal sender As Object, ByVal e As Syncfusion.Grouping.SelectedRecordsChangedEventArgs) Handles GridGroupingControl1.SelectedRecordsChanged
If e.SelectedRecord IsNot Nothing Then

'Fetching the hidden column values
Dim code As Integer = e.SelectedRecord.Record.GetValue("Code").ToString()
Textvalue.Text = code
End If
End Sub

We have prepared the VB sample for your reference. Please find the sample form the following link.

Froum 98897 Grid-481470572.zip

Please let us know if you need further assistance.

Regards,
Eswari.S




TO Tomio April 13, 2011 02:03 PM UTC

Hi, how do I change the phrase: "Drag a column header here to group by That column," in gridGroupingControl in VB.NET?

Below is the image I want change.

thanks




das_2059dbd9.zip


SN Sridhar N Syncfusion Team April 14, 2011 06:09 AM UTC

Hi Tomio,

Thanks for the update.

Your requirement to change the GropDropAreaText can be achieved by setting the text for the property GroupDropAreaText. Please refer the below code snippet.

[ASPX]

runat="server" DataSourceCachingMode="ViewState" ShowIndicator="False"
EnableCallbacks="False" DataMember="DefaultView" GroupDropAreaText="Drag a column header here to group by that column" BorderCollapse="Separate" DragSelectionBackColor="Yellow" GroupDropAreaCssClass="GridOffice2003OliveGroupDropArea" PostBackOnFocusedChanged="true" >





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

Sample 98897937526409.zip

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

Regards,
Sridhar.N




TO Tomio April 14, 2011 02:26 PM UTC

Hi, thanks for the help, just not able to model.

But I kept trying and managed to change this:

Me.gridGrouping.TableControl.GroupingControl.GridGroupDropArea.DragColumnHeaderText = "The text that I want."

Thanks




RR Ranjithkumar R G Syncfusion Team April 15, 2011 10:47 AM UTC

Hi Tomio,

Thanks for your update.

We are glad to know that your issue has been resolved. Please let us know if you have any other concerns so that we will be happy to help you out.

Regards,
Ranjithkumar.



Loader.
Live Chat Icon For mobile
Up arrow icon