Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
109 views
Howdy,
I have a radmultipage with three pageviews.  There are several dropdownlists and textboxes on two of the pageviews.  I am having difficulty trying to get the validationsummary to display only what is on that pageview instead of the entire multipage.  I am using VS 2008 with the 2009.2.826.35 version of the Telerik controls.  Would someone have a suggestion on how to achieve this?

Thanks,
Alex
Alex
Top achievements
Rank 1
 answered on 03 Mar 2011
1 answer
79 views
Hi,
   I am yogesh. I am new to asp.net with C# and im working with asp.net ajax radgrid. i want to store image in radgrid column and then when i click select row in grid it should be displayed in then page imagebox... I tried but unable to get it....Could anyone send me the code snippet plz....if possible send sample project plz...
Daniel
Telerik team
 answered on 03 Mar 2011
4 answers
284 views
I recently downloaded the trial version Telerik RadControls for ASP.NET AJAX for evaluation, and am having a problem with the RadEditor. I am attempting to have a user edit content via the editor and then save the HTML content to the database for later use in another area of the website. I have tried searching and have come up with nothing, so I figured I would ask here.

Whenever the user clicks to save the content, the HTML content is not saved. Instead the text is saved and all of the "<br>" tags are replaced with "\n". I have looked multiple times and it looks like I'm referencing the HTML correctly so I don't know why I'm not getting the actual HTML content. Below is the code for my .aspx page:

<telerik:RadEditor ID="RadContentEditor" Runat="server" Width="100%" Height="350px">
    <Tools>
    <telerik:EditorToolGroup Tag="MainToolbar">
        <telerik:EditorTool Name="Print" ShortCut="CTRL+P" />
        <telerik:EditorTool Name="AjaxSpellCheck" />
        <telerik:EditorTool Name="FindAndReplace" ShortCut="CTRL+F" />
        <telerik:EditorTool Name="SelectAll" ShortCut="CTRL+A" />
        <telerik:EditorTool Name="Cut" />
        <telerik:EditorTool Name="Copy" ShortCut="CTRL+C" />
        <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" />
        <telerik:EditorToolStrip Name="PasteStrip">
        </telerik:EditorToolStrip>
        <telerik:EditorSeparator />
        <telerik:EditorSplitButton Name="Undo">
        </telerik:EditorSplitButton>
        <telerik:EditorSplitButton Name="Redo">
        </telerik:EditorSplitButton>
    </telerik:EditorToolGroup
    ******More tool groups here**********
</Tools>
<Content>
</Content>
<ImageManager UploadPaths="/BlastImages/" ViewPaths="/BlastImages/" />
<DocumentManager UploadPaths="/BlastDocuments/" ViewPaths="/BlastDocuments/" />
</telerik:RadEditor>
<br />
<table id="buttonTable" width="75%" align="center">
    <tr>
        <td style="width:50%; text-align:center;">
            <telerik:RadButton ID="saveContentButton" runat="server" ButtonType="LinkButton" OnClick="saveContentButton_OnClick" Text="Update Content">
                <Icon PrimaryIconCssClass="rbSave" />
            </telerik:RadButton>
        </td>
        <td style="width:50%; text-align:center;">
            <telerik:RadButton ID="cancelButton" runat="server" ButtonType="LinkButton" OnClick="cancelButton_OnClick" Text="Cancel">
                <Icon PrimaryIconCssClass="rbCancel" />
            </telerik:RadButton>
        </td>
    </tr>
</table>
<asp:SqlDataSource ID="sectionDS" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MyConnString %>" 
        SelectCommand="SELECT [Content].id, [Content].page_id, [Content].section_name, [Content].html_content FROM [Content] INNER JOIN Pages ON [Content].page_id = Pages.id WHERE [Pages].page_url=@page_url" >
    <SelectParameters>
        <asp:SessionParameter Name="page_url" SessionField="page_url" />
    </SelectParameters>
</asp:SqlDataSource>

And this is the code-behind which handles the actual insert into the database:

 

 

 

protected void saveContentButton_OnClick(object sender, EventArgs e)
{
     PageHelper ph = new PageHelper();
  
     try
     {
          string section_id = (string)Session[Constants.SESSION_SECTION_ID];
          string section_content = RadContentEditor.Content;
          ph.updateSectionContent(section_id, section_content);
                      
          Response.Redirect("~/Web/Admin/Content/ManagePageSections.aspx");
     }
     catch (Exception ex)
     {
         Response.Redirect("~/Errors/UnhandledException.htm");
     }
}

