Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
242 views
Hi,
   I am facing one issue related to RadCombobox MultiSelect Dropdown.
I want to avoid the Postback when i am not selecting any value.Currently when  I have closed the Drodpdown without selecting any value my screen is getting postback.Postback should occur when i have selected any value for that i have made Autopostback=true.
But with this when i am closing the combobox without selecting any value my screen is doing postback.
How to avoid the Postback on a screen when  i have not selected any value and closed the dropdown?
Please suggest what i should do?

Following is my code:

<

 

 

telerik:RadComboBox ID="ddStage" runat="server" CheckBoxes="true" OnSelectedIndexChanged="ddStage_SelectedIndexChanged"

 

 

 

AutoPostBack="true"

 

 

 

EnableCheckAllItemsCheckBox="true" Localization-CheckAllString="All"

 

 

 

Localization-AllItemsCheckedString="All" DropDownWidth="200px"

 

 

 

Width="200px" Skin="Web20Ext" Font-Names="Helvetica" Font-Italic="false" EnableEmbeddedSkins="false" BackColor="White"

 

 

 

ForeColor="Black">

 

 

 

<Items>

 

 

 

<telerik:RadComboBoxItem Text="Await" Selected="True" Value="1" Font-Names="Helvetica" />

 

 

 

<telerik:RadComboBoxItem Text="InPgr" Value="2" Font-Names="Helvetica"/>

 

 

 

<telerik:RadComboBoxItem Text="Rej" Value="3" Font-Names="Helvetica"/>

 

 

 

<telerik:RadComboBoxItem Text="Appr" Value="4" Font-Names="Helvetica"/>

 

 

 

</Items>

 

 

 

</telerik:RadComboBox>

 

Kalina
Telerik team
 answered on 25 Apr 2012
2 answers
129 views
Hello,

In a RadGrid, I can have a column definition like the following:
<asp:BoundColumn .. DataField="County.CountyName" />

But I try this in a grid group by expression:
<tel:GridGroupByExpression DataField="County.CountyName" />
But this throws an exception.  Is there a way I can utilize these complex expressions for grouping?

Thanks.

Brian Mains
Top achievements
Rank 1
 answered on 25 Apr 2012
4 answers
368 views
I would just like to trigger a select on arrow up or arrow down, not just focus.  This loads an image into another object.

Please help.

Thanks.
Paul
Top achievements
Rank 1
 answered on 25 Apr 2012
1 answer
124 views
Hello,

I'm trying to automatically resize images when they're being uploaded. After reading on the forums for a while, I found out I can use a FileSystemContentProvider for this.

Here's what I've come up with:

public class TextEditor : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        radEditor.ImageManager.ContentProviderTypeName = typeof(MyResizer).AssemblyQualifiedName;
         
        radEditor.ImageManager.ViewPaths = new[] { "~/Images" };
        radEditor.ImageManager.UploadPaths = new[] { "~/Images" };
        radEditor.ImageManager.DeletePaths = new[] { "~/Images" };
    }
}
 
public class MyResizer : FileSystemContentProvider
{
    public MyResizer(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl,
                  string selectedItemTag) : base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)
    {
    }
 
    public override string StoreFile(Telerik.Web.UI.UploadedFile file, string path, string name, params string[] arguments)
    {
        string result = base.StoreFile(file, path, name, arguments);
 
        using (System.Drawing.Image originalImage = Bitmap.FromStream(file.InputStream))
        {
            int originalWidth = originalImage.Width;
            int originalHeight = originalImage.Height;
 
            int newWidth = 500;
            int newHeight = originalHeight / originalWidth * newWidth;
 
            System.Drawing.Image resizedImage = ResizeImage(originalImage, newWidth, newHeight);
 
            string fileName = Path.Combine(path, name);
            resizedImage.Save(Context.Server.MapPath(fileName));
        }
 
        return result;
    }
     
    private Image ResizeImage(Image originalImage, int newWidth, int newHeight)
    {
        // Resize Image
    }
}

This works fine, but as you can see the new width of the image (500) is hard coded. How can I turn this into a parameter?

We access the page with the Editor on it like this: /TextEditor.aspx?textid=1&ImageWidth=500

How can we pass the ImageWidth parameter in the querystring to our implementation of the FileSystemContentProvider?

Regards,
Kristof
Rumen
Telerik team
 answered on 25 Apr 2012
1 answer
90 views
By default RadDateTimePicker taking Today date whenever select time from timepicker.

Expected Behavior:
Suppose today date is 23-Apr-2012.When we choose time(7:00 PM) for the first time it should selected as "XX-Apr-2012 7:00 PM" instead "23-Apr-2012 7:00 PM". 

Note: 'XX' could be any date.It is purely situational.

Can it possible to change default behavior to expected date ???

