| Serverfehler in der Anwendung /. |
| -------------------------------------------------------------------------------- |
| Dieser Seitentyp wird nicht verarbeitet. |
| Beschreibung: Der angeforderte Seitentyp wird nicht verarbeitet, da er ausdrücklich verboten ist. Die Erweiterung ".master" ist möglicherweise falsch. Überprüfen Sie den unten angegebenen URL, und stellen Sie sicher, das er richtig geschrieben wurde. |
| Angeforderter URL: /member/rw_select_supplier.master |
| -------------------------------------------------------------------------------- |
| Versionsinformationen: Microsoft .NET Framework-Version:2.0.50727.3082; ASP.NET-Version:2.0.50727.3082 |
TreeNodeExpandMode
.ServerSide expend mothod.
I have also a button that deletes nodes from my treeview.
It works fine as long as i use ServerSide expend mode.
This is my code:
protected
void Page_Load(object sender, EventArgs e)
{
LoadRootNodes(catTreeView,
TreeNodeExpandMode.ServerSide);
}
protected
void NodeExpand(object sender, RadTreeNodeEventArgs e)
{
if (e.Node.Nodes.Count == 0)
PopulateNodeOnDemand(e,
TreeNodeExpandMode.ServerSide);
}
protected
void uxDeleteCategory_Click(object sender, EventArgs e)
{
LinkButton thisButton = (LinkButton)sender;
RadTreeNode thisNode = (RadTreeNode)thisButton.Parent;
int usedTimes = int.Parse(((Label)thisNode.FindControl("itemsCount")).Text);
if (thisNode.Nodes.Count == 0 && usedTimes == 0)
{
DeleteCategory(thisNode.Value);
thisNode.Remove();
}
else
message1.Message =
"Cannot delete this item!";
}
<
asp:LinkButton OnClientClick="return blockConfirm('Are you sure you want to delete this?', event, 330, 100,'','Delete Category');"
ID="deleteCategoryButton" OnClick="uxDeleteCategory_Click" runat="server" Text='<%$Resources:Delete %>'></asp:LinkButton>
The methods that populate and delete the actual items from the database are not included but are simply methods with linq code to do the required work.
Also, as you can see the delete is a simple link button, that causes a post back. And that is where the problem comes in.
As soon as i change my code to ServerSideCallBack expend method, i can no longer delete anything bellow the root in my treeview.
I can delete in the root because the root nodes are reloaded with the post back, but the other nodes are not.
I gather that i need to do my deleting in some different way when using ServerSideCallBack, can anyone tell me how i would go about that?
Thanks
A
Hi,
I have two listbox controls both having SelectionMode="Multiple". First one is populated from object data source. Selecting an item in the first listbox causes the SelectedIndexChanged event to fire, where I populate the second one and select all items in it. Then I select an item in the second listbox in a browser and click a button (or cause any other postback). After that all items in the second listbox are selected again. I've found two ways to select something other than all items.
1. Selecting items while holding ctrl key seems to work, but it's not very handy.
2. In the second listbox moving the scrollbar, selecting an item and then causing postback gets all items unselected (even the one just selected). Then selecting works as expected.
here is my asp sample:
| <div style="float: left; width: 150px"> | |
| <asp:Label ID="_lblBrokerLabel" runat="server" Text="Pośrednik:" /><br /> | |
| <telerik:RadListBox ID="_rlbBrokers" runat="server" DataSourceID="_odsBrokers" DataTextField="Name" | |
| DataValueField="ID" Skin="Default" AutoPostBack="true" CausesValidation="false" | |
| SelectionMode="Multiple" OnSelectedIndexChanged="BrokersChanged" Height="200" /> | |
| <asp:RequiredFieldValidator ControlToValidate="_rlbBrokers" Text="*" ID="_rfvBrokers" | |
| runat="server" /> | |
| <asp:ObjectDataSource ID="_odsBrokers" runat="server" SelectMethod="GetUserBrokers" | |
| TypeName="Ewita.Model.Entities"> | |
| <SelectParameters> | |
| <asp:Parameter Name="userId" Type="Int32" /> | |
| <asp:Parameter Name="activeOnly" Type="Boolean" DefaultValue="False" /> | |
| </SelectParameters> | |
| </asp:ObjectDataSource> | |
| </div> | |
| <div style="float: left; width: 150px"> | |
| <asp:Label ID="_lblWarehouseLabel" runat="server" Text="Magazyny:" /><br /> | |
| <telerik:RadListBox ID="_rlbWarehouses" runat="server" DataValueField="ID" Skin="Default" | |
| SelectionMode="Multiple" Height="200"> | |
| <ItemTemplate> | |
| <asp:Panel CssClass='<%# (bool)Eval("Active")?"":"inactive" %>' ID="_pnlWarehouse" | |
| runat="server"> | |
| <%# Eval("Name") %> | |
| </asp:Panel> | |
| </ItemTemplate> | |
| </telerik:RadListBox> | |
| <asp:RequiredFieldValidator ControlToValidate="_rlbWarehouses" Text="*" ID="_rfvWarehouses" | |
| runat="server" /> | |
| </div> |
and here is code behind
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| if (IsPostBack) return; | |
| var user = (User)Session["user"]; | |
| _odsBrokers.SelectParameters["userId"].DefaultValue = user.ID.ToString(); | |
| } | |
| protected void BrokersChanged(object sender, EventArgs e) | |
| { | |
| var warehouses = new List<Warehouse>(); | |
| var user = (User)Session["user"]; | |
| foreach (var item in _rlbBrokers.SelectedItems) | |
| { | |
| int brokerId; | |
| if (!int.TryParse(item.Value, out brokerId)) continue; | |
| warehouses.AddRange(Entities.Instance.GetUserWarehouses(brokerId, user.ID, false)); | |
| } | |
| _rlbWarehouses.DataSource = warehouses; | |
| _rlbWarehouses.DataBind(); | |
| foreach (RadListBoxItem item in _rlbWarehouses.Items) | |
| { | |
| item.Selected = true; | |
| } | |
| } |
I checked this issue on Opera and Firefox browsers. I'm using .net 3.5, visual studio 2008 and Telerik RadControls for ASP.NET Ajax v. 2009.2.701.35
Thanks in advance. protected void RadGridArea_PreRender(object sender, EventArgs e)
{
PropertyArea projarea = new PropertyArea();
DataTable dt = projarea.GetPropertyAreaByPropertyId(this.property_id);
if (dt.Rows.Count == 0)
{
for (int i = 0; i < this.RadGridArea.Items.Count; i++)
{
this.RadGridArea.MasterTableView.Items[i].Edit = true;
}
this.RadGridArea.Rebind();
}
if (!Page.IsPostBack)
{
string s = "<script type='text/javascript'>document.getElementById('" + this.txtPropertyName.ClientID + "').focus();</script>";
ClientScript.RegisterStartupScript(Page.GetType(), Guid.NewGuid().ToString(), s, false);
}
}
The above coding is not work.
Regards,
Paul

| RadChart1.PlotArea.XAxis.MinValue = startTime.ToOADate(); |
| RadChart1.PlotArea.XAxis.MaxValue = endTime.ToOADate(); |
| RadChart1.PlotArea.XAxis.IsZeroBased = false; |
| RadChart1.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortTime; |
| RadChart1.PlotArea.XAxis.Step = DateTime.Now.AddMinutes(10).ToOADate() - DateTime.Now.ToOADate(); |
| RadChart1.PlotArea.XAxis.LabelStep = 6; |
| while (startTime < endTime) |
| { |
| RadChart1.Series[0].Items.Add(new Telerik.Charting.ChartSeriesItem { XValue = startTime.ToOADate(), YValue = begin, YValue2 = end, YValue3 = max, YValue4 = min }); |
| startTime = startTime.AddMinutes(10); |
| } |