Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
149 views
Hi, I am using load on demand because my database is slow and i don't want to preload all my combo boxes when the page first initializes.

The load on demand for the radcombobox almost works except:
1) I can't turn off text typing
2) The loaded options don't cache. Each time I refresh the radcombobox, the loaded combobox items are gone and when i focus on the combobox the 'loading...' happens again.

So basically I just want a regular combobox with some items that only load on the first use of the combobox and then are cached for the lifetime of the page. Is it possible?

Here is a code snippet:

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Button1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadComboBox1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
  
<telerik:RadComboBox ID="RadComboBox1" Runat="server" 
    ChangeTextOnKeyBoardNavigation="False" EmptyMessage="Select A Company..." 
    EnableItemCaching="True" EnableLoadOnDemand="True" EnableTextSelection="False" 
    onitemsrequested="RadComboBox1_ItemsRequested" >
</telerik:RadComboBox>
Princy
Top achievements
Rank 2
 answered on 15 Nov 2010
0 answers
125 views
my RadScheduler code is below. when i am click for create appointment then i want to fill dropdown list from server side(database)
and my dropdown list is in ."InlineInsertTemplate". i can not get onclick event of InlineInsertTemplate.

<telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Office2007" EnableEmbeddedSkins="True"
        ShowFooter="true" DayStartTime="08:00:00" DayEndTime="16:59:00" TimeZoneOffset="00:00:00"
        OverflowBehavior="Scroll" SelectedView="MonthView" Height="550px" DataSourceID="SchdulerDataSource"
        OnAppointmentInsert="RadScheduler1_AppointmentInsert" TimelineView-UserSelectable="false"
        FirstDayOfWeek="Monday" LastDayOfWeek="Saturday" CustomAttributeNames="Description,Date,AppointmentId"
        DataStartField="Start" DataSubjectField="Subject" DataKeyField="AppointmentId"
        DataEndField="End" Width="100%" AllowDelete="true" RowHeight="50px" DisplayDeleteConfirmation="true"
        StartEditingInAdvancedForm="False" OnAppointmentDelete="RadScheduler1_AppointmentDelete"
        OnAppointmentCommand="RadScheduler1_AppointmentCommand" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
        OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" MinutesPerRow="15"
        MonthView-VisibleAppointmentsPerDay="4" DayView-DayEndTime="16:59:00" OnAppointmentClick="RadScheduler1_OnAppointmentClick">
       <InlineInsertTemplate>
            <div>
                <table width="100%" cellpadding="3" align="center">
                    <tr>
                        <td align="left" valign="middle" width="30%">
                            <asp:Label ID="Label3" runat="server" Text="Title"></asp:Label>
                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" Display="Dynamic"
                                ControlToValidate="txtTitle">*</asp:RequiredFieldValidator>
                        </td>
                        <td align="left" valign="middle" width="70%">
                            <asp:TextBox ID="txtTitle" Text='<%# Bind("Subject") %>' runat="server" CssClass="txtfield"
                                Width="166px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle">
                            <asp:Label ID="Label1" runat="server" Text="Description"></asp:Label>
                        </td>
                        <td align="left" valign="middle">
                            <asp:TextBox ID="txtDescription" Text='<%# Bind("Description") %>' runat="server"
                                Width="166px" TextMode="MultiLine" BorderStyle="Solid" BorderWidth="1px" BorderColor="#666666"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle">
                            <asp:Label ID="Label5" runat="server" Text="Coder"></asp:Label>
                        </td>
                        <td align="left" valign="middle">
                            <asp:DropDownList id="drpcoder" runat="server" DataSourceID="DSGetCoder" DataTextField="UserNameNew" DataValueField="UserID">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    
                    
                    <tr>
                     
                        <td align="left" valign="middle">
                            <asp:Label ID="Label2" runat="server" Text="From"></asp:Label>
                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" Display="Dynamic"
                                ControlToValidate="picFrom">*</asp:RequiredFieldValidator>
                        </td>
                        <td align="left" valign="middle">
                             <telerik:RadDateTimePicker SelectedTime="08:00" SelectedDate='<%# Bind("Start")%>'  ID="picFrom" runat="server"
                                Width="170px" Calendar-AutoPostBack="false"  >
                                <ClientEvents OnDateSelected="DateSelected" OnPopupOpening="PopupOpening" />
                           </telerik:RadDateTimePicker>
                                
                
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle">
                            <asp:Label ID="Label4" runat="server" Text="To"></asp:Label>
                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" Display="Dynamic"
                                ControlToValidate="picTo">*</asp:RequiredFieldValidator>
                        </td>
                        <td align="left" valign="middle">
                            <telerik:RadDateTimePicker SelectedDate='<%# Bind("Start")%>' SelectedTime="08:00"  ID="picTo" runat="server"
                                Width="170px" Calendar-AutoPostBack="false" >
                                <ClientEvents OnDateSelected="DateSelected2" OnPopupOpening="PopupOpening2" />
                               <%--<TimeView CellSpacing="-1" runat="server" StartTime="07:00" EndTime="23:00" Interval="0:15:0" Columns="6" OnClientTimeSelected="ClientTimeSelected"></TimeView>--%>
                            </telerik:RadDateTimePicker>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle" colspan="2" height="20">
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle">
                        </td>
                        <td align="left" valign="middle">
                            <asp:LinkButton runat="server" ID="InsertLinkButton" CommandName="Insert" Text="Insert"></asp:LinkButton>
                            &nbsp;
                            <asp:LinkButton runat="server" ID="CancelLinkButton" CommandName="Cancel" CausesValidation="false"
                                Text="Cancel"></asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </div>
        </InlineInsertTemplate>
           <InlineEditTemplate>
            <div>
                <table width="100%" cellpadding="3" align="center">
                    <tr>
                        <td align="left" valign="middle" width="30%">
                            <asp:Label ID="Label3" runat="server" Text="Title"></asp:Label>
                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" Display="Dynamic"
                                ControlToValidate="txtTitle">*</asp:RequiredFieldValidator>
                        </td>
                        <td align="left" valign="middle" width="70%">
                            <asp:TextBox ID="txtTitle" Text='<%# Bind("Subject") %>' CssClass="txtfield" runat="server"
                                Width="166px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle">
                            <asp:Label ID="Label1" runat="server" Text="Description"></asp:Label>
                        </td>
                        <td align="left" valign="middle">
                            <asp:TextBox ID="txtDescription" Text='<%# Bind("Description") %>' runat="server"
                                Width="166px" BorderStyle="Solid" BorderWidth="1px" BorderColor="#666666" TextMode="MultiLine"></asp:TextBox>
                        </td>
                    </tr>
                     <tr>
                        <td align="left" valign="middle">
                            <asp:Label ID="Label5" runat="server" Text="Coder"></asp:Label>
                        </td>
                        <td align="left" valign="middle">
                            <asp:DropDownList id="drpcoder" runat="server"></asp:DropDownList>
                            
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle">
                            <asp:Label ID="Label2" runat="server" Text="From"></asp:Label>
                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" Display="Dynamic"
                                ControlToValidate="picFrom">*</asp:RequiredFieldValidator>
                        </td>
                        <td align="left" valign="middle">
                            <telerik:RadDateTimePicker ID="picFrom" DbSelectedDate='<%# Bind("Start") %>' runat="server"
                                Width="170px">
                            </telerik:RadDateTimePicker>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle">
                            <asp:Label ID="Label4" runat="server" Text="To"></asp:Label>
                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" Display="Dynamic"
                                ControlToValidate="picTo">*</asp:RequiredFieldValidator>
                        </td>
                        <td align="left" valign="middle">
                            <telerik:RadDateTimePicker ID="picTo" DbSelectedDate='<%# Bind("End") %>' runat="server"
                                Width="170px" Calendar-AutoPostBack="false">
                            </telerik:RadDateTimePicker>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle" colspan="2" height="20">
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle">
                        </td>
                        <td align="left" valign="middle">
                            <asp:LinkButton runat="server" ID="InsertLinkButton" CommandName="Update" Text="Update"></asp:LinkButton>
                            &nbsp;
                            <asp:LinkButton runat="server" ID="CancelLinkButton" CommandName="Cancel" CausesValidation="false"
                                Text="Cancel"></asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </div>
        </InlineEditTemplate>
        <AppointmentTemplate>
            <div class="rsAptSubject">
                <strong>
                    <%# Eval("Subject")%></strong>
            </div>
        </AppointmentTemplate>
        <TimelineView UserSelectable="false" />
    </telerik:RadScheduler>
