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

I would like to have something like the demo for the "Related Combo Boxes" with the combo boxes in question being in an Edit Form Template.  Is this possible?  If so would it be possible to see an example in code?
Pavlina
Telerik team
 answered on 16 Feb 2012
3 answers
255 views

  we have found a issue that adding duplicate attributes to a perticular tag if src attribute is there.
it is occured when When I added following Java script
“<script src="¬test-test.js"></src>”  to an existing HTML content “<STRONG><FONT size=6 face="Courier New">test jayani<BR>
    <BR>
    &nbsp;<IMG title=test alt=test src="/CurrentCourse/logo.jpg">&nbsp;</FONT></STRONG>”

after adding those scripts and switching between design and html views it comes like this

<strong><font size="6" face="Courier New">test jayani<br>
    <br> <script src="¬test-test.js"></src>
    &nbsp;<IMG title=test alt=test src="/CurrentCourse/logo.jpg" originalAttribute="src" originalPath="/CurrentCourse/logo.jpg" originalAttribute="src" originalPath="/CurrentCourse/logo.jpg" originalAttribute="src" originalPath="/CurrentCourse/logo.jpg">&nbsp;</FONT></STRONG>
</body></script></font></strong>

here originalAttribute and originalPath attributes keep on adding to the IMG tag. This is happens when "MakeUrlsAbsolute" filter is on.  This will work as same for the java scripts as well.
Please take a look on this and do needful.

Thanks

Rumen
Telerik team
 answered on 16 Feb 2012
7 answers
270 views
Hello
I made a project like this demo here : http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editmodes/defaultcs.aspx
I can edit/update/delete the rows, but it's only updating in the actual session, not in the sqldatabase.
What do I have to add to my code, so it's updating directly in my database?

Thanks for your help,
esmyy
esmyy
Top achievements
Rank 1
 answered on 16 Feb 2012
7 answers
150 views
I'm getting the following error when trying to export data from the scheduler; this was working, I don't know what happened?  I copied the code from what you had on your example site directly: http://demos.telerik.com/aspnet-ajax/Scheduler/Examples/Export/DefaultCS.aspx

The difference is that this control is an updated control (in an AJAX setting) whenever another control is updated...

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'BEGIN:VCALENDAR
VER'.

Any idea what the cause may be?

Thanks.
Sotir
Top achievements
Rank 1
 answered on 16 Feb 2012
3 answers
181 views
Hi,
I am having some issues with a dymanically created SchedulerContextMenu and ajax updates on a page. On the AppointmentContextMenu client side event, I fire off some javascript that attempts to enable/disable  some option on the context menu based on attributes of the appointment. This was working fine when the context menu was defined statically on the page. 

I have started to generate the menu dynamically as I wish to use it on other pages.  This is  how it is created:
   public static RadSchedulerContextMenu BuildSiteAppointmentContextMenu(Page page)
   {
       RadSchedulerContextMenu cxt = new RadSchedulerContextMenu();
       cxt.ID = "SiteSchedulerContextMenu";
       cxt.ClientIDMode = ClientIDMode.Static;
       //QUICK ASSIGN
       cxt.Items.Add(new RadMenuItem()
                         {
                             Text = "Quick Assign",
                             Value = "QuickAssignJob",
                             ImageUrl = "~/Images/Menu/tiny/nav_right_blue_quick.png",
                             DisabledImageUrl = "~/Images/Menu/tiny/nav_right_blue_quick_bw.png"
                         });
       //ADVANCED ASSIGN
       cxt.Items.Add(new RadMenuItem()
       {
           Text = "Advanced Assign",
           Value = "AdvancedAssignJob",
           ImageUrl = "~/Images/Menu/tiny/nav_right_blue.png",
           DisabledImageUrl = "~/Images/Menu/tiny/nav_right_blue_bw.png"
       });
       //UNASSIGN
       cxt.Items.Add(new RadMenuItem()
       {
           Text = "Unassign Employee",
           Value = "UnassignJob",
           ImageUrl = "~/Images/Menu/tiny/nav_right_red.png",
           DisabledImageUrl = "~/Images/Menu/tiny/nav_right_red_bw.png"
       });
return cxt;
   }

It is assigned to the SiteScheduler in the PageLoad event on every load, see below:
SiteSchedule.OverflowBehavior = OverflowBehavior.Expand;
SiteSchedule.ShowNavigationPane = false;
SiteSchedule.AppointmentContextMenus.Add(ContextMenu.BuildSiteAppointmentContextMenu(this.Page));

The javascript that I am calling is this:
function GetSchedulerContextMenu() {
          var menu = document.getElementById("SiteSchedulerContextMenu");
           return menu;
       }
The above always returns null. Previously, i was using $find("%= SiteSchedulerContextMenu.ClientID %>") as this was defined in the markup

This fails after an ajax update and returns null. What am I doing wrong? Is there a different way to dynamically create and assign an appointment context menu to a scheduler?

Thanks,
Peter
Telerik team
 answered on 16 Feb 2012
1 answer
207 views

Hi,

