You need to sign in to do that
Don't have an account?
Aurora Ganguly 10
vf page queries
Hi , I have created a vf page , am sharing the preview of my page . I want to reduce the width between all the fields so that many more fields can be added .how to reduce the space between two fields .To make it come close .
please advice on the same .
please advice on the same .
<apex:page Controller="AddmultipleAccountsController"> <apex:form > <apex:pageBlock > <apex:pageBlockTable value="{!listAccount}" var="acc"> <apex:column headerValue="Account Name"> <apex:inputField value="{!acc.Name}"/> </apex:column> <apex:column headerValue="Account Number"> <apex:inputField value="{!acc.AccountNumber}"/> </apex:column> <apex:column headerValue="Account Type"> <apex:inputField value="{!acc.Type}"/> </apex:column> <apex:column headerValue="Industry"> <apex:inputField value="{!acc.Industry}"/> </apex:column> </apex:pageBlockTable> <apex:pageBlockButtons > <apex:commandButton value="Add Accounts Row" action="{!addAccount}"/> <apex:commandButton value="Save Accounts" action="{!saveAccount}"/> </apex:pageBlockButtons> </apex:pageBlock> </apex:form> </apex:page>
Hi,
Please add style="width: 20%;" in your PageBlockTable like:
Hope it will help you.
If it helps you mark as a best.
Regards,
Suraj
All Answers
Try to add new column in a table. PageBlockTable will automatically adjust them within a same row.
Thanks,
Aman
Hi,
Please add style="width: 20%;" in your PageBlockTable like:
Hope it will help you.
If it helps you mark as a best.
Regards,
Suraj
Thanks alot ! Its solved .
Let me tell one issue . am not aware whether how its possible or not .
Can we reduce the size of text field .I mean Account name , Account number field. those. since i have taken as input field but unable to reduce the size.
Hope u got my point
please suggest once more .
Regards,
Aurora
On the above same topic ,
I have a vf page . There I have multiple consecutive input text fields . I have add button . on click of add button a set of fields come in the next row . Can u suggest if i want to give cancel button so that once i click on that the set of new row will dissapear . . i need to write a method but what should be there in the method am not getting . so that it will be deleted.
plz suggest .
Regards
Aurora
Hi Aurora,
For adding new row you need to write wrapper class then you can achive that.
Thanks