Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
405 views
hi,

I have RadTimePicker, and i need to forbid posting back when time is picked, so I have decided to use RadAjaxManager, now when I have use it and select time picker to update it self, I got this error in my other jquery/ javascript when I am getting ID of server controls client id:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

so what do I do to take out this error? or how do I prevent post back for time picker when time is selected?


skimad
Top achievements
Rank 1
 answered on 02 Aug 2012
1 answer
106 views

Hi,

I am trying to get the selected time range for a new appointment and am getting incorrect information passed into the OnClientAppointmentInserting method.  As shown in the screen shot "appointment selection.jpg" I select a time period of 10:30 am to 12:30 pm, I then right click and select new appointment.  When the OnClientAppointmentInserting method is fired the start time is now 12:00 pm and the end time is now 12:15 pm (see "timeslot.jpg").

Am I missing something or is this an issue with the OnClientAppointmentInserting event?

Thanks

Gavin.

Here is my code

<telerik:RadScheduler ID="rsAppointments" runat="server" 
                DataEndField="AppointmentEndDate" 
                DataKeyField="PatientAppointmentID"
                DataStartField="AppointmentStartDate"
                DataSubjectField="AppointmentTypeID"
                DataDescriptionField="AppointmentTypeID"
                Height="600px" MinutesPerRow="15" 
                onnavigationcomplete="rsAppointments_NavigationComplete"
                OnClientAppointmentInserting="OnInsertAppointment"
                OnClientAppointmentEditing="OnEditAppointment"
                GroupBy="Clinicians" 
                onappointmentcreated="rsAppointments_AppointmentCreated" 
                onappointmentupdate="rsAppointments_AppointmentUpdate" 
                onappointmentdelete="rsAppointments_AppointmentDelete">
                <TimelineView UserSelectable="False" />
                <ResourceTypes>
                    <telerik:ResourceType Name="Clinicians" KeyField="UserID" TextField="ClinicianName" ForeignKeyField="ClinicianID" />
                </ResourceTypes>
                <AppointmentTemplate>
                    <table border="0" cellpadding="3" cellspacing="0" width="100%">
                        <tr>
                            <td style="border: none;" rowspan="2"><asp:Literal ID="litContent" runat="server"></asp:Literal></td>
                        </tr>
                    </table>
                </AppointmentTemplate>
                <AppointmentContextMenuSettings EnableDefault="true" />
                <TimeSlotContextMenuSettings EnableDefault="true" />
            </telerik:RadScheduler>
function OnInsertAppointment(sender, args)
{
    var slot = args.get_targetSlot();
    var dteStart = slot.get_startTime();
    var dteEnd = slot.get_endTime();
    var res = slot.get_resource();
    var resourceID = res.get_key();
    var oManager = GetRadWindowManager();
    var oWnd = oManager.getWindowByName("rwAppointment");
    var URL = "AppointmentEdit.aspx?mode=insert&start=" + dteStart.toString("dd/MM/yyyy HH:mm:ss tt") +
              "&end=" + dteEnd.toString("dd/MM/yyyy HH:mm:ss tt") +
                        "&cID=" + resourceID +
                        "&pid=" + <%= PatientID %>;
    oWnd.setUrl(URL);
    oWnd.show();
    args.set_cancel(true);
}
Plamen
Telerik team
 answered on 02 Aug 2012
1 answer
80 views
How can I call a radajaxmanager from the code behind so that the radgrid uses it?
Eyup
Telerik team
 answered on 02 Aug 2012
1 answer
116 views
IS there any way to disable the onMouseOver event on RadSeperator?
<telerik:RadMenuItem runat="server" IsSeparator="True" />
We have declared onMouseover on the RadMenu.. this gets fired on all RadMenuItems. But i dont want this to be enabled on the Seperator items
Kate
Telerik team
 answered on 02 Aug 2012
5 answers
223 views
Hello,

Within the AppointmentInsert or AppointmentUpdate event handler, how can I get ASP.NET control references from an advanced form edit/insert template?  I need to find an ASP.NET control in the template within these two events only, and use its value for save.

Thanks.
Peter
Telerik team
 answered on 02 Aug 2012
0 answers
103 views
Hello,

I am working on an ASP.Net page (using VB) that dynamically builds a table and form.  When the page loads and it's building the form and table there are a series of controls that I'm trying to create and add to an Ajax Manager (that is also created in code) but when I'm trying to do an AjaxManager.AjaxSettings.AddAjaxSetting(oCheckbox, oRadTextBox) I get an error:

ArgumentNullException was unhandled by user code.
Value cannot be null.
Parameter name: page

I was doing some research into the problem and found this post:
http://www.telerik.com/community/forums/aspnet-ajax/ajax/problem-when-using-radajaxmanager-in-umbraco.aspx 

At the end of the post Maria Ilieva was following up with the original poster and said something about MasterPages and how the ajax manager is placed.  I'm using master pages so I suspect that's my problem.  The master page is very simple and has nothing more than formatting, style statements, logos, etc.  The web form that uses the master page is where the ajax manager resides.  I've paraphrased a stripped down simple version of the code here so you can see what I'm doing.  I'm creating two controls, adding them to cells to a row and table then trying to add them to the ajax manager.

oCheckbox.ID = "chk1"
oCheckbox.AutoPostBack = True
oCell.Controls.Add(oCheckbox)
oRow.Cells.Add(oCell)
oRadTextBox.ID = "txtSerial"
oCell.Controls.Add(oRadTextBox)
oRow.Cells.Add(oCell)
oTable.Rows.Add(oRow)
 
oAjaxManager.AjaxSettings.AddAjaxSetting(oCheckbox, oRadTextBox)

The ArumentNullException error occurs on the last statement with the AddAjaxSetting method.  How am I supposed to be calling this from the web form when using master pages?
Tim
Top achievements
Rank 1
 asked on 02 Aug 2012
3 answers
107 views
Hi All,
I am developing product using asp.net c sharp.I have method name is public List<Role> GetRoles(int UserId) and this method return list of Roles which is assigned user. I need to write or create xml file for user Roles to build menu control from xml file.

That means,
1.How to write list of Roles in xml file from returning list of Roles by this method?
2.How to build menu control from xml file?

Thanks in Advance...!
Peter
Telerik team
 answered on 02 Aug 2012
1 answer
162 views

Grid is displaying an empty column and row. I have tried setting the width of the grid to exactly the width of the column widths combined, however, this results in a horizontal scroll which is not desired unless the columns get resized. In addition, even when I made the grid exactly the size of the column widths combined the empty column and row still appeared. The only column sizing I do in the C# code behind is to set the filter text box size (which is 25px less than the column width).

 

protected void RadGridAggressiveMatches_ItemCreated(object sender, GridItemEventArgs e)

{

if (e.Item is GridFilteringItem)

{

GridFilteringItem filteringItem = e.Item as GridFilteringItem;

 //set dimensions for the filter textbox
TextBox box = filteringItem["Column1"].Controls[0] as TextBox;
box.Width = Unit.Pixel(50);

box = filteringItem["Column2"].Controls[0] as TextBox

box.Width = Unit.Pixel(50);

box = filteringItem["Column3"].Controls[0] as TextBox;

box.Width = Unit.Pixel(175);

box = filteringItem["Column4"].Controls[0] as TextBox;

box.Width = Unit.Pixel(175);

box = filteringItem["Column5"].Controls[0] as TextBox;

box.Width = Unit.Pixel(175);

box = filteringItem["Column6"].Controls[0] as TextBox;

box.Width = Unit.Pixel(175);

box = filteringItem["Column7"].Controls[0] as TextBox;

box.Width = Unit.Pixel(15);

box = filteringItem["Column8"].Controls[0] as TextBox;

box.Width = Unit.Pixel(45);

}

}

 
<telerik:RadGrid ID="RadGridAggressiveMatches" runat="server" Width="1100px" Height="250px" DataMember="Aggressive Members"

 GridLines="None"

 AllowSorting="True"

 ShowFooter="True"

 Skin="Office2007"

 AutoGenerateColumns="False"

 AllowFilteringByColumn="True"

 onitemcreated="RadGridAggressiveMatches_ItemCreated"

 onselectedindexchanged="RadGridAggressiveMatches_SelectedIndexChanged"

 onsortcommand="RadGridAggressiveMatches_SortCommand"

 onneeddatasource="RadGridAggressiveMatches_NeedDataSource" >

 <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="true">

 <Selecting AllowRowSelect="True" />  

 <Scrolling AllowScroll="true" />

 <Resizing AllowColumnResize="true" AllowRowResize="true" ResizeGridOnColumnResize="false" />

 </ClientSettings>

 <MasterTableView TableLayout="Fixed" AllowFilteringByColumn="true" >

 <Columns>

 <telerik:GridBoundColumn UniqueName="Column1" DataField="Column1" HeaderText="Column 1" DataType="System.Int32"

 SortExpression="Column1" AllowFiltering="true" AutoPostBackOnFilter="false">

 <HeaderStyle Width="75px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column2" DataField="Column2" HeaderText="Column 2" DataType="System.Int32" SortExpression="Column2">
<HeaderStyle Width="75px" />
<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column3" DataField="Column3" HeaderText="Column 3" DataType="System.String"

 SortExpression="Column3">

 <HeaderStyle Width="200px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column4" DataField="Column4" HeaderText="Column 4" DataType="System.String"

 SortExpression="Column4">

 <HeaderStyle Width="200px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column5" DataField="Column5" HeaderText="Column 5" DataType="System.String" SortExpression="Column5">

 <HeaderStyle Width="200px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column6" DataField="Column6" HeaderText="Column 6" DataType="System.String" SortExpression="Column6">

 <HeaderStyle Width="200px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridBoundColumn UniqueName="Column7" DataField="Column7" HeaderText="Col 7" DataType="System.Int32" SortExpression="Column7">

 <HeaderStyle Width="40px" />

 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 Font-Strikeout="False" Font-Underline="False" Wrap="False" />

 </telerik:GridBoundColumn>

 <telerik:GridTemplateColumn UniqueName="Column8" HeaderText="Column 8" SortExpression="Column8">

 <HeaderStyle Width="70px" />

 <ItemTemplate>

 <asp:RadioButtonList ID="RadionButtonListDecision" runat="server" RepeatDirection="Vertical">

 <asp:ListItem Value="1" Text="Yes"></asp:ListItem>

 <asp:ListItem Value="2" Text="No"></asp:ListItem>

 </asp:RadioButtonList>

 </ItemTemplate>

 </telerik:GridTemplateColumn>

 </Columns>

 </MasterTableView>

 <FilterMenu Skin="Office2007" EnableTheming="True">

 <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 </FilterMenu>

 </telerik:RadGrid>

How do I get rid of the empty column and row?

Tsvetina
Telerik team
 answered on 02 Aug 2012
6 answers
67 views
I have scheduler with many resource types and custom attributes in an advanced insert template. It seems to work well creating one. When I try the recurrence it still only creates one... no errors just does not do more than one.... is there anything special for the resource types or custom attributed needed?
Peter
Telerik team
 answered on 02 Aug 2012
2 answers
97 views
Hello.

I am a complete newbie using rad controls, and I am playing around with the captcha.
I can see in the documentation that I should be able to set the Font Warp to different levels, but I cannot find this property.
I have looked in the UI property pane.

Can you point me in the right direction?

best regards
Agge
Agge
Top achievements
Rank 1
 answered on 02 Aug 2012
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?