Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
95 views
Hello,

I created some controls in Advanced Edit Template.And i want to pass data dynamically by click on Appointment.How i can find Controls Inside Advance Edit Template in Appointment click event

How i can bind data Dynamically to Advanced Edit Template

Thanks And Regards

N.Vishnu Vardhan reddy
Peter
Telerik team
 answered on 09 Jan 2012
1 answer
70 views
I have a website I am building and I am getting this persistent error that is driving me nuts because it does not do this every time. The website uses a master page which includes a header. I have a panelbar to separate sections and when you scroll you see the panelbar shows above the header menu. Does anybody know the cause of this? What am I forgetting to change? Also I have noticed that it does not do this on every computer. I know this is a simple issue but I cant figure it out and its driving me nuts. If you need me to post sections of the code or css please let me know and I will respond asap.


http://10.40.0.30:8040/login.aspx
user:test66
pass:abc123&
click organization ->> Search for organization -->> click any of them and then scroll down and up.

Kate
Telerik team
 answered on 09 Jan 2012
3 answers
172 views
I have a RadGrid with two GridTemplateColumns.
i need to tooltipsify the GridTemplateColumns, so i have taken two RadTooltipManager controls on the page

i have written the following code in Grids ItemDataBound event. (Here btnbooking and btnReference are button controls in first  and second Gridtemplatecolumn ) OnAjaxUpdate methods for RadToolTipManager's are OnAjaxUpdateBooking and OnAjaxUpdateReference.
in these methods i am loading Booking.ascx and Reference.ascx usercontrols.

these two usercontrols contains "Close" button, on click of these buttons i need to hide the Tooltip. 

 when i click the close button i am getting the following error.
Sys.WebForms.PageRequestManagerServerErrorException: Invalid JSON primitive:

please find the code in ItemDataBound event, OnAjaxUpdate and Javascript method for hiding tooltip
-- ItemDataBound Event
ToolTipManager1.TargetControls.Add(btnbooking.ClientID, btnbooking.Text,
true);
ToolTipManager2.TargetControls.Add(btnReference.ClientID, btnReference.Text, true);
 
 -- OnAjaxUpdate methods
protected void OnAjaxUpdateBooking(object sender, ToolTipUpdateEventArgs args)
        {
            Control ctrl = Page.LoadControl("~/ControlLibrary/Booking.ascx");
            args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);           
            AppWeb.ControlLibrary.BookingDetails booking = (AppWeb.ControlLibrary.BookingDetails)ctrl;
 
            WTButton btnClose = (WTButton)ctrl.FindControl("btnclose");
            if (btnClose != null)
                btnClose.OnClientClicked = "CloseTooltipManager";
        }
 
        protected void OnAjaxUpdateReference(object sender, ToolTipUpdateEventArgs args)
        {
            Control ctrl = Page.LoadControl("~/ControlLibrary/Reference.ascx");
            args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);           
            AppWeb.ControlLibrary.DualDetails dual = (AppWeb.ControlLibrary.DualDetails)ctrl;
            dual.PageType = ApptType.EXPORT_DROPOFF;
            dual.lGateApptAssoc_Id = Convert.ToInt64(args.Value);           
             
            WTButton btnClose = (WTButton)ctrl.FindControl("btnclose");
            if (btnClose != null)
                btnClose.OnClientClicked = "CloseTooltipManager";                       
        }
 
-- Javascript method
function CloseTooltipManager(sender, args) {
             
 
            var controller = Telerik.Web.UI.RadToolTipController.getInstance();
            var tooltip = controller.get_activeToolTip();
 
            if (tooltip) {
                tooltip.hide();
            }
        }


please anyone help me where i am doing wrong.

Jai
Jay
Top achievements
Rank 1
 answered on 09 Jan 2012
1 answer
132 views
Hello,

Can I populate a radgrid on right clicking (context menu) on a tree node so that the grid gets populated using ajax and the context menu also shows?
I tried it but the after the grid gets populated, the context menu disappears.

