TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
john kanyora
NA
242
46.1k
data not loading on pageload with postback
Nov 9 2017 3:44 AM
am having a problem .data is not loading once the page loads..i have to choose an item on the dropdown list for it to load.i need it to load even before i choose any item on the drop down list..
this is my code behind.
protected void ddlPeriodStamp_SelectedIndexChanged(object sender, System.EventArgs e)
{
string selectedGroup = string.Empty;
DropDownList ddlItemGroup = (DropDownList)sender;
if (ddlItemGroup.SelectedValue != null)
TreatmentGroup = ddlItemGroup.SelectedValue;
ApplyGridFilter(ddlItemGroup.SelectedValue);
}
protected void ApplyGridFilter(string TreatmentGroup)
{
string selectedGroup = string.Empty;
DBDataSource1.State.BusinessObject.DataPump.FormFilters.Clear();
DBDataSource1.State.BusinessObject.DataPump.FormFilters.Add("TreatmentGroup", TreatmentGroup);
DBDataSource1.State.BusinessObject.Fill(null);
MedicalSchemeDetailGrid.DataBind();
}
protected void Page_LoadComplete(object sender, System.EventArgs e)
{
if (!this.IsPostBack)
ApplyGridFilter(string.Empty);
}
Reply
Answers (
7
)
Tablelayout panel control
Building a Customer Relationship Management application