or
Hello All,
I want to use the RadScheduler in an ASP MVC application, only to display appointments. Appreciate any guidance such as code samples and/or tutorials on the matter.
Thanks in advanceprotected void Page_Init(object sender, EventArgs e) |
{ |
RadGrid radGrid1 = new RadGrid(); |
radGrid1.ID = "radGrid1"; |
radGrid1.Skin = "Outlook"; |
radGrid1.DataSourceID = "SqlDataSource1"; |
radGrid1.GridLines = GridLines.None; |
radGrid1.MasterTableView.GroupsDefaultExpanded = false; |
GridGroupByExpression expression = new GridGroupByExpression(); |
GridGroupByField gridGroupByField = new GridGroupByField(); |
gridGroupByField = new GridGroupByField(); |
gridGroupByField.FieldName = "name"; |
gridGroupByField.HeaderText = "Name"; |
expression.SelectFields.Add(gridGroupByField); |
gridGroupByField = new GridGroupByField(); |
gridGroupByField.FieldName = "name"; |
gridGroupByField.HeaderText = "Name"; |
expression.GroupByFields.Add(gridGroupByField); |
GridGroupByExpression expression1 = new GridGroupByExpression(); |
gridGroupByField = new GridGroupByField(); |
gridGroupByField.FieldName = "Category"; |
gridGroupByField.HeaderText = "Category"; |
expression1.SelectFields.Add(gridGroupByField); |
gridGroupByField = new GridGroupByField(); |
gridGroupByField.FieldName = "Category"; |
gridGroupByField.HeaderText = "Category"; |
expression1.GroupByFields.Add(gridGroupByField); |
radGrid1.MasterTableView.GroupByExpressions.Add(expression); |
radGrid1.MasterTableView.GroupByExpressions.Add(expression1); |
this.PlaceHolder1.Controls.Add(radGrid1); |
} |
$(document).ready(
function
() {
$(
"#LoginDiv"
).toggle();
$(
"#Button3"
).click(
function
() {
$(
"#Button4"
).toggle();
});
$(
"#aLink"
).click(
function
() {
$(
"#LoginDiv"
).toggle();
});
});
Hello,
I want to load item data in RadMenu by using a SQL query, when testing the below code I can stop at a break point in
RadMenu1_ItemDataBound but not stopping in RadMenu1_ItemClick, I'm wondering what to do in order to be able
to fire OnItemClick. I Don't know what is wrong, please help...
<
telerik:RadMenu
ID
=
"RadMenu1"
runat
=
"server"
Width
=
"100%"
style
=
"margin-bottom:2px"
EnableRoundedCorners
=
"True"
EnableShadows
=
"True"
DataSourceID
=
"SqlDataSource1"
DataFieldID
=
"MenuID"
DataFieldParentID
=
"ParentID"
DataTextField
=
"FieldText"
DataValueField
=
"Page"
OnItemClick
=
"RadMenu1_ItemClick"
onitemdatabound
=
"RadMenu1_ItemDataBound"
>
</
telerik:RadMenu
>
protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
{
if (Request.IsAuthenticated)
{
string value=e.Item.Value.ToString();
Telerik.Web.UI.RadPane topPane = (Telerik.Web.UI.RadPane)HeadLoginView.FindControl("topPane");
string[] arreglo = value.Split('?');
topPane.ContentUrl = arreglo[0];
Telerik.Web.UI.RadPane paneContent = (Telerik.Web.UI.RadPane)HeadLoginView.FindControl("contentPane");
paneContent.ContentUrl = "Blank.aspx";
if (value.IndexOf('?') > 0)
{
if (arreglo[1] == "clp=1")
{
paneContent.Collapsed = true;
}
else
{
paneContent.Collapsed = false;
}
}
else
{
paneContent.Collapsed = false;
}
}
}
protected void RadMenu1_ItemDataBound(object sender, Telerik.Web.UI.RadMenuEventArgs e)
{
e.Item.Value = e.Item.NavigateUrl;
e.Item.NavigateUrl = "";
}
Thanks
Antonio
Hello,
The following code does not fires onclick properly in RadMenu but removing Loginview and loggedintemplate tags
makes it to run, I think something is not being located in order to fire onclick, what would be the
workaround to allow loginview?
Thanks
Antonio
<
asp:LoginView
ID
=
"HeadLoginView"
runat
=
"server"
EnableViewState
=
"false"
>
<
LoggedInTemplate
>
<
telerik:RadMenu
ID
=
"RadMenu1"
runat
=
"server"
Width
=
"100%"
style
=
"margin-bottom:2px"
EnableRoundedCorners
=
"True"
EnableShadows
=
"True"
DataSourceID
=
"SqlDataSource1"
DataFieldID
=
"MenuID"
DataFieldParentID
=
"ParentID"
onitemclick
=
"RadMenu1_ItemClick"
onitemdatabound
=
"RadMenu1_ItemDataBound"
>
<
DataBindings
>
<
telerik:RadMenuItemBinding
TextField
=
"FieldText"
Depth
=
"0"
/>
<
telerik:RadMenuItemBinding
TextField
=
"FieldText"
Depth
=
"1"
ValueField
=
"Page"
/>
</
DataBindings
>
</
telerik:RadMenu
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:serpoldbConnectionString %>"
SelectCommand="select MenuID,ParentID,FieldText,Page from tbMenu" SelectCommandType="Text"
CancelSelectOnNullParameter="False">
</
asp:SqlDataSource
>
</
LoggedInTemplate
>
</
asp:LoginView
>