I have the following problem, in my RadGrid i have the operation update select and delete. Update and Select works fine. but the delete operation give me always the error that the parameter is null.

this is my grid

<telerik:RadGrid ID="radGrid1" AutoGenerateEditColumn="True" DataSourceID="objectDataSource1"
    runat="server" GridLines="None" Skin="Office2010Blue" AutoGenerateColumns="False">
    <MasterTableView AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" CommandItemDisplay="Top" DataSourceID="ObjectDataSource1">
        <CommandItemSettings ShowAddNewRecordButton="false" />
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                <ItemStyle CssClass="MyImageButton" />
            </telerik:GridEditCommandColumn>
            <telerik:GridDropDownColumn DataField="AddressType" DataSourceID="objectDataSource1"
                HeaderText="Category" ListTextField="AddressType" ListValueField="AddressType"
                UniqueName="AddressType">
            </telerik:GridDropDownColumn>
            <telerik:GridDropDownColumn DataField="CategoryType" DataSourceID="objectDataSource1"
                HeaderText="CategoryType" ListTextField="CategoryType" ListValueField="CategoryType"
                UniqueName="CategoryType">
            </telerik:GridDropDownColumn>
            <telerik:GridDateTimeColumn DataField="NotificationDate" HeaderText="NotificationDate"
                UniqueName="NotificationDate" />
            <telerik:GridCheckBoxColumn DataField="NoticeOfReceipt" UniqueName="NoticeOfReceipt"
                HeaderText="NoticeOfReceipt" />
            <telerik:GridBoundColumn DataField="id" HeaderText="id" SortExpression="id" UniqueName="id" />
            <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                UniqueName="DeleteColumn">
                <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
            </telerik:GridButtonColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

 

and this is my datasource

<asp:ObjectDataSource ID="objectDataSource1" TypeName="ESTV.A3.Logic.AddressCaseRelationBll" SelectMethod="Select" UpdateMethod="Update" DeleteMethod="Delete"
    runat="server">
    <SelectParameters>
        <asp:QueryStringParameter Name="addressId" Type="String" Direction="Input" QueryStringField="id">
        </asp:QueryStringParameter>
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="id" Type="String" Direction="Input" />
        <asp:Parameter Name="NotificationDate" Type="DateTime" />
        <asp:Parameter Name="NoticeOfReceipt" Type="Boolean" />
        <asp:Parameter Name="AddressType" Type="String" />
        <asp:Parameter Name="CategoryType" Type="String" />
    </UpdateParameters>
    <DeleteParameters>
        <asp:Parameter Name="id" Type="String"/>
    </DeleteParameters>
</asp:ObjectDataSource>

in my DAO i have for the delete method the following code

public void Delete(string id)
{
    Guid guidId = new Guid(id);
    AddressCaseRelation addressCaseRelation = entityDao.GetById(guidId);
    entityDao.Delete(addressCaseRelation);
    entityDao.CommitChanges();
}

Regards

Pavlina
Telerik team
 answered on 16 Feb 2012
3 answers
169 views
I have a usercontrol with a public property that I'm trying to set using Eval with a databound Radgrid.

I'm trying to set the Acc Property to Eval("Acc").  It just won't stick.  By the time the usercontrol is loaded the property has been reset.

In the usercontrol, the property is just defined.  It's never set and has no default value.  I've tried to set it in the codebehind in the expand event of the nested view, and it still doesn't stick.

I've resorted to set it in the control itself with.

Acc = DirectCast(DirectCast(Me.Parent.Parent, Telerik.Web.UI.GridTableCell).Parent, Telerik.Web.UI.GridNestedViewItem).ParentItem.GetDataKeyValue("Acc")

Which I don't want to do because this control won't only be used in the gridview.  I'll handle those cases later, for now I just want to get this part working.  The markup is pasted below.  thanks.

