Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
302 views
Hi

I recently upgraded to Q1 2009 version and everything seems to be going ok. However, my Loading panel now shows two loading images. I am using a custom image, so it shows that + the default loading image.

http://www.asingh.com/loading.png

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" 
    ClientEvents-OnRequestStart="userEditRequestStart" ClientEvents-OnResponseEnd="userEditRequestEnd" 
    Style="overflow: hidden" > 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"  Width="100%" Height="100%"
        <div class="loaderPanelStyle"
            <asp:Image ID="ajaxLoader" runat="server" SkinID="loaderGif" CssClass="loaderGifStyle" /> 
            <asp:Label ID="lblloader" runat="server" Text="Loading..." CssClass="loaderTextStyle"></asp:Label> 
        </div> 
    </telerik:RadAjaxLoadingPanel>    
<div id="formPanel"
<button>do postback</button> 
</div> 
 
</telerik:RadAjaxPanel> 

As you can see that the loading panel is inside a RadAjaxPanel. The button on line 11 (just there to explain this issue) does a postback. The userEditRequestStart function is called by the ClientEvents-OnRequestStart of the RadAjaxPanel. In this function, i hide the formPanel. At this point the only thing visible is the Loading Panel with my custom image. However it also dispays the default image as well.

Finally, the userEditRequestEnd method is called by ClientEvents-OnResponseEnd event and i show the formPanel.

Also, is there an easy way to show hide updating content while using the loading panel? e.g. tell the ajaxpanel the container id which will be hidden on postback and shown on completion without writing the javascript the way i have been?


Amar
Top achievements
Rank 1
 answered on 14 May 2009
2 answers
246 views

I am using a textboxes in a FormTemplate.  The regular textbox is styled by the grid skin; for some reason the multiline textbox is not styled and font is defaulting to courier.  I tried overriding the with local css:

  

.GridEditForm_Telerik textarea   border:1px solid #828282; font:12px arial,sans-serif; color:#272722;  }

 

 

 

Any ideas?

Version 2009.1.311.35

Sample code:

<EditFormSettings EditFormType="Template" CaptionDataField="ClientName" >
 <FormTemplate>
  <table cellpadding="5" cellspacing="1" width="800" border="0">
       <tr>                                                        
    <td>Address:</td>
    <td>
         <asp:TextBox ID="txt_Addr" runat="server" Text='<%# Bind( "Addr") %>'
                    TextMode="MultiLine" Rows="4" Width="300">
                                        </asp:TextBox>
                         </td>
         </tr>
   <tr>
    <td>City:</td>
    <td>
     <asp:TextBox ID="txt_City" runat="server" Text='<%# Bind( "City") %>' Width="300">
           </asp:TextBox>
             </td>
   </tr>
           </table>
 </FormTemplate>
</EditFormSettings>

dmc
Top achievements
Rank 1
 answered on 14 May 2009
3 answers
71 views
Hi,

I am using RadTreeView (AJAX) control. My scenario is such that, I am populating all treenodes at once and not using load-on-demand. Also 'Enabled' property for some nodes is set to False. So the requirement is that, though 'Enabled' property for some nodes is set to False, user should be able to expand those nodes at client side.

Is this Possible?
Shailesh
Dennis Nielsen
Top achievements
Rank 1
 answered on 14 May 2009
5 answers
94 views
Hi

I am trying to move appointments but i dont seem to know where to start? I have looked at the demos but i cant seem to spot how its being done. Can someone point me in the right direction please?

Thanks in advance

Bob
Peter
Telerik team
 answered on 14 May 2009
4 answers
126 views
can i make it so that when the window popup i still can use the parent page? thanks.
Georgi Tunev
Telerik team
 answered on 14 May 2009
1 answer
164 views
Hello, I am trying to disable certain days (Sundays and Mondays) in my calendar pop-up based on a dropdown value.

This Calendar is part of a RateDatePicker.

My code is as follows: (for Brevity I am just enclosing the snippet for Sundays)

<telerik:RadDatePicker runat="server" ID="rdpDate" OnSelectedDateChanged="rdpDate_Changed" AutoPostBack="true" Calendar-ShowRowHeaders="false" Calendar-ShowColumnHeaders="false">
                                    <Calendar ID="Calendar1" OnDayRender="cal_DayRender" runat="server">
                                        <CalendarDayTemplates>
                                            <telerik:DayTemplate ID="OtherMonth" runat="server">
                                                <Content>
                                                    X
                                                </Content>
                                            </telerik:DayTemplate>
                                        </CalendarDayTemplates>
                                    </Calendar>
                                    </telerik:RadDatePicker>