function OnClientContextMenuShowing(sender, args) {
  var treeNode = args.get_node();
   treeNode.set_selected(true);
/*
//Here I tried to call the ajax function for populating the grid
*/
  if (args.get_menu() != null) {
     setMenuItemsState(args.get_menu().get_items(), treeNode);
  }
}

Abhay
Dimitar Terziev
Telerik team
 answered on 09 Jan 2012
1 answer
181 views
Hello,
I want to display the Weekly or Monthly view without click in the navigation or setting the property(SelectedView).
I want setting using C# code to display weekly or Monthly view in the calender. I don't want to assign like this SelectedView="WeekView".
Please help me as soon as possible.

Thanks
Best Regards

Jiten
Peter
Telerik team
 answered on 09 Jan 2012
1 answer
114 views
my requirement is user should not create more than 2 appoints in week.

how can i achive this and restrict user from creating more than 2 appointments in week.

i am allowing recurrence also so how can i handle recurrence situation also.

waiting for your reply.
Peter
Telerik team
 answered on 09 Jan 2012
1 answer
102 views
Hi i am using scheduler and with recurring appointments.
If i click on an appointment and open advancedEditTemplate form for recurring appointment i get popup which asks to update occurenece or entire series.This behaviour is fine.
but i get same popup even if i am clicking on appointment which is not recurring.

i am using advancedEditTemplate.

please let me know how to displae popup for non recurring appointments. popup should come only for recurring appointments.

waiting for your reply...
Peter
Telerik team
 answered on 09 Jan 2012
3 answers
297 views
Hi

I've created a Row mouseover popup with jquery here :- http://trijewels.com/LooseDiamonds.aspx
I want to do the same thing using Telerik controls.
I am new to telerik and need help.

Thanks
Vikas Rana
Shinu
Top achievements
Rank 2
 answered on 09 Jan 2012
2 answers
244 views
Hi,

  I want to export panel into pdf.
  Panel contains radgrid, radcombobox, raddatepicker.
  successfully export the grid but i got a long message in pdf for radcombobox and raddatepicked