<telerik:RadGrid ID="rgdQueue" runat="server" CellSpacing="0" DataSourceID="dsQueue"
    AllowFilteringByColumn="True" GridLines="None" AllowPaging="true" AllowSorting="true">
    <MasterTableView AutoGenerateColumns="False" DataSourceID="dsQueue" DataKeyNames="Acc">
        <NestedViewTemplate>
            <table style="width: 100%;">
                <tr>
                    <td>
                        <span style="font-size: 18pt; color: #010101; line-height: 30px;">Report</span>
                    </td>
                </tr>
                <tr>
                    <td style="width: 100%;">
                        <div style="border: 1px solid gray; padding-left: 25px; padding-right: 10px; padding-top: 10px;
                            padding-bottom: 10px;">
                            <%# Eval("OriginalReport") %>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <%# Eval("Acc") %>
                        <uc4:PeerReview Acc='<%# Eval("Acc") %>' ID="PRNested" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnSave" runat="server" Text="Save" CausesValidation="true" OnClick="btnSave_Click" ValidationGroup='<%# Eval("Acc") %>' />
                        <asp:Button ID="btnSign" runat="server" Text="Sign" CausesValidation="true" ValidationGroup='<%# Eval("Acc") %>' />
                        <asp:Button ID="btnNext" runat="server" Text="Next" OnClick="btnNext_Click" CausesValidation="false" />
                    </td>
                </tr>
            </table>
        </NestedViewTemplate>
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>          
            <telerik:GridTemplateColumn DataField="QueueDate" FilterControlAltText="View Peer Review History"
                HeaderText="Date Added to Queue" SortExpression="QueueDate" UniqueName="QueueDate">
                <ItemTemplate>
                    <asp:Label ID="QueueDateLabel" runat="server" Text='<%# ConvertDateToInternational(Eval("QueueDate")) %>'></asp:Label>
                </ItemTemplate>
                <FilterTemplate>
                    <telerik:RadComboBox ID="rcbHistoryFilter" runat="server" OnSelectedIndexChanged="rcbHistoryFilterr_SelectedIndexChanged"
                        OnDataBound="rcbHistoryFilter_DataBound" Width="120" DataSourceID="dsQueueHistory"
                        DataTextField="Text" AutoPostBack="true" DataValueField="Months">
                    </telerik:RadComboBox>
                </FilterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Images" UniqueName="Images">
                <ItemTemplate>
                    <asp:Image Style="border-style: none;" ID="imgViewImages" Acc='<%# Eval("Acc") %>'
                        PatID='<%# Eval("PatientID") %>' SiteCode='<%# Eval("SiteCode") %>' Width="20"
                        Height="20" ImageUrl="../images/workstation.jpg" runat="server"></asp:Image>
                </ItemTemplate>
                <FilterTemplate>
                </FilterTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
</telerik:RadGrid>

Veli
Telerik team
 answered on 16 Feb 2012
5 answers
214 views
Hello,

For client-side binding, it doesn't seem like it uses the <AppointmentTemplate>; is there a template it can use on client-side, or pretty much to display a custom template I need to create it programmatically through the AppointmentDataBound event?

Thanks.
Peter
Telerik team
 answered on 16 Feb 2012
1 answer
131 views
Hi Telerik,

To reproduce the scenario:

1. Create a .aspx page.
2. Add one script manager.
3. Add one update panel.
4. Add two buttons A and B (or whatever other controls to make postbacks) and one RadGrid inside the update panel.
5. Configure the grid to show some items in a column template. Configure the data binders.
6. Add a RadSocialShare control in the column template (to show for each item).
7. Configure the RadSocialShare control with some buttons (facebook, twitter, etc). Important: Do not add the SendEmail button yet!
8. Configure the two buttons A and B added in number 4. Do some kind of task to change the grid (sort, filter, ...). 
9. Run the page and you will see that everything is Ok. Buttons A and B, grid and social share buttons are working.
--> Now the BUG
10. Add the SendEmail button to the RadSocialShare control and run the page. The two buttons A and B don't work anymore. It seems that the autogenerated form for the SendEmail button generates some kind of js conflict. The error message follows.

(Error displayed in Chrome's dev tools):

Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Impossible d'annuler l'inscription de UpdatePanel avec l'ID '', car il n'était pas inscrit auprès de ScriptManager. Cela peut se produire si UpdatePanel a été supprimé de l'arborescence du contrôle et rajouté ensuite, ce qui n'est pas pris en charge.
 
Nom du paramètre : updatePanel
Sys.WebForms.PageRequestManager._endPostBackTelerik.Web.UI.WebResource.axd:15
Sys.WebForms.PageRequestManager._parseDeltaTelerik.Web.UI.WebResource.axd:15
Sys.WebForms.PageRequestManager._onFormSubmitCompletedTelerik.Web.UI.WebResource.axd:15
(anonymous function)Telerik.Web.UI.WebResource.axd:6
(anonymous function)Telerik.Web.UI.WebResource.axd:6
Sys.Net.WebRequest.completedTelerik.Web.UI.WebResource.axd:6
_onReadyStateChange
 
Thanks,

John.
Marin Bratanov
Telerik team
 answered on 16 Feb 2012
5 answers
115 views
ChartSeries objSeriesActual = new ChartSeries("Actual", ChartSeriesType.Bar);
foreach (FinanceData objFinanceData in actualFinanceDataList)
{
    objSeriesActual.AddItem(objFinanceData.Revenue, objFinanceData.Revenue.ToString());
}
 
 
ChartSeries objSeriesBudget = new ChartSeries("Budget", ChartSeriesType.Bar);
foreach (FinanceData objFinanceData in budgetFinanceDataList)
{
    objSeriesBudget.AddItem(objFinanceData.Revenue, objFinanceData.Revenue.ToString());
}
 
 
revenueFinanceChart.Series.Add(objSeriesActual);
revenueFinanceChart.Series.Add(objSeriesBudget);
revenueFinanceChart.DataBind();

Dear Telerik,

I have made a chart that displays two series of actual and budget finance data for some companies. I would like to now replace the xaxis labels 1, 2, 3 etc underneath the bars with the name of the companies. I want this to be picked up from the financedata lists such as
using objSeriesActual.PlotArea.XAxis.AxisLabel.TextBlock.Text = objFinanceData.Name but this does not work; reference to object not found.
How can I accomplish this?
Evgenia
Telerik team
 answered on 16 Feb 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?