if
(((DetailsView)sender).CurrentMode== DetailsViewMode.Edit)
{
DropDownList ddl = (DropDownList)((DetailsView)sender).FindControl(
"DevicesLocation"
);
Label lbl = (Label)((DetailsView)sender).FindControl(
"lblLocationID"
);
LocationDropDown(ddl);
ddl.SelectedValue = lbl.Text;
ipAddressRadGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
// Add edit column
ipAddressRadGrid.AutoGenerateEditColumn =
true
;
ipAddressRadGrid.Rebind();
}
<
telerik:RadToolTipManager
ID
=
"RadToolTipManager1"
runat
=
"server"
Position
=
"BottomCenter"
RelativeTo
=
"Element"
Width
=
"400"
Height
=
"400"
Animation
=
"Resize"
HideEvent
=
"LeaveTargetAndToolTip"
OnAjaxUpdate
=
"OnAjaxUpdate"
OnClientHide
=
"OnClientHide"
RenderInPageRoot
=
"true"
AnimationDuration
=
"200"
>
<
TargetControls
>
<
telerik:ToolTipTargetControlTargetControlID
=
"Complain_btn"
IsClientID
=
"true"
/>
</
TargetControls
>
</
telerik:RadToolTipManager
>
<
Columns
>
<
telerik:GridTemplateColumn
HeaderText
=
"Complains"
UniqueName
=
"TemplateColumn1"
>
<
ItemTemplate
>
<
telerik:RadButton
ID
=
"Complain_btn"
Text
=
"Complain Details"
runat
=
"server"
>
</
telerik:RadButton
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
{
this.UpdateToolTip(args.Value, args.UpdatePanel);
}
private void UpdateToolTip(string elementID, UpdatePanel panel)
{
Control ctrl = Page.LoadControl("Complains.ascx");
panel.ContentTemplateContainer.Controls.Add(ctrl);
Complains c = (Complains)ctrl;
c.CompID = elementID;
}
Do you have to have a DataSource defined in the .aspx for htis to work ?
What i was doing initially was databinding a list to my combobox in the code behind (page load)
I'm trying to get this working with automaticloadondemand but failing.
I've tried adding it into itemsrequested as well but no luck. I was hoping i'd be able to do this automatically rather than have to handle the request each time and have to calculate how many items are returned and what other ones need to display (showmoreresults box)
etc etc.
Regards,
Alan
protected
void
RadGrid1_ItemDataBound(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
if
(item[
"typedestickets"
].Text ==
"INDEF"
)
{
item.BackColor = System.Drawing.Color.Red;
}
}
}
<telerik:GridTemplateColumn HeaderText=
"Type de tickets"
UniqueName=
"typedestickets"
>
<ItemTemplate><asp:Label id=
"test"
runat=
"server"
></asp:Label></ItemTemplate>
</telerik:GridTemplateColumn>
Here is another issue with Telerik Control. Following is the scenario:
We have three panels on the form which is Ajax enabled:
1. Panel 1 – where user enters information.
2. Panel 2 – where user uploads document using Telerik RADAsyncUpload control.
3. Panel 3 - where user confirms his information and uploaded files before he submits.
Issue:
The user has the option to go back and forth between above three panels to update any information. But the problem arises when user selects files in Telerik RADAsyncUpload control and he goes back to the Panel 1 and Comes back to the Panel 2 (or from Panel 3 to Panel 2). The files that the user is selected are lost. The telerik upload control doesn’t maintain the state of the selected files. Instead it goes back to the initial state.
We tried to use the “PostbackTriggers” property but it is not working.
Please assist us asap.
<
telerik:RadAjaxPanel
ID
=
"DemoPanelBarPanel"
runat
=
"server"
EnableAJAX
=
"true"
>
<
telerik:RadPanelBar
ID
=
"uxProfileList"
OnClientItemClicked
=
"OnClientItemExpand"
OnClientItemExpand
=
"OnClientItemExpand"
ExpandMode
=
"FullExpandedItem"
Width
=
"100%"
runat
=
"server"
>
<
Items
>
<
telerik:RadPanelItem
runat
=
"server"
Text
=
"Personal Info"
Value
=
"PersonalInfo"
Font-Bold
=
"true"
>
</
telerik:RadPanelItem
>
<
telerik:RadPanelItem
runat
=
"server"
Text
=
"Profile Info"
Value
=
"ProfileInfo"
Font-Bold
=
"true"
>
</
telerik:RadPanelItem
>
<
telerik:RadPanelItem
runat
=
"server"
Text
=
"Education"
Value
=
"Education"
Font-Bold
=
"true"
>
</
telerik:RadPanelItem
>
<
telerik:RadPanelItem
runat
=
"server"
Text
=
"WorkExperience"
Value
=
"WorkExperience"
Font-Bold
=
"true"
>
</
telerik:RadPanelItem
>
</
Items
>
</
telerik:RadPanelBar
>
</
telerik:RadAjaxPanel
>
<
script
type
=
"text/javascript"
language
=
"javascript"
>
function OnClientItemExpand(sender, args) {
$find("<%= DemoPanelBarPanel.ClientID%>").ajaxRequestWithTarget("<%= DemoPanelBarPanel.ClientID%>", args.get_item().get_value());
}
</
script
>
DemoPanelBarPanel.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(OnProfileAjaxPanelAjaxRequest);
void OnProfileAjaxPanelAjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument.Equals("PersonalInfo"))
{
RadPanelItem item = uxProfileList.Items.FindItemByValue(e.Argument);
}
}