Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
137 views
Hello,

I have the following radcalendar,

<

 

telerik:RadCalendar ID="RadCalendar1" runat="server" AutoPostBack="true" MultiViewColumns="1"

 

 

MultiViewRows="1" EnableMultiSelect="false">

 

 

</telerik:RadCalendar>

 


is there anyway to disable all the previous days to today?

Thanks a lot
Mike
Mike_T
Top achievements
Rank 1
 answered on 22 Aug 2011
1 answer
92 views
Hi All.

I've hidden the filter icon for each column in the filter row in a RadGrid, and have configured some of the columns to use the "Contains" filter and to postback when I press the Return/Enter key when the filter textbox has focus. This is working really well.

Hide filter icon...
<style type="text/css">  
    .RadGrid .rgFilter,  
    .GridFilterRow_Gray img  
    {  
        display: none;  
    }  
</style>

Configure columns to filter using "Contains" when user presses Return/Enter key...
AutoPostBackOnFilter="true" 
CurrentFilterFunction="Contains"


However, when I want to clear the filter for a given column, I should to be able to simply clear the text in the textbox in the filter row and press the Return/Enter key again, but this doesn't work so well.

For instance, if I leave the focus in the filter textbox after I have applied a filter, delete the text and pess Return/Enter again, it's all a matter of luck if the filter clears and the grid displays all the data or not. Sometimes it does, sometimes it just sits there and doesn't do anything. This is also the case if I change the filter text (if I want to change the filter or make a mistake).

The only way I can guarantee (by guarantee, I mean it's worked everytime so far) to make the filter clear or change, is to move the focus to a different filter textbox and back again and make my changes.

Has anyone else experienced this or does anyone know why this is happening?
Pavlina
Telerik team
 answered on 22 Aug 2011
3 answers
88 views
I have a large menu which is populated on demand via a webservice as its the most efficient way of populating items (the tree is too large to load fully). However, there is a branch which has 'User Favourites', which are added to through a different interface elsewhere on the page. Ideally, I'd like to 'Add to Favourites' with an XMLHttPRequest to avoid posting back or redirecting, and then on the client side, 'un-cache' the user favourites branch, if it had been previously shown, and therefore cached in the browser.

I don't really want to manually add items to the Favourites menu if I can help it. The other option is to be able to set a single branch to 'do not cache', but I don't think this is possible is it?
Kate
Telerik team
 answered on 22 Aug 2011
2 answers
187 views

Nothing happens when we click on any of the export to excel or export to CSV , ... buttons.

The code snippet of the grid we are using is as below :-

 

<telerik:RadGrid AutoGenerateColumns="false" ID="grdxyz" runat="server"  AllowPaging="True" AllowSorting="True" OnNeedDataSource="grdSearchResults_NeedDataSource" TabIndex="36" >
<ExportSettings HideStructureColumns="False" ExportOnlyData="False" IgnorePaging="false" OpenInNewWindow="true" FileName="MyRecord">
</ExportSettings>
<MasterTableView PageSize="10"  TableLayout="Auto" Width="100%"  CommandItemDisplay="Top" DataKeyNames="myid">
<CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="true" ShowExportToPdfButton="true" ShowExportToCsvButton="true" ShowExportToExcelButton="true" ShowExportToWordButton="true" />

Our page hierarchy is as follows. We have a master page which has a contentTemplate. On the child page we have a RadAjaxPanel and the above RadGrid is placed inside this RadAjaxPanel on child page. Has the ajaxification of the grid anything to do with these ??

Also we are using the latest version of telerik i.e v.2011.2.712.40.

Let me know accordingly.

Ankit
Top achievements
Rank 1
 answered on 22 Aug 2011
1 answer
77 views
I've got a RadFilter with ClientEvent function OnFilterCreated. This RadFilter is ajaxified control.

On Ajaxpostback, the object sender.get_contextMenu() is null.

What did I missed ?
Iana Tsolova
Telerik team
 answered on 22 Aug 2011
16 answers
244 views
Hi everyone.

I'm looking for a solution to add a new field to my radfilter, and when this field be selected, I want to exec a especific query in my database.

Ex:

I have a grid (connected to the filter) with 3 fields:

Customer, Company, Salary --> This works perfectly with the filter.

What I want is to add a field called "All" that doesn't appear in grid, but is showed in filter. When the user select this field and apply filtering, I want to exec my custom stored procedure and bind the grid with the data retrieved.

What's the best way?

Thanks in advance.
Iana Tsolova
Telerik team
 answered on 22 Aug 2011
1 answer
154 views
I need  hide some expresion according to DataType.

If field1.DataType = tyeof(string)
hide --> greatherrthan, lessthan...

if field2.datatype = typeof (int)
hide --> expresion.-...

How I can do this programmatically??

Guillaume
Top achievements
Rank 1
 answered on 22 Aug 2011
2 answers
158 views
I've got a RadFilter.
I try to save expressions with SaveSettings(), no problems. I can save the string value in a database column.
I precise I have my own FilterEditorTemplate (which is a RadControl with specific business databinding).

When i try a LoadSettings on this string value, I've got this response :
Reference is not set to an instance of an object with this stacktrace :
à Telerik.Web.UI.RadFilterDataFieldEditor.CreateEditorFrom(RadFilterDataFieldEditor baseEditor) à Telerik.Web.UI.RadFilterSingleExpressionItem.SetupFunctionInterface(Control container) à Telerik.Web.UI.RadFilterExpressionItem.CreateFunctionalInterface() à Telerik.Web.UI.RadFilter.CreateFilterItems() à Telerik.Web.UI.RadFilter.CreateControlHierarchy() à Telerik.Web.UI.RadFilter.CreateChildControls() à System.Web.UI.Control.EnsureChildControls()

I precise I am with an objectstateformater for the load and save settings. I tried with binaryformat too and the exception moves into :
serialized data are invalid.

Is it because i've got my own editor ?

Can you help me ?
Guillaume
Top achievements
Rank 1
 answered on 22 Aug 2011
1 answer
185 views

Hi folks,

I may be doing something stupid here, but I've spent the morning grinding my teeth long enough that I've decided to ask someone else to point out my error :)