//
Sys.Application.add_init(f
unction(){$create(Telerik.
Web.UI.RadComboBox,
{"_dropDownWidth":0,"_h
eight":0,"_skin":"Web20",
"_text":"Section2","_uniqu
eId":"ctl00$ctl00$Secure
PlaceHolder$SchedulerPl
aceHolder$2","_value":"",
"_virtualScroll":false,"clie
ntStateFieldID":"ctl00_ctl
00_SecurePlaceHolder_
SchedulerPlaceHolder_2
_ClientState","collapseAn
imation":"{\"duration\":450
}","expandAnimation":"{\"
duration\":450}","itemDat
a":[{"selected":true},{}],"s
electedIndex":0}, null,
null,
$get("ctl00_ctl00_Secure
PlaceHolder_SchedulerPl
aceHolder_2"));}); //


how to solve this problem...

Thanks
Michael
Top achievements
Rank 1
 answered on 09 Jan 2012
1 answer
135 views
I have a parent child heirarchial grid but I am having issues when I export the grid.

The master records don't start from the first column and seems to be in the end.
I would like the parent records to start from column A and the child records to be indented inside.

Attached is a screenshot and my grid code:

.aspx
 
<telerik:RadGrid ID="rgBeneficiary" runat="server" GridLines="Vertical" AllowPaging="true"
                    AllowAutomaticUpdates="false" AllowAutomaticInserts="false" AutoGenerateColumns="False"
                    EnableLinqExpressions="false" AllowSorting="true" AllowAutomaticDeletes="false"
                    Skin="MBen" EnableEmbeddedSkins="false" DataSourceID="_dataSrcBeneficiaries"
                    AllowCustomPaging="false" AllowFilteringByColumn="true" Width="100%" OnPreRender="rgBeneficiary_PreRender"
                    OnItemCommand="rgBeneficiary_ItemCommand" OnItemCreated="rgBeneficiary_ItemCreated"
                    PageSize="15" ImagesPath="../../App_Themes/MBen/Grid">
                    <MasterTableView TableLayout="Fixed" HierarchyDefaultExpanded="false"
                        HierarchyLoadMode="ServerBind" CommandItemDisplay="Top"
                        ExpandCollapseColumn-CollapseImageUrl="../../App_Themes/MBen/Grid/Collapse.gif"
                        HorizontalAlign="Right" ExpandCollapseColumn-Display="false" RowIndicatorColumn-Display="false"
                        ExpandCollapseColumn-ExpandImageUrl="../../App_Themes/MBen/Grid/Expand.gif">
                        <CommandItemSettings ShowRefreshButton="false" ShowExportToExcelButton="true" ExportToExcelText=""
                            ExportToCsvText="" ExportToPdfText="" ExportToWordText="" ShowExportToPdfButton="true"
                            ShowExportToWordButton="true" ShowExportToCsvButton="true" ShowAddNewRecordButton="false" />
                       <Columns>
                            <telerik:GridTemplateColumn UniqueName="TemplateColumn" AllowFiltering="false" HeaderStyle-Width="3%">
                                <ItemTemplate>
                                    <asp:ImageButton ID="btnCollapse" runat="server" CommandName="ExpandCollapse" ImageUrl="~/App_Themes/MBen/Grid/Collapse.gif"
                                        ToolTip="Collapse" Visible="False " />
                                    <asp:ImageButton ID="btnExpand" runat="server" CommandName="ExpandCollapse" ImageUrl="~/App_Themes/MBen/Grid/Expand.gif"
                                        ToolTip="Expand" />
                                </ItemTemplate>
                                <HeaderTemplate>
                                    <asp:ImageButton ID="ExpandAll" runat="server" CommandName="ExpandAll" ImageUrl="~/App_Themes/MBen/Grid/Expand.gif"
                                        ToolTip="ExpandAll" />
                                    <asp:ImageButton ID="CollapseAll" runat="server" CommandName="CollapseAll" Visible="False"
                                        ImageUrl="~//App_Themes/MBen/Grid/Collapse.gif" ToolTip="CollapseAll" />
                                </HeaderTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="FullName" UniqueName="FullName" HeaderText="Participant Name"
                                CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true"
                                FilterControlWidth="125px" FilterControlToolTip="Input name or part of name to search">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EmployeeCode" UniqueName="EmployeeCode" HeaderText="Participant Code"
                                CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true"
                                FilterControlWidth="75px" FilterControlToolTip="Input a code to search" />
                        </Columns>
                        <DetailTables>
                            <telerik:GridTableView DataKeyNames="BeneficiaryID" DataSourceID="_dataSrcParticipantBeneficiaries"
                                Width="100%" runat="server" AllowFilteringByColumn="false" ShowFooter="true"
                                HorizontalAlign="Right">
                                <ParentTableRelation>
                                    <telerik:GridRelationFields DetailKeyField="ParticipantID" MasterKeyField="ParticipantID" />
                                </ParentTableRelation>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="BeneficiaryID" UniqueName="BeneficiaryID" Visible="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Beneficiary" UniqueName="Beneficiary" HeaderText="Beneficiary Name"
                                        AllowFiltering="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="BeneficiaryType" UniqueName="BeneficiaryType"
                                        HeaderText="Beneficiary Type" HeaderStyle-Width="15%">                                       
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="BeneficiaryRelationship" UniqueName="BeneficiaryRelationship"
                                        HeaderText="Relationship" AllowFiltering="false" HeaderStyle-Width="15%">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="BeneficiaryPercent" UniqueName="BeneficiaryPercent"
                                        HeaderText="Beneficiary Percent" AllowFiltering="false" HeaderStyle-Width="18%">
                                    </telerik:GridBoundColumn>
                                </Columns>
                            </telerik:GridTableView>
                        </DetailTables>
                    </MasterTableView>                   
                </telerik:RadGrid>

code behind event handlers:

protected void rgBeneficiary_PreRender(object source, EventArgs e)
        {
            if (rgBeneficiary.MasterTableView.Items.Count == 0)
            {
                rgBeneficiary.ShowFooter = false;
            }
             
            RadAjaxManager.GetCurrent(Page).ClientEvents.OnRequestStart = "RequestStart";
        }       
 
        protected void rgBeneficiary_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName.Contains("Export"))
            {
                if (e.CommandName == "ExportToCsv")
                    rgBeneficiary.ExportSettings.ExportOnlyData = false;
 
               rgBeneficiary.MasterTableView.HierarchyDefaultExpanded = true;
            }
 
            #region Expand/Collapse All
 
            if (e.CommandName == RadGrid.ExpandCollapseCommandName)
            {
                (e.Item.FindControl("btnExpand") as ImageButton).Visible = !(e.Item.FindControl("btnExpand") as ImageButton).Visible;
                (e.Item.FindControl("btnCollapse") as ImageButton).Visible = !(e.Item.FindControl("btnCollapse") as ImageButton).Visible;
            }
            if (e.CommandName == "ExpandAll")
            {
                //Looping through each DataItem and making the "btnExpand" image button in the item visibility  to false and  "btnCollapse" visibility to true
                foreach (GridDataItem GridDataItem in rgBeneficiary.MasterTableView.GetItems(new GridItemType[] { GridItemType.Item, GridItemType.AlternatingItem }))
                {
                    ImageButton btnExpand = (ImageButton)GridDataItem.FindControl("btnExpand");
                    btnExpand.Visible = false;
                    ImageButton btnCollapse = (ImageButton)GridDataItem.FindControl("btnCollapse");
                    btnCollapse.Visible = true;
                }
                //Exapanding the DataItem
                foreach (GridDataItem item in rgBeneficiary.Items)
                {
                    item.Expanded = true;
                }
                //Hiding the CollapseAll image in the header to true and ExpandAll image in the header to false
                GridHeaderItem GridHeaderItem = e.Item as GridHeaderItem;
                ImageButton imgCollapseAll = (ImageButton)GridHeaderItem.FindControl("CollapseAll");
                imgCollapseAll.Visible = true;
                ImageButton imgExpandAll = (ImageButton)GridHeaderItem.FindControl("ExpandAll");
                imgExpandAll.Visible = false;
            }
            if (e.CommandName == "CollapseAll")
            {
                //Looping through each DataItem and making the "btnExpand" image button in the item visibility  to true and  "btnCollapse" visibility to false
                foreach (GridDataItem GridDataItem in rgBeneficiary.MasterTableView.GetItems(new GridItemType[] { GridItemType.Item, GridItemType.AlternatingItem }))
                {
                    ImageButton btnExpand = (ImageButton)GridDataItem.FindControl("btnExpand");
                    btnExpand.Visible = true;
                    ImageButton btnCollapse = (ImageButton)GridDataItem.FindControl("btnCollapse");
                    btnCollapse.Visible = false;
                }
                //Collapsing the DataItem
                foreach (GridDataItem item in rgBeneficiary.Items)
                {
                    item.Expanded = false;
                }
                //Hiding the CollapseAll image in the header to false and ExpandAll image in the header to true
                GridHeaderItem GridHeaderItem = e.Item as GridHeaderItem;
                ImageButton imgCollapseAll = (ImageButton)GridHeaderItem.FindControl("CollapseAll");
                imgCollapseAll.Visible = false;
                ImageButton imgExpandAll = (ImageButton)GridHeaderItem.FindControl("ExpandAll");
                imgExpandAll.Visible = true;
            }
            #endregion
        }
 
        protected void rgBeneficiary_ItemCreated(object source, GridItemEventArgs e)
        {
            //removes unwanted line from commanditemdisplay
            if (e.Item is GridCommandItem)
            {
                ((Table)e.Item.Cells[0].Controls[0]).Rows[0].Cells[1].Controls.RemoveAt(1);
            }
        }

Any help is appreciated.
Shinu
Top achievements
Rank 2
 answered on 09 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?