You need to sign in to do that
Don't have an account?
Hari nadh babu Eluru 7
starts with s in visual force
In search box if user enter a letter 's' then bring students name starts with s. In visualforce
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Here is the code:
Please try:
Vf Page:
<apex:page controller="Searchstudent">
<apex:form >
<apex:pageblock title="Search student Details Here">
<apex:inputText value="{!key}"/>
<apex:commandButton value="Search" action="{!search_now}"/>
<apex:pageBlockTable value="{!stu}" var="c">
<apex:column value="{!c.Name}"/>
</apex:pageBlockTable>
</apex:pageblock>
</apex:form>
</apex:page>
Apex class:
public class Searchstudent{
public List<Student> stu{get;set;}
public String key {get;set;}
public PageReference search_now(){
stu= [SELECT Id,Name FROM StudentWHERE Name like :(key+'%')];
return null;
}
}
Thanks.
All Answers
Do the user need to onclick search button in this scenerio?
Thanks,
Here is the code:
Please try:
Vf Page:
<apex:page controller="Searchstudent">
<apex:form >
<apex:pageblock title="Search student Details Here">
<apex:inputText value="{!key}"/>
<apex:commandButton value="Search" action="{!search_now}"/>
<apex:pageBlockTable value="{!stu}" var="c">
<apex:column value="{!c.Name}"/>
</apex:pageBlockTable>
</apex:pageblock>
</apex:form>
</apex:page>
Apex class:
public class Searchstudent{
public List<Student> stu{get;set;}
public String key {get;set;}
public PageReference search_now(){
stu= [SELECT Id,Name FROM StudentWHERE Name like :(key+'%')];
return null;
}
}
Thanks.