Andrew
Top achievements
Rank 1
 answered on 03 Mar 2011
0 answers
51 views
Hi All,

We deployed our usercontrols (Radgrid,Radtextboxes & button) on sharepoint 2010 site, & everything works fine.

Now testing team altered the viewstate value of controls through Fiddler and changed it with some junk characters, now after submitting the form to server, it throws Invalid JASON Primitive (server 500 error)

In web.config file, by default EnableViewStateMac is true.
Is it any way to restrict  users or any way to stop the postback,  if some one alters the viewstate to stop submiting  form to server.
naimish
Top achievements
Rank 1
 asked on 03 Mar 2011
3 answers
165 views
Hello!
I have a web service that returns a collection of anonymous types. Here is an example of something that works for me.

var allMyFoo = (from w in fooService.GiveMeFoo()
                 select new
                 {
                   ID = w.ID,
                   Foo = w.Foo.Name                        
                 });
 
var myFooCount = fooService.CountMyFoo();
return new Dictionary<string, object> {
  {"foo", allMyFoo},
  {"fooCount", myFooCount}
};

in aspx...

<telerik:GridBoundColumn UniqueName="FooName" SortExpression="Foo.Name" DataField="Foo" HeaderText="Foo" DataType="System.String">
</telerik:GridBoundColumn>
But this is what I wanted to do with bolded changes in code and aspx

var allMyFoo = (from w in fooService.GiveMeFoo()
                 select new
                 {
                   ID = w.ID,
                   Foo = new { Name = w.Foo.Name }
                 });
  
var myFooCount = fooService.CountMyFoo();
return new Dictionary<string, object> {
  {"foo", allMyFoo},
  {"fooCount", myFooCount}
};
 
in aspx...
 
<telerik:GridBoundColumn UniqueName="FooName" SortExpression="Foo.Name" DataField="Foo.Name" HeaderText="Foo" DataType="System.String">
</telerik:GridBoundColumn>

Could you tell me why the grid doesn't display the Name of Foo when I try the second example?
Marin
Telerik team
 answered on 03 Mar 2011
3 answers
484 views
Hello,

Our team is using the RadGrid component in one of our applications.  It has been working great so far.  Recently, a bug cropped up:

When clicking our "Export to Excel" button, nothing seems to happen any more.  Here is the code for our "export" button:

 

this.radGridLicenseTerms.ExportSettings.ExportOnlyData = true;

 

 

this.radGridLicenseTerms.ExportSettings.IgnorePaging = true;

 

 

this.radGridLicenseTerms.ExportSettings.OpenInNewWindow = true;

 

 

this.radGridLicenseTerms.ExportSettings.FileName = COMPANYCONTRACTS_EXPORTFILENAME;

 

 

this.radGridLicenseTerms.MasterTableView.ExportToExcel();

 


I've stepped through the code and it is successfully executing each step without any errors showing, but the download dialog is not showing up.

One other thing worth noting:  The checkboxes in the grid are disappearing after the button is clicked. Any help would be appreciated.

Jason
Daniel
Telerik team
 answered on 03 Mar 2011
3 answers
101 views
Hi,

I am looking for a way to add a checkbox "Show Weekend Days" in the Scheduler header Control.
This checkbox would control the weekend days visibility.

NB: This feature exists in the WinForm version

Thanks
Peter
Telerik team
 answered on 03 Mar 2011
1 answer
64 views
I've followed the example: http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx?product=grid#

pretty much verbatim and my RadToolTip in a RadGrid works like a charm in firefox.

The problem is the display does work right at all in IE8. The content of my user controls shows up but with no tooltip type border around it.

I've attached a screenshot of what I see in both Firefox and IE8 to show the difference.