Thanks,
Pradeep
Eyup
Telerik team
 answered on 25 Apr 2012
3 answers
225 views

I get 5 steps forward and then hit a brick wall with the RADGrid.

I have a page with a MultiView, encapsulating two views. View1 displays View2 when a particular LinkButton is pressed. On View2, I have a RADGrid. Within it I am dynamically creating a ButtonColumn of LinkButtons. The issue is that when a LinkButton is selected from one of the rows, I need the MultiView to change back to View1. Problem is, because the LinkButton is inside the RADGrid, it execute as an Asynchronous PostBack, and even though my code changes the CurrentView of the MultiView, the change doesn't get applied. I was thinking that what I needed was to designate all the LinkButtons inside that particular column as requiring a full Synchronous PostBack when clicked.

I tried the following, but it didn't work:
  Note: ButtonColumnsRequiringFullPostBack is a simple String Array holding the Unique Column Names of any columns with LinkButtons that I want to make as Synchronous Postback.

Private Sub gridMain_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles gridMain.ItemCreated
     If (e.Item.GetType() Is GetType(GridDataItem)) Then
          '***************************************
          ' Initialize Variables
          '***************************************
          Dim objDataItem As Telerik.Web.UI.GridDataItem = e.Item
 
          For Each strUniqueColumn As String In Me.ButtonColumnsRequiringFullPostBack
               With Telerik.Web.UI.RadScriptManager.GetCurrent(Me.Page)
                    .RegisterPostBackControl(objDataItem(strUniqueColumn).Controls(0))
               End With
          Next
     End If
End Sub

Now I don't get any error with this code...but it doesn't work either. I click the LinkButton inside the RADGrid, and it still executes Asynchronously...leaving the user on the same View2 page.

P.S. I am looking for a Server-Side solution, not a Client-Side one. Also I want to avoid wrapping the entire page in an UpdatePanel if avoidable. I think doing so may end up breaking a lot of the other functionality and I rather not spend days fixing the entire page to work AJAX style.

Any suggestions?



Marin
Telerik team
 answered on 25 Apr 2012
3 answers
179 views
Hi,

I am trying to build a functionality in my asp.net page where when a user changes the values of any controls on the page and then if they try to navigate away without saving their changes, it would display a pop up message. The pop up message would confirm that if they navigate away their changes will be discarded. But i am unable to do that so for the raddatetimepicker control as i cannot find a function that would fire after it's value is changed from the current value that is populated from the database? e.g. after the page loads, if datetimepicker control has a value of 23 April 2010 and then the user changes that value, i need to fire a function preferably a client side function that would set the changed value flag to one and then i can notify the user that they have unsaved changes on the page.could you please help? i have used this function "datePicker.ClientEvents.OnDateSelected = "SetUnsavedDataFlag('1');"" but it does not fire.
Antonio Stoilkov
Telerik team
 answered on 25 Apr 2012
1 answer
76 views
Hello,

I have an aspx page with a RadComboBox an a silverlight object in it : 
<telerik:RadComboBox ID="cbListeTypesDonnees" runat="server" SkinID="cbMiddleComboBox" />
 
<div id="silverlightControlHost">
        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
                              width="600px" height="500px" id="moduleSL">
               <param name="source" value="../../ClientBin/Genius.UI.Modules.DonneesExogenes.xap" />
               <param name="onError" value="onSilverlightError" />
                <param name="background" value="white" />
                 <param name="minRuntimeVersion" value="4.0.50401.0" />
                 <param name="autoUpgrade" value="true" />
                  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration: none">
                       <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight"
                                     style="border-style: none" />
                  </a>
              </object>
</div>


I want access to the RadComboBox when I am in my silverlight code : 
public partial class MainPage : UserControl
    {
 
 private void _serviceClient_GetAllValeursDonneeExogeneCompleted(object sender, GetAllValeursDonneeExogeneCompletedEventArgs e)
        {
            if (HtmlPage.Document.GetElementById("cbListeTypesDonnees") != null)
            {
                
            }
        }

Unfortunately, this code doesn't work, my cbListeTypesDonnees is always null. 
It works when my combobox is not a telerik control. 
How can I get the RadComboBox from Silverlight ? 

Thank you ! 
Christophe Bienaime
Top achievements
Rank 1
 answered on 25 Apr 2012
1 answer
56 views
Hi

The start and end time does not correspond on the scheduler. For example if a meeting starts at 8:00AM and ends at 9:00 am.
On the scheduler it shows to start at 8:30 to 9:30.

Can you please assist?

Regards
Frabk
Frank
Top achievements
Rank 1
 answered on 25 Apr 2012
1 answer
79 views
Hi, trying to checkout the above but page not found. Happens to both Automatic and Manual CRUD with Entityframework. Is this still valid?

Regards
cwk
Eyup
Telerik team
 answered on 25 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?