|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 08/04/2009 at 06:53AM PDT, ID: 24624655 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: |
<cc1:Accordion ID="Accordion1" runat="server"
DataSourceID="SqlDataSource1"
onitemdatabound="Accordion1_ItemDataBound" >
<HeaderTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Eval("parent_name") %>' CommandName="pc" CommandArgument='<%# Eval("pid") %>'></asp:LinkButton>
</HeaderTemplate>
<ContentTemplate>
<asp:DataList ID="DataList1" runat="server" OnItemCommand="c_click">
<ItemTemplate>
<asp:LinkButton ID="LinkButton2" runat="server" Text='<%# Eval("child_name") %>' CommandName="cc" CommandArgument='<%# Eval("cid") %>'></asp:LinkButton>
</ItemTemplate>
</asp:DataList>
</ContentTemplate>
</cc1:Accordion>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
SelectCommand="getPCats" SelectCommandType="StoredProcedure"
ConnectionString="myconnstring"
ProviderName="myprovidername"></asp:SqlDataSource>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
.............................
<asp:UpdatePanel/>
protected void Accordion1_ItemDataBound(object sender, AccordionItemEventArgs e)
{
if (e.ItemType == AccordionItemType.Header)
{
// registers the Header LinkButtons as AsyncPostBackControls
LinkButton lb = (LinkButton)e.AccordionItem.FindControl("LinkButton1");
ToolkitScriptManager1.RegisterAsyncPostBackControl(lb);
}
if (e.ItemType == AccordionItemType.Content)
{
// populates the Content DataList based on the parent category
DataRowView cv = (DataRowView)e.Item;
int pc = int.Parse(cv.Row[0].ToString());
DataList dl = (DataList)e.AccordionItem.FindControl("DataList1");
try
{
dl.ItemDataBound += new DataListItemEventHandler(dl_ItemDataBound);
dl.DataSource = getChildDataSource(pc);
dl.DataBind();
}
catch (Exception ex)
{
}
}
}
protected void dl_ItemDataBound(object sender, DataListItemEventArgs e)
{
// registers the DataList LinkButtons as AsyncPostBackControls
LinkButton lb = (LinkButton)e.Item.FindControl("LinkButton2");
ToolkitScriptManager1.RegisterAsyncPostBackControl(lb);
}
protected void c_click(object sender, CommandEventArgs e)
{
if (e.CommandName == "pc")
{
// binds the gridview to the data source for the parent category
gvDataSource = getPCGVDataSource();
gvDataSource.DataBind();
}
else if (e.CommandName == "cc")
{
// binds teh gridview to the datasource for the child category
gvDataSource = getCCGVDataSource();
gvDataSource.DataBind();
}
UpdatePanel1.Update();
}
|
Advertisement