Me.pBlocks.VisibleOnPageLoad = True
hlc =
New GridHyperLinkColumn
Me.uxBlocks.Columns.Add(hlc)
hlc.HeaderText = GetCaption(p.Name)
hlc.UniqueName = p.Name
hlc.DataTextField = p.Name
hlc.DataNavigateUrlFields = {p.Name}
hlc.DataNavigateUrlFormatString =
"linktowindow?q={0}"
hlc.Display = True
hlc.HeaderStyle.Width =
Unit.Pixel(170)
hlc.ItemStyle.Wrap =
True
<
telerik:GridTemplateColumn
UniqueName
=
"ProdWorkstation"
HeaderText
=
"ProdWorkstation"
>
<
ItemTemplate
>
<%#DataBinder.Eval(Container.DataItem, "ProdWorkstation")%>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"RadComboBox_SelectWorkStation"
Height
=
"300px"
Width
=
"750px"
DataSourceID
=
"LCM_UserWorkstationList"
EnableLoadOnDemand
=
"true"
ItemsPerRequest
=
"20"
EnableAutomaticLoadOnDemand
=
"False"
DataTextField
=
"Workstation"
DataValueField
=
"Workstation"
style
=
"margin-bottom: 0px"
AutoPostBack
=
"True"
HighlightTemplatedItems
=
"true"
CausesValidation
=
"False"
Skin
=
"Office2007"
OnItemsRequested
=
"RadComboBox1_ItemsRequested"
>
<
HeaderTemplate
>
<
ul
>
<
li
class
=
"col75"
>user_id</
li
>
<
li
class
=
"col200"
>Workstation</
li
>
<
li
class
=
"col200"
>Name</
li
>
<
li
class
=
"col200"
>Profile</
li
>
</
ul
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
ul
>
<
li
class
=
"col75"
><%# DataBinder.Eval(Container.DataItem, "user_id")%></
li
>
<
li
class
=
"col200"
><%# DataBinder.Eval(Container.DataItem, "Workstation")%></
li
>
<
li
class
=
"col200"
><%# DataBinder.Eval(Container.DataItem, "Name") %></
li
>
<
li
class
=
"col200"
><%# DataBinder.Eval(Container.DataItem, "Profile")%></
li
>
</
ul
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
if
(e.CommandName ==
"PerformInsert"
)
{
GridEditFormInsertItem EditForm = (GridEditFormInsertItem)e.Item;
RadComboBox combo = EditForm[
"ProdWorkstation"
].Controls[0]
as
RadComboBox;
string
ProdWorkstation = combo.Text;
//NULL value
I need to achieve a functionality to refresh the scheduler on a button click event.
The button should exist as a link button on the scheduler.I am using sharepoint list as the datasource
Could you provide some pointers on this.
Thank you
Smith
Hello,
I would like to allow the users to select the number of minutes per row of the Scheduler themselves.
I'm trying to reproduce a small part of the Scheduler customization demo page available there:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/customization/defaultcs.aspx
In my very simple example, I only have a drop down list to select the number of minutes and a Scheduler component with no datasource.
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="Panel1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" /> |
<asp:Panel runat="Server" ID="Panel1"> |
Minutes per row: |
<asp:DropDownList runat="server" ID="MinutesPerRow" AutoPostBack="true"> |
<asp:ListItem Value="60" Text="60"></asp:ListItem> |
<asp:ListItem Value="30" Text="30" Selected="true"></asp:ListItem> |
<asp:ListItem Value="15" Text="15"></asp:ListItem> |
<asp:ListItem Value="10" Text="10"></asp:ListItem> |
</asp:DropDownList> |
<telerik:RadScheduler runat="server" ID="RadScheduler1" |
ShowFullTime="true" OverflowBehavior="Expand" |
DataKeyField="ID" DataStartField="Start" DataEndField="End" DataSubjectField="Subject" > |
</telerik:RadScheduler> |
protected override void OnPreRender(EventArgs e) |
{ |
base.OnPreRender(e); |
RadScheduler1.MinutesPerRow = int.Parse(MinutesPerRow.SelectedValue); |
} |
This example completely failed.
When I select a value in the drop down list the Panel is refreshing but the Scheduler is still displaying the previous selected value.
I have to do a second post back to obtain the correct layout.
Did I forget something?
Thank you for you help.
foreach
(PieChartItem item
in
PieChartItemCollection)
{
ChartSeriesItem chartItem = item.ChartItem;
chartItem.Label.TextBlock.Text = String.Format
(
"{0} {1}"
, str1
, str2
);
}
protected
override
void
SetupFilterControls(TableCell cell)
{
RadComboBox rcBox =
new
RadComboBox();
rcBox.ID =
this
.GetType().Name +
"ComboBox"
;
rcBox.AutoPostBack =
true
;
rcBox.DataTextField =
this
.DataField;
rcBox.DataValueField =
this
.DataField;
rcBox.SelectedIndexChanged += rcBox_SelectedIndexChanged;
rcBox.Items.Add(
new
RadComboBoxItem(
"Show All"
,
""
));
rcBox.DataSource = DataSource;
//<-------- I need to change this DataSource depending on what data is in my RadGrid.
//How can I pass a value here from my aspx page
rcBox.AppendDataBoundItems =
true
;
cell.Controls.Add(rcBox);
}