function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PallavPallav 

Is there any concept of grid in Visualforce?

I want to show the data that is being the result of query in to salesforce, in a grid and there has to be a check box along with each record displyed. I any one has any knowledge or have worked on this before, please share their knowledge.

Thanks in anticipation of your valuable response.
thedgethedge
There's no grid in VF.  However, you can achieve the behavior you described by utilizing the dataTable (see pg. 94 of the guide at the link below) and the inputCheckbox components (pg. 105).  Also, you will want to review the section "Using Iteration with Component ID's" (pg. 66).
 
The controller that you will want to create to iterate over the list to find which records have been selected would vary greatly depending on how you implement the user interface.  For instance, are you looking to simply set a flag for each record and persist this value to the underlying record or are you looking to present the user with a list of records, have them select from the list and then upon a click of a button perform some function only on the records selected by the user?
 
 
Hope that helps.
 
 
PallavPallav
Greetings!

Thanks a lot for your response it helped me out with most of my issue... I also want to ask you two more questions:-

1. Is there any way in VF, where we can select a value from a "Selectlist" and upon selection of the that value the page will refresh and associated fields, or you can say details will be displayed.

2. with your help i have made the check box to appear inside the datalist but the header thing is not comming over there, how can I do that.

Thanks in anticipatino of your kind resolution to my issue.

regards
Pallav

thedgethedge
Page 25 of the VF Dev guide has a good example which is close to what you are trying to accomplish.