protected void cal_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
    {
        if (e.Day.Date.DayOfWeek == DayOfWeek.Sunday)
        {
            switch (ddlChoices.SelectedValue)
            {
                case "choice1":
                case "choice2":
                case "choice3":
                    //e.Day.IsSelectable = false;
                    

                    e.Cell.Controls.Clear();
                    e.Cell.CssClass = "otherMonth";

                    Label label = new Label();
                    label.Text = e.Day.Date.Day.ToString();
                    e.Cell.Controls.Add(label);

                    Telerik.Web.UI.RadCalendarDay calendarDay = new Telerik.Web.UI.RadCalendarDay();
                    calendarDay.Date = e.Day.Date;
                    calendarDay.IsSelectable = false;
                    calendarDay.IsDisabled = true;
                    calendarDay.TemplateID = "OtherMonth";
                    rdpDate.Calendar.SpecialDays.Add(calendarDay);
                    break;
            }
        }
}

The effect that occurs is that there's no longer an <a> tag in the span for that day but the over/off javascript that changes the CSS class events are firing and I can still click in the box for the day and it will populate the textbox.  The effect I want is for the dates that I disable to be completly unclickable.  Any suggestions on dealing with the dropdown?

Is there a way for me to "reload" the viewed month?  I thought I might reload the calendar in the postback _Changed event handler for the dropdown list. I only plan on showing a year's worth of dates, would it be possible for me to create an IList<DateTime> and DataBind the calender that way and not have to deal with a javascript handler for new months?  I could deal with both problems at once.

If the "SpecialDays" functionality is not needed that's fine, all I need is to disable the dates.  Thanks!

I removed the AJAX manager and now it seems to be working.  Is there a trick to getting this to work with RadAjaxManager?  Thanks.

I'm using a sequence of Panels to control the flow of my page and the ajax affects some of these.  When the flow returns back to the panel with the calendar in it sometimes the calendar control has all of it's styles removed and it looks very plain with no skin on the calendar.  If I take out the AJAX manager this works.  Am I missing something important with the AJAX manager?

Thanks.
Iana Tsolova
Telerik team
 answered on 14 May 2009
3 answers
534 views
Hi,

I have a Grid which is all in edit mode, meaning that the user can start editing straight away without clicking on an "Edit" button.

I want to be able to catch the event when a user leaves the row and to perform validation and a save at that point.

All the examples I have found do not help me as most examples expect the user to click an "Edit" button and a "Save" button.  I don't want the user to click any buttons.

Is there a way of detecting when a user has left a row?
Sebastian
Telerik team
 answered on 14 May 2009
1 answer
138 views
 hello to all expert on telerik,

                good day to all ! I installed telerik ver.2009 coz i found some new features that could cater my filtering, i followed the sample on the web, about embedding radcomboxbox as my filtering inside the grid and its work fine using the sqldatasource..but we advice not to use a sqlinjection, we advice to used a stored procedure for binding the grid,,how am i going to recode the given sample codes..anyway heres my default.aspx.cs code

SqlConnection

 

Stringcon = new SqlConnection(ConfigurationManager.ConnectionStrings["IBOS.Properties.Settings.ConnString"].ToString());

 


 protected void RadGrid1_PreRender(object sender, EventArgs e)  
    {  
        if (RadGrid1.MasterTableView.FilterExpression != string.Empty)  
        {  
            ReloadCombos();  
 
        }  
    }  
    protected void ReloadCombos()  
    {  
        SqldatasourceSqldatasource.SelectCommand = Sqldatasource.SelectCommand + " WHERE " + RadGrid1.MasterTableView.FilterExpression.ToString();  
        RadGrid1.MasterTableView.Rebind();  
    }  
=============================================================
 this is my method supposed to used but i wasnt able to use this becuase of the format above
 which is the RadGrid1.MasterTableView.FilterExpression, how can change that to get only the DataFieldValue on the Radcombobox? 
============================================================
    protected void RebindGrid(string key)  
    {  
        SqlDataAdapter ad = new SqlDataAdapter();  
        DataSet ds = new DataSet();  
        SqlCommand cmd = new SqlCommand("spu_CARFILTERING_SAMPLE_SELECT", Stringcon);  
        cmd.CommandType = CommandType.StoredProcedure;  
        Stringcon.Open();  
        cmd.Parameters.Add("@username", SqlDbType.Char, 50).Value = key.Trim();    
        try  
        {  
            ad.SelectCommand = cmd;  
            ad.Fill(ds, "tblMaster05Users");  
 
            this.RadGrid1.DataSource = ds;  
            this.RadGrid1.DataMember = "tblMaster05Users";  
            this.RadGrid1.DataBind();  
 
            Stringcon.Close();  
        }  
        catch (Exception ex)  
        {  
            throw ex;  
        }  
    } 
