<asp:DropDownList ID="ddlGroupSearch" CssClass="cssTextbox" runat="server">
<asp:ListItem Value="1" Text="Referring Physician Wise"></asp:ListItem>
<asp:ListItem Value="2" Text="Specialty Wise"></asp:ListItem>
</asp:DropDownList>
<asp:Repeater runat="server" ID="repeaterParent" OnItemDataBound="repeaterParent_ItemDataBound">
<ItemTemplate>
<tr>
<td>
<asp:Label ID="lblREF_PHY_ID" runat="server" Text='<%# this.RenderGroup(Eval("REF_PHY_ID") as string)%>'></asp:Label>
</td>
</tr>
<tr>
<td class="cssTableListTd">
<asp:Label ID="lblPatNameListData" runat="server" Text='<%#Eval("Patient_Name")%>'></asp:Label>
</td>
<td class="cssTableListTd">
<asp:Label ID="lblPatIDListData" runat="server" Text='<%#Eval("Patient_ID")%>'></asp:Label>
</td>
<td class="cssTableListTd">
<asp:Label ID="lblPatSexListData" runat="server" Text='<%#Eval("Sex")%>'></asp:Label>
</td>
<td class="cssTableListTd">
<asp:Label ID="lblPatBirthDateListData" runat="server" Text='<%#Eval("Patients_Birth_Date")%>'></asp:Label>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
c#中
protected void Page_Load(object sender, EventArgs e)
{
//get data bind to repeater
repeaterParent.DataSource = DataTable;
repeaterParent.DataBind();.
}
string lastValue = "";
protected string RenderGroup(string currentValue)
{
if(currentValue == this.lastValue)
return "";//Group has changed
this.lastValue = currentValue;
return currentValue;
}
我必须明智地向报告小组展示。我的页面中有DropDownList
。现在根据DropDownList
值,我必须调用RenderGroup
函数。我该怎么打电话给中继器?
我已经参考了这个链接 ref link