Is there anything obvious that could cause this? (I'll work on getting my code in standalone test app that I can submit if need be)
Svetlina Anati
Telerik team
 answered on 03 Mar 2011
1 answer
35 views
Hello,

We are currently using the RadSplitter/RadSlidingPane in our application and need to add a "print" button that would allow our users to print the content contained within the RadSlidingPane.  I noticed that there is a print() function for RadPane, but there doesn't seem to be an analogous function for the RadSlidingPane.  Is there a different way to print this content?  Another option for us is to put the content in a div and print the div using JavaScript, but I wanted to make sure I didn't miss something.

Thanks!
Svetlina Anati
Telerik team
 answered on 03 Mar 2011
4 answers
191 views
Hello, I need to hide dynamically some resourceType in the advanced/edit form according to the accesses of the connected user. I use the event OnForm Created but i don't find the correct command to hide/delete some resourceType. Have you a solution because i don't want to create multi-template to edit/delete if it's possible...

(And eventually, have you an idea why <%# Eval("Description")%> doesn't work ?)

I thank you for your help

http://img692.imageshack.us/img692/6023/schedulerx.jpg

Here is my code :

<telerik:RadScheduler ID="RadScheduler1" runat="server" SkinID="Scheduler-FR" 
        DataKeyField="ID_Event" DataSubjectField="Subject" DataStartField="Start" DataEndField="End" 
        DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="ID_RecurrenceParent" 
        DataSourceID="EventsDataSource" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" 
        OnAppointmentCommand="RadScheduler1_AppointmentCommand"  
        OnAppointmentCreated="RadScheduler1_AppointmentCreated"  
        onformcreated="RadScheduler1_FormCreated"
        <AdvancedForm Modal="true" /> 
        <ResourceTypes> 
            <telerik:ResourceType KeyField="ID_TypeEvent" Name="TypeEvent" TextField="TypeName" ForeignKeyField="ID_TypeEvent" 
                DataSourceID="TypeEventDataSource" /> 
            <telerik:ResourceType KeyField="ID_Room" Name="Room" TextField="RoomName" ForeignKeyField="ID_Room" 
                DataSourceID="RoomsDataSource" /> 
            <telerik:ResourceType KeyField="ID_User" Name="User" TextField="LastName" ForeignKeyField="ID_User" 
                DataSourceID="UsersDataSource" /> 
            <telerik:ResourceType KeyField="ID_Promo" Name="Promo" TextField="PromoName" ForeignKeyField="ID_Promo" 
                DataSourceID="PromoDataSource" /> 
            <telerik:ResourceType KeyField="ID_Campus" Name="Campus" TextField="CampusName" ForeignKeyField="ID_Campus" 
                DataSourceID="CampusDataSource" /> 
        </ResourceTypes> 
        <AppointmentTemplate> 
             <asp:Label runat="server" ID="RecurrenceIcon" /> 
            <%# Eval("Subject") %><br /> 
            --------------------<br /> 
            <asp:Label runat="server" ID="lbl_TypeEvent" /><br /> 
            <asp:Label runat="server" ID="lbl_Room" /><br /> 
            <%# Eval("Description") %> 
            <div style="vertical-align:bottom; text-align: right;"
                <asp:Button runat="server" ID="ButtonExport" CssClass="rsExportButton" ToolTip="Exporter au format iCalendar" 
                CommandName="Export" OnClientClick="Export(this, event); return false;" Style="cursor: pointer; 
                cursor: hand;" /> 
            </div> 
        </AppointmentTemplate> 
        <TimeSlotContextMenuSettings EnableDefault="true" /> 
        <AppointmentContextMenuSettings EnableDefault="true" /> 
    </telerik:RadScheduler> 

    protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e) 
    { 
        RadScheduler scheduler = (RadScheduler) sender; 
        if (e.Container.Mode == SchedulerFormMode.Insert || e.Container.Mode == SchedulerFormMode.AdvancedInsert 
            || e.Container.Mode == SchedulerFormMode.Edit || e.Container.Mode == SchedulerFormMode.AdvancedEdit) 
        { 
 
            //ResourceType typeEvent = e.Appointment.Resources.GetResourceByType("TypeEvent"); 
            Resource typeEvent = e.Appointment.Resources.GetResourceByType("TypeEvent"); 
            Resource room = e.Appointment.Resources.GetResourceByType("Room"); 
            Resource user = e.Appointment.Resources.GetResourceByType("User"); 
            Resource promo = e.Appointment.Resources.GetResourceByType("Promo"); 
            Resource campus = e.Appointment.Resources.GetResourceByType("Campus"); 
            //ResourceCollection resourcecollection = e.Appointment.Resources.Remove(typeEvent); 
            //typeEvent.Available = false; 
            //ResourceData resourcedata = e.Appointment.Resources.Remove(typeEvent); 
        } 
    } 

Peter
Telerik team
 answered on 03 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?