================================================
my method binding the radcombobox

  protected void bindcombox()
  {
    
        SqlDataAdapter ad = new SqlDataAdapter();  
        DataSet ds = new DataSet();  
        SqlCommand cmd = new SqlCommand("spu_CARFILTERING_SAMPLE_SELECT", Stringcon);  
        cmd.CommandType = CommandType.StoredProcedure;  
        Stringcon.Open();  
      
        try  
        {  
            ad.SelectCommand = cmd;  
            ad.Fill(ds, "tblMaster05Users");  
            this.Radcombox1.DataSource =ds;
            this.Radcombox1.DataTextField"fcUserName";  
            this.Radcombox1.DataValueField = "fxKeyID";  
            this.Radcombox1.DataBind();  
 
            Stringcon.Close();  
        }  
        catch (Exception ex)  
        {  
            throw ex;  
        }  

  
  }
===============================================================================
below is my default.aspx where i use sqldatasource following the example..but how can i bind the radcombobox
as a filtertemplate inside the grid using the way i codes above "bindcombox()"?  
================================================================================

<

 

telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None"

 

 

Skin="Web20" Width="344px" AllowFilteringByColumn="True" OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound">

 

 

<MasterTableView DataKeyNames ="fcUserName">

 

 

<Columns>

 

 

<telerik:GridBoundColumn HeaderText="UserID" UniqueName="UserID" DataField="fxKeyID" AllowFiltering ="false" >

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Username" UniqueName="Username" DataField="fcUserName" AllowFiltering ="false" >

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField ="fcUserName" HeaderText ="Combo" UniqueName="Upload">

 

 

<FilterTemplate>

 

 

<telerik:RadComboBox runat ="server" ID ="Radcombo" OnClientSelectedIndexChanged="ComboIndexChanged"

 

 

AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Upload").CurrentFilterValue %>'

 

 

DataTextField ="fcUserName" DataValueField ="fcUserName" DataSourceID ="Sqldatasource">

 

 

<Items>

 

 

<telerik:RadComboBoxItem Text ="All" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

<telerik:RadScriptBlock ID ="RadScriptBlock1" runat="server">

 

 

<script type="text/javascript">

 

 

function ComboIndexChanged(sender,args)

 

{

 

var tableView=$find("<%#((GridItem)Container).OwnerTableView.ClientID %>");

 

tableView.filter(

"Upload",args.get_item().get_value(),"EqualTo");

 

 

}

 

</script>

 

 

</telerik:RadScriptBlock>

 

 

</FilterTemplate>

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

<%

--SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("UserID").CurrentFilterValue %>'

 

OnClientSelectedIndexChanged="TitleIndexChanged">--

 

%>

 

 

<asp:SqlDataSource ID="Sqldatasource" ConnectionString ="<%$ ConnectionStrings:IBOS.Properties.Settings.ConnString %>"

 

 

ProviderName="System.Data.SqlClient" SelectCommand="SELECT fxKeyID, fcUserName FROM tblMaster05Users"

 

 

runat="server"></asp:SqlDataSource>

 


sample codes is higly appreciated

thanks to all
Iana Tsolova
Telerik team
 answered on 14 May 2009
2 answers
87 views
hi

ive been working through some of your examples , and basically i want to create an editable Hierarchy with Templates but more importantly i want to create the grid at run time rather than design time , is there any examples that could help me with this , as i cant find any that show how to do it at runtime.

i would appreciate any help you can give.

ive done a fair amount of the work , i just think im missing some of the parts i would post the code , but its too big as its all based on dynamic data structures.

Peter Maslin
Top achievements
Rank 1
 answered on 14 May 2009
1 answer
100 views
Hi
i have a grid that it has too many data,when i want to insert a row,it expand and width of my gird  become double( like that it is in two pages) ,in this case my validators in second half don't work.
I make all of my validators with same method:
 editors.Add((GridTextBoxColumnEditor)item.EditManager.GetColumnEditor(row["field_name"].ToString())); 
                        cells.Add((TableCell)editors[editors.Count - 1].TextBoxControl.Parent); 
                        regs.Add(new RegularExpressionValidator()); 
                        editors[editors.Count - 1].TextBoxControl.ID = row["field_name"].ToString() + "_validation"; 
                        regs[regs.Count - 1].ControlToValidate = editors[editors.Count - 1].TextBoxControl.ID; 
                        regs[regs.Count - 1].ErrorMessage = "Please enter int"
                        regs[regs.Count - 1].ValidationExpression = @"^\d+$"; 
                        cells[cells.Count - 1].Controls.Add(regs[regs.Count - 1]); 
Please help me ASAP!!i really need to solve it.
Georgi Krustev
Telerik team
 answered on 14 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?