I have a RadNotification, in a RadAjaxPanel:

<telerik:RadAjaxPanel ID="notificationPanel" runat="server" ViewStateMode="Enabled">
     <telerik:RadNotification ID="RadNotification1" KeepOnMouseOver="true" runat="server" VisibleOnPageLoad="false" ContentScrolling="Auto" 
           Width="400" Height="300" TitleIcon="none" ContentIcon="none" Animation="Fade" EnableRoundedCorners="true" EnableShadow="true" Title="Notification Title" ShowCloseButton="true" Pinned="true" Opacity="80"
           AutoCloseDelay="3000" Position="TopRight" OffsetX="-50" OffsetY="50" VisibleTitlebar="true" style="z-index: 35000;">
           <ContentTemplate>
               <asp:Table ID="shoppingCartTable" runat="server" Width="380" ViewStateMode="Enabled">
                
               </asp:Table>
               <asp:Button ID="checkoutButton" runat="server" Text="Convert" OnClick="btnCheckout_Click" />
           </ContentTemplate>
       </telerik:RadNotification>
</telerik:RadAjaxPanel>

A method (in another RadAjaxPanel) creates controls inside "shoppingCartTable" in the contenttemplate of the RadNotification.
The method which fills the table is:

private void FillCartTable()
        {
            RadNotification1.Title = "Purchase order cart";
            if (Session["PurchaseOrderCart"] == null)
            {
                Session["PurchaseOrderCart"] = new Dictionary<long, Dictionary<long, PurchaseOrderLine>>();
            }
            Dictionary<long, Dictionary<long, PurchaseOrderLine>> cart = (Dictionary<long, Dictionary<long, PurchaseOrderLine>>)Session["PurchaseOrderCart"];
 
 
            foreach (long tenderID in cart.Keys)
            {
                TableHeaderRow th = new TableHeaderRow();
                TableHeaderCell thc = new TableHeaderCell();
                thc.ColumnSpan = 4;
                thc.Text = Tender.GetTender(tenderID).Supplier.Name;
                th.Cells.Add(thc);
                shoppingCartTable.Rows.Add(th);
 
                foreach (long TenderLineID in cart[tenderID].Keys)
                {
                    PurchaseOrderLine pol = cart[tenderID][TenderLineID];
 
                    TableRow tr = new TableRow();
                    TableCell tc1 = new TableCell();
                    tc1.Text = " ";
                    tr.Cells.Add(tc1);
 
                    TableCell tc2 = new TableCell();
                    tc2.Text = pol.StockOrServiceDescription;
                    tr.Cells.Add(tc2);
 
                    TableCell tc3 = new TableCell();
                    tc3.Text = pol.QuantityOrdered + " " + pol.QuantityBase.Description + " at " + pol.Price.ToString("C", Global.currencyFormat) + " per " + pol.PricingBase.Description;
                    tr.Cells.Add(tc3);
                     
                    TableCell tc4 = new TableCell();
                    Image b = new Image();
                    b.ImageUrl = "~/images/icons/16/delete.png";
                    tc4.Controls.Add(b);
                    CheckBox c = new CheckBox();
                    c.ID = "removeFromCart_" + tenderID.ToString() + ":" + TenderLineID.ToString();
                    c.EnableViewState = true;
                    c.ClientIDMode = System.Web.UI.ClientIDMode.Static;
                    tc4.Controls.Add(c);
                    tr.Cells.Add(tc4);
 
                    shoppingCartTable.Rows.Add(tr);
                    //sb.Append("<tr><td> </td><td>" + pol.Stock.Product.Number + " (" + pol.Stock.SizeDescription + ")" + "</td><td>" + pol.QuantityOrdered + " " + pol.QuantityBase.Description + "</td></tr>");
                }
            }
            //sb.Append("</table>");
            //sb.Append("<asp:Button ID='btnCheckout' runat='server' Text='Convert' OnClick='btnCheckout_Click' />");
            //RadNotification1.Text = sb.ToString();
 
        }


