Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
229 views
Hi,
       I am trying to resize the Raddoc at codebehind. But its not working. 

<telerik:RadDockLayout runat="server" ID="RadDockLayout1" OnSaveDockLayout="RadDockLayout1_SaveDockLayout"
                                OnLoadDockLayout="RadDockLayout1_LoadDockLayout" >
                                <telerik:RadDockZone runat="server" ID="RadDockZone1" Width="300" MinHeight="500"
                                    Style="float: left; margin-right: 15px" >
                                </telerik:RadDockZone>
                                <telerik:RadDockZone runat="server" ID="RadDockZone2" Width="300" MinHeight="300"
                                    Style="float: left; margin-right: 15px; background: #f5f4e8;">      
                                </telerik:RadDockZone>
                                <telerik:RadDockZone runat="server" ID="RadDockZone3" Width="300" MinHeight="300"
                                    Style="background: #d5f0fa; float: left;">
                                </telerik:RadDockZone>
                            </telerik:RadDockLayout>


private RadDock CreateRadDock()
        {
            int docksCount = CurrentDockStates.Count;
 
            RadDock dock = new RadDock();
            dock.DockMode = DockMode.Docked;
            dock.UniqueName = Guid.NewGuid().ToString().Replace("-", "a");
            dock.ID = string.Format("RadDock{0}", dock.UniqueName);
            dock.Title = txtDocTitle.Text;
            dock.Text = string.Format("Added at {0}", DateTime.Now);
            dock.Resizable = true;
            dock.Commands.Add(new DockCloseCommand());
            dock.Commands.Add(new DockExpandCollapseCommand());
 
            return dock;
        }

Can we resize "RadDockZone" also ??

waiting for reply...!!!
Princy
Top achievements
Rank 2
 answered on 01 Jun 2012
1 answer
98 views

the field in the database is a varbinary (max)
I have
the following in html:
<asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>
                <telerik:RadBinaryImage ID="ImgFoto" runat="server" Visible="true" DataValue='<%#Eval("foto") %>' />
            </ItemTemplate>
        </asp:Repeater>

In the code: object[] opParametros = new object[1];
            opParametros[0] = "93";
             DsInfoEmpleado = _fwAccesoDatos.ExecuteDataset(StrCadenaConexion, "spObtenerInfoPerfilEmpleado", opParametros);
             Repeater1.DataSource = DsInfoEmpleado;
            Repeater1.DataBind();

in web.config:
<handlers>
            <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode"     path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    </handlers>

the image is not displayed. Thank you for your help.
Tsvetina
Telerik team
 answered on 01 Jun 2012
6 answers
209 views
I have
  1. A couple of dropdown lists in my RadGrid
  2. A multilingual application, such that the ViewModel provides an object for each property, but getting the display text requires a translation step to the user's language - can't just display the ViewModel property directly.  I guess I COULD change this to have one property on the ViewModel that returns the string display value and another that returns the integer underlying value, but that seems messy to me - would much prefer a solution like IValueConverter to convert between the ViewModel and the displayed value based on the type of the property.  Is that the "best practice"?  Will that cause extra server round-trips, because the property that the client side form binds to requires server side logic to execute in order to produce its value?
  3. A form template for my EditForm

I want to have a clean code-behind that uses binding to populate the list values and the selected index in the dropdown lists in both the MasterTableView and the Edit Form's FormTemplate.

I can make it work without adding the strings and integer fields to the ViewModel, but the code behind is extensive and messy.  I can't figure out any clean way to do it.  

I looked at the GridDropDownColumn control, but found that it's supposed only to have datatables underlying it (http://www.telerik.com/community/forums/aspnet/grid/populating-griddropdowncolumn-from-code-behind.aspx), and only found examples of it being bound to a source whose connection string etc. were declared in the .aspx (not in the code behind).  I'm retrieving my values via Entity Framework and then a subsequent manipulation to acquire the values for the correct language, so that doesn't work for me.

I can't declaratively specify the options for the dropdown list in the .aspx due to the need to translate them, but if I don't declare them in the XAML, then I can't bind the selected value, because it finds that the corresponding list item doesn't exist.  I also can't even bind the selected value in the case of the MasterTableView's view mode entry because of the need to translate the text to be displayed using a function that's called server side.