Shoqeen
Top achievements
Rank 1
 asked on 15 Nov 2010
6 answers
534 views
I have a radtreeview as a template item of a radcombobox.  I populate the treeview, select the proper treenode and set the text of the combobox in codebehind on the page load.  However, I can't seem to scroll either the combobox or the treeview to display the selected node. 

I have tried executing a javascript on page load using the selectednode.scrollintoview() method, but that doesn't help

For example, ff you look at your Travelissimo demo (http://demos.telerik.com/ASPNET/Prometheus/TreeView/Examples/Functionality/TreeViewComboBox/DefaultCS.aspx) , select Santiago from the dropdown and then click submit.  After the postback,  use the dropdown again.  You'll see that Santiago is selected, but you have to scroll to see it.    You'll notice that the scroll position is maintained if there is no postback.  My goal is to have Spain visible when the user clicks the dropdown following a postback.

Any suggestions ?

Nikolay Tsenkov
Telerik team
 answered on 15 Nov 2010
1 answer
112 views

Hi,

I have one telerik rad grid.Using a method i am filling the grid.I have enabled paging property.I have used itemtemplate-->ImageButton for delete and edit options.I have set page size as 10.Page load time it is working properly and populating the grid.After inserting 11 th row the pagination starts and it will show in next page with one record.But when i am deleting the 11th row the grid become blank.I have used dataset to bind the records. radgrid.DataBind(); dsDataset.Dispose();. But its item.count is 0. What is the reason?

Here is my code:---

SqlHelper objSQL = new SqlHelper();
                DataSet dsPackage = new DataSet();
                dsPackage = objSQL.ExecuteDataset("AL_PackageType_List_Retrieve",
                                                 objUtl.NumericEntry(Session["LocationId"].ToString()));
                gvPackage.DataSource = dsPackage.Tables[0];

//Here i can see the number of rows.Total 10
                gvPackage.Rebind();
                //dsPackage.Dispose();
                if (gvPackage.Items.Count <= 0)
                {
                    lblMessage.Text = "No Package Details Found...";
                    gvPackage.Visible = false;
                }
                else
                {
                    gvPackage.Visible = true;
                }

Thank you

Shinu
Top achievements
Rank 2
 answered on 15 Nov 2010
1 answer
47 views
Shinu
Top achievements
Rank 2
 answered on 15 Nov 2010
2 answers
311 views
I'm new to ASP.NET, so bear with me.

I'm trying to implement a Captcha control.  Following the instructions in your demo I added the control, activated the handlers via the smart tags in web.config, set a couple of properties and tried to test.  The application failed with the error:

'System.InvalidOperationException = {"'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScript.'

Previous code has already added an HTTP Handler with the same path and verb.  My HTTPHandlers section looks like:
    <httpHandlers>
      <remove verb="*" path="*.asmx" />
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" validate="false" />
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.CaptchaImageHandler" verb="*" validate="false" />
    </httpHandlers>

This means that the last Handler wins (or so I understand from http://msdn.microsoft.com/en-us/library/7d6sws33.aspx ).  Reversing the order of these handlers gives me an error relating to the loading of the captcha control itself.

so: 
1) What am I doing wrong if anything?
2) Is the 2nd path as shown above correct? If not what should it be? If it is, can I combine these two statements and if so how?

Hitesh
Top achievements
Rank 1
 answered on 15 Nov 2010
1 answer
144 views
Hi,
I am adding couple of buttons in a panel (Panel1) in default.aspx, I want to ajaxify the application by setting these dynamic buttons as triggers to update panel3 and Panel 4 in default.aspx page. I used following approach, but it didnot help. Can someone point  me what I am missing.
Thanks,
Prava


 

Panel
  
   
  
  
  
drilPanel = (Panel)WIMProject.ParentPage.FindControl("DrillBtnsPanel");
for
  
   
  
(int i = 0; i < rows.Count; i++) 
   
  
{
  
   
  
  
  
Button drillButton = new Button(); 
   
  
drillButton.ID = rows[i][
  
  
  
"relatename"].ToString(); 
   
  
drillButton.Text = rows[i][
  
  
  
"relatename"].ToString(); 
   
  
drillButton.CssClass = 
  
  
  
"DrillBtn"
   
  
drillButton.Click+=
  
  
  
new EventHandler(DrillButton_Click); 
   
  
drillPanel.Controls.Add(drillButton);
  
   
  
   
  
  
  
   
  
Panel dataEditPanel = (Panel)WIMProject.ParentPage.FindControl("DataEditPanel"); 
   
  
   
  
  
  
Panel drillCounterPanel = (Panel)WIMProject.ParentPage.FindControl("DrillCounterPanel"); 
   
  
   
  
  
  
// Create the ajax setting 
   
  
  
  
Telerik.Web.UI.
  
AjaxSetting searchAjaxSetting = new Telerik.Web.UI.AjaxSetting(); 
   
  
searchAjaxSetting.AjaxControlID = drillButton.UniqueID;
  
   
  
  
  
// Create the updated control 
   
  
  
  
Telerik.Web.UI.
  
AjaxUpdatedControl searchUpdatedControl = new Telerik.Web.UI.AjaxUpdatedControl(); 
   
  
searchUpdatedControl.ControlID = dataEditPanel.UniqueID;
  
   
  
  
  
// Create the updated control 
   
  
  
  
Telerik.Web.UI.
  
AjaxUpdatedControl searchUpdatedControl2 = new Telerik.Web.UI.AjaxUpdatedControl(); 
   
  
searchUpdatedControl2.ControlID = drillCounterPanel.UniqueID;
  
   
  
   
  
  
  
// Add the updated control to the setting 
   
  
  
  
searchAjaxSetting.UpdatedControls.Add(searchUpdatedControl);
  
   
  
// Add the updated control to the setting 
   
  
  
  
searchAjaxSetting.UpdatedControls.Add(searchUpdatedControl2);
  
   
  
// Add the setting to the ajax manager 
   
  
  
  
   
  
RadAjaxManager radAjaxManager1 = (RadAjaxManager)WIMProject.ParentPage.FindControl("RadAjaxManager1"); 
   
  
radAjaxManager1.AjaxSettings.Add(searchAjaxSetting);

 

Maria Ilieva
Telerik team
 answered on 15 Nov 2010
2 answers
48 views
Hi,

I want to remove the raddateinput validation image(with an "!" mark) which displays inside the input box when user input an invalid date, since i am using a custom validator.I want to remove that feature. Is there any way to do so?

Thanks !
Prasad
Top achievements
Rank 1
 answered on 15 Nov 2010
2 answers
252 views
Hi
How can I find Selected Row in telerik grid

How Can i selected perticular row

Suggest me the event name for selected row  in telerik rad grid control




  
samarth
Top achievements
Rank 1
 answered on 15 Nov 2010
2 answers
81 views
Hello,

I was trying to sort items while LoadOnDemand property set to true.
I put the SortItems() method inside the ItemsRequested event handler and set the Sort="Ascending" but nothing happend.
do i miss something?

I would like to sort the items during i load on demand is true.

Thanks
Oren
Princy
Top achievements
Rank 2
 answered on 15 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?