Showing the notification works just fine, and my content is there. That method is called in Page_Init, so each time the controls are created very early in the page lifecycle, long before any ViewState related events, and they're created with the same IDs (and same uniqueIDs) each time the page loads.


When the onclick event fires for the notificationcontrol's button, the checkboxes are all unchecked. They do exist (see the attached image) and the IDs do match the ones in viewstate. However, they're never re-populated from viewstate.... the attached image is a snapshot taken at the end of Page_Init and shows what I'd expect (Checked is false). However, it's still false after all the viewstate events, at the end of Page_Load - despite the Form values collection quite clearly containing that control's state.


I have temporarily worked around it by manually populating them in Page_Init (by traversing the Form values collection, looking for any with an ID containing "removeFromCart" and then manually assigning the checked property). But surely this isn't the right way to be doing it? Why doesn't Viewstate automatically get set on these controls, given that the ID and UniqueID properties are identical before and after a postback?

Cheers!




Tsvetina
Telerik team
 answered on 22 Aug 2011
5 answers
190 views
Hi,

I am new to Telerik Schedular control. I wanted to enable the date picker property where in any of the views (day/week/month/timeline), I am able to select the date.

I see in all the demos that, just next to where "Today" is written, there is a downarrow which when clicked opens the datepicker control.

Somehow I am not able to get that downarrow displayed. Attached are both the screen shots.

Could you please help ?

Thanks,
Bhavik
Plamen
Telerik team
 answered on 22 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?