As-is, in ItemDataBound, for EACH dropdown field in my form, there's code to:
  1. Populate dropdown values list manually in Edit Form (requires casting the bound item, getting the list of values with translations, and manually creating ListItems
  2. Setting selected item in Edit Form (reading the value from the underlying data source item and using .FindControl to get the control that I need to update)
  3. Setting default value for the dropdown list in the Insert form
  4. Set value for the field in the MasterTableView (again doing the translation)

Seems like a lot of code to have for each field.  Seems like there should be some point BEFORE databinding where I can set the list items in the dropdownlist control, so that the databinding can go through successfully.  Just because I need to set the list items in code behind, why should I ALSO be forced to set the selected item there?

Is there a better way?

Thanks!




Abisek
Top achievements
Rank 1
 answered on 01 Jun 2012
8 answers
384 views
HI
I have a requirement as given below.
My page is for setting schedules for doctors.
For eg: Doctor X has schedule on a particular date from 09.00 am to 1.00 pm.And I have a master page with rad scheudler to set this appointment.
In another page with rad scheduler, I need to display the available time slot of Doctor X.
For that I need to show the time slot from 09.00 am to 1.00 pm empty.And need to show other time slots in a diffrent colour grey.
ie; time from 12.00 am to 08.59 am of the same date (which is unavailable schedule for the doctor) to be shown in grey colour.
time from 09.00 am to 1.00 pm as free slot.
1.01 pm to 11.59pm  (which is again unavailable for the doctor)  in grey colour.

Please help, as I am stuck here.have done so many R&D,nothing helped.
Thanks
Chinnu


Ivana
Telerik team
 answered on 01 Jun 2012
11 answers
394 views
Hi!

We are trying to validate controls in a form template. The javascript code shown below fires, but how do I reference the controls in the template in code behind? We want to make sure the text box and combo box has a value.

Thanks for your help!

<editformsettings editformtype="Template">
    <FormTemplate>
 
        <telerik:RadTextBox ID="inputBoxIdentifier" runat="server" CssClass="inputBox" Style="top: 0px; left: 0px" Skin="Windows7" SelectionOnFocus="SelectAll" EnableViewState="true">
        <InvalidStyle CssClass="inputBoxInvalid" />
 
        <telerik:RadComboBox ID="comboBoxIdentifier" runat="server" CssClass="radComboBox" OnDataBound="radComboBox_DataBound"
        OnSelectedIndexChanged="radComboBox_SelectedIndexChanged" Filter="Contains" Skin="Windows7"
        EnableLoadOnDemand="true" EnableViewState="true" />
 
        <telerik:RadButton ID="radButtonInsertUpdate" runat="server" OnClientClicking="performInsertOrUpdate"
            Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' CssClass="esbutton" />
        <telerik:RadButton ID="radButtonCancelInsertUpdate" runat="server" OnClientClicking="cancelInsertOrUpdate"
            Text="Cancel" CausesValidation="false" CommandName="Cancel" CssClass="esbutton" />
 
    </FormTemplate>
</editformsettings>
 
 
 
 
function performInsertOrUpdate(sender, args) {
            var error = 0;
 
            var controlRef = $find("<%= radGridClientIdentifiers.ClientID %>").get_masterTableView();
 
            // any items being inserted?
            var insertedItem = controlRef.get_insertItem();
            if (insertedItem != null) {
                 
            }
 
            var editedItemsArray = controlRef.get_editItems();
            if (editedItemsArray.length > 0) {
                 
            }
 
            if (error == 1)
                return false;
 
            return true;
        }


Tsvetina
Telerik team
 answered on 01 Jun 2012
1 answer
108 views
Hi,
        I have a RadGrid with PDF option. when I set the UseStaticHeader true, PDF content not showing. but when removing the UseStaticHeader from property PDF content will display. My requirement is UseStaticHeader should be there and PDF content also needed. Please help...

Thanks in advance
Jesmon Joseph
Shinu
Top achievements
Rank 2
 answered on 01 Jun 2012
1 answer
134 views
I have an internal site that runs under IE8 with Intranet settings, and thus runs in Compatibilty mode.  I do not have the access or permission to force the site into regular mode using headers or IIS - in other words, it must run in Compatibility mode.

On the site, I have an Upload control that resides on an asp:Panel, that is associated with the ajax control toolkit's ModalPopupExtender.  The Upload control is set to use 3 input boxes.

When the user opens the modal, and I have enablefileinputskinning="false", the input boxes have an inline style assigned that sets the width as 15px (see attached image fileskinfalse.png).  If I set the enablefileinputskinning="true", the input boxes are the correct size, but are transparent through the modal down to the page, and the user can't interact with the elements (see image fileskintrue.png).

Any thoughts or ideas on how to get the input boxes to show correctly?

Plamen
Telerik team
 answered on 01 Jun 2012
2 answers
97 views
Hello

I believe the title says it all.
From the documentation I know that autoSize doesn't work with navigateUrl from other domains.
But i am adressing another webserver in the same domain, and autoSize still doesn't work.
However, with a page from the running application in the navigateUrl it works.

Any ideas?

Thanks
Bjorn Sagbakken
Bjorn Sagbakken
Top achievements
Rank 1
 answered on 01 Jun 2012
9 answers
300 views
I use the AsyncUpload control and it showed me javascript error message as below.
"Access is denied."
It only occurred in IE 9.
Here is my code. Please help me.

<telerik:RadButton ID="RadButtonFiles" runat="server" AutoPostBack="false" EnableSplitButton="true" Text="Files"
    TabIndex="11" CssClass="RadButton_SimpleCustomAutoWidth" Width="100%" UseSubmitBehavior="false"
    OnClientClicked="RadButtonFiles_OnClientClicked" EnableEmbeddedSkins="false" />
<telerik:RadContextMenu ID="RadContextMenuFiles" runat="server" EnableEmbeddedSkins="false" EnableRoundedCorners="true">
    <Items>
        <telerik:RadMenuItem Text="Select Files" NavigateUrl="javascript:RadContextMenuFilesSelectFiles_OnClick();" PostBack="false" />
    </Items>
</telerik:RadContextMenu>
 
<telerik:RadAsyncUpload ID="RadAsyncUploadSelectFiles" runat="server" EnableEmbeddedSkins="false"
    OnClientFileSelected="RadAsyncUploadSelectFiles_OnClientFileSelected"
    DisablePlugins="true" TemporaryFileExpiration="0">
</telerik:RadAsyncUpload>


var $fileInput;
 
function pageLoad() {
    var fileUpload = $get(g_radUploadSelectFilesClientID);
    if (fileUpload != null) {
        fileUpload.style.visibility = "hidden";
    }
}
 
function RadContextMenuFilesSelectFiles_OnClick() {
    $fileInput = $("input:file").eq(0);
    $fileInput.click();
}
Dimitar Terziev
Telerik team
 answered on 01 Jun 2012
4 answers
175 views
Hi, 

I have a following scenario:
Generate page with dynamic controls. One of these controls is rad combo box with footer template and item template. 
In footer template was added button. I want this button to call the event ItemsRequest.
I will use this button to clean cache rad combo box.
Ivana
Telerik team
 answered on 01 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?