问题描述
我有一个包含选项集的下拉列表。如果用户选择一个选项,则网格视图将根据该选项显示数据。如果用户选择另一个选项,那么我想在不替换旧数据的情况下将该数据显示在同一网格视图中。
下拉列表事件代码
protected void ddlOptions_SelectedIndexChanged(object sender,EventArgs e)
{
List< OptionsObj> oOptionDetailsList = OptionsDataManager.GetOptionWiseOperationDtls(int.Parse(ddlOptions.SelectedValue.ToString()));
OptionDetailsList = oOptionDetailsList;
dgvOptions。 DataSource = OptionDetailsList;
dgvOptions.DataBind();
}
请帮我这样做。
I have a Drop Down list with collection of options. If user select one option,then grid view show data according to that option. If user select another option then i want to show that data into the same grid view without replacing old data.
Drop down list Event code
protected void ddlOptions_SelectedIndexChanged(object sender, EventArgs e)
{
List<OptionsObj> oOptionDetailsList = OptionsDataManager.GetOptionWiseOperationDtls(int.Parse(ddlOptions.SelectedValue.ToString()));
OptionDetailsList = oOptionDetailsList;
dgvOptions.DataSource = OptionDetailsList;
dgvOptions.DataBind();
}
please help me to do this.
推荐答案
这篇关于GridView有多个DataSources?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!