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

I have two RadAsyncUpload on a page.  How can I set different width for each control.  I would like to have a result like the attachment (Replace and Add Version).

To customize the control, I modify the control using css:
.ruBrowse
{
  background-position: 0 -46px !important;
  width: 117px !important;
}
 
.RadAsyncUpload
{
    height: 25px !important;
}
 
.RadUpload {
    text-align: left;
    width: 117px;
}

But I don't know how I can set style individually.

I'm using the version 2013.3.1217.40.

Thank you and have a nice day!

Steeve
Steeve
Top achievements
Rank 1
 answered on 26 Jun 2014
2 answers
445 views
I'm using the RadScheduler and using a SqlDataSource.
In the page load I'm assigning the basic data to the Scheduler via the RadScheduler1.DataStartField = "r_fieldname" construct.
I'm having difficulty finding where to assign data values to the custom attributes.
In my particular case, I have a fieldname "r_location" that will correspond to the custom attribute "Location".
Where do I assign the value of r_location to Location ?
Mike Bolton
Top achievements
Rank 2
 answered on 26 Jun 2014
1 answer
145 views
When I select a file for uploading in RadFileExplorer with an extension that is not allowed I get the message:
===========
The size of the uploaded file exceeds max size allowed
The extension of the uploaded file is not valid. Please, provide a valid file!
===========
The size does not exceed the max size allowed.

Also when I select a file with an allowed extension and a size that does exceeds the max size I also get this double message.
Why do I receive both messages and can this be more accurate?

Paul
Vessy
Telerik team
 answered on 26 Jun 2014
1 answer
159 views
01.protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
02.        {
03.              
04.            e.Appointment.ToolTip = e.Appointment.Subject + ": " + e.Appointment.Description;
05. 
06.            if (e.Appointment.Attributes["JobStatusID"] == COMMON.Enumerations.JobStatusEnum.BOOKING.ToString())
07.            {
08.                e.Appointment.AllowDelete = true;
09.            }
10.            else if (e.Appointment.Attributes["JobStatusID"] != COMMON.Enumerations.JobStatusEnum.COMPLETED.ToString() || e.Appointment.Attributes["JobStatusID"] != COMMON.Enumerations.JobStatusEnum.CANCELLEDBYADMINISTRATOR.ToString() || e.Appointment.Attributes["JobStatusID"] != COMMON.Enumerations.JobStatusEnum.CANCELLEDBYMOBILE.ToString() || e.Appointment.Attributes["JobStatusID"] != COMMON.Enumerations.JobStatusEnum.CLOSED.ToString())
11.            {
12.                string colorValue = COMMON.Enumerations.GetJobStatusColor((COMMON.Enumerations.JobStatusEnum)int.Parse(e.Appointment.Attributes["JobStatusID"]));
13.                e.Appointment.BackColor = Color.FromName(colorValue);
14.                e.Appointment.AllowDelete = false;
15.                e.Appointment.AllowEdit = false;
16.                //e.Appointment.Attributes.CssStyle.Add("rsAptDelete ", "display:none !important;");
17.            }
18.            else
19.            {
20.                string colorValue = COMMON.Enumerations.GetJobStatusColor((COMMON.Enumerations.JobStatusEnum)int.Parse(e.Appointment.Attributes["JobStatusID"]));
21.                e.Appointment.BackColor = Color.FromName(colorValue);
22.                e.Appointment.AllowDelete = false;
23.                e.Appointment.AllowEdit = true;
24.                //e.Appointment.Attributes.CssStyle.Add("rsAptDelete ", "display:none !important;");
25.            }
26.        }

Hi, the above is my code and Allow Delete & Allow Edit are not working certainly. Does anybody have an idea ?
thank you

Boyan Dimitrov
Telerik team
 answered on 26 Jun 2014
1 answer
53 views
Hi there,

I am having a funny issue here. For the initial period I do change the color of each appointment, all good. However, once I double-click and the advance form pops up meanwhile the color turns black. If I click on week-month or anything does refresh the calendar then it turns back normal. I have attached the two different case. Please take a look and advise me.
I appreciate that, thank you
Boyan Dimitrov
Telerik team
 answered on 26 Jun 2014
3 answers
145 views
I have a telerik radgrid that uses a WebUserControl for editing data.  The Delete ItemCommand fires properly but the Insert ItemCommand does not.  Also, the Update ItemCommand opens the WebUserControl but once it opens, the Cancel and Update commands do not fire from the control.

<telerik:RadGrid ID="rgvEdit" runat="server" AutoGenerateColumns="False" CellSpacing="0" allowpaging="True" PageSize="75"
    GridLines="None" style="margin-top: 0px" RegisterWithScriptManager="False" DataSourceID="dsGetChargeForms">
     
    <MasterTableView NoMasterRecordsText="No locations found." CommandItemDisplay="Top" PageSize="75" AllowPaging="true" AllowSorting="false" DataKeyNames="id" InsertItemPageIndexAction="ShowItemOnCurrentPage">
        <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Add New" ShowRefreshButton="false"/>
        <Columns>   
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"/>                                 
            <telerik:GridBoundColumn HeaderText="Subcategory" DataField="subcategory" UniqueName="subcategory" />
            <telerik:GridBoundColumn DataField="bar_procedure_code" HeaderText="Proc Code"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="display_code" HeaderText="Display Code" SortExpression="display_code" UniqueName="display_code"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="description" HeaderText="Description" SortExpression="description" UniqueName="description"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="min" HeaderText="Min" SortExpression="min" UniqueName="min"></telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn DataField="requires_modifier" DataType="System.Boolean" HeaderText="Modifer?" SortExpression="requires_modifier" UniqueName="requires_modifier"></telerik:GridCheckBoxColumn>
            <telerik:GridCheckBoxColumn DataField="requires_epsdt" DataType="System.Boolean" HeaderText="EPSDT?" SortExpression="requires_epsdt" UniqueName="requires_epsdt"></telerik:GridCheckBoxColumn>
            <telerik:GridCheckBoxColumn DataField="requires_contraceptive_mgmnt" DataType="System.Boolean" HeaderText="Cont. Mgmt?" SortExpression="requires_contraceptive_mgmnt" UniqueName="requires_contraceptive_mgmnt"></telerik:GridCheckBoxColumn>
            <telerik:GridCheckBoxColumn DataField="no_md_charge" DataType="System.Boolean" HeaderText="No MD?" HeaderTooltip="No MD Charge" UniqueName="no_md_charge"></telerik:GridCheckBoxColumn>
            <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton" />
        </Columns>                           
        <EditFormSettings UserControlName="OutptMgmtEditChgFormDetail.ascx" EditFormType="WebUserControl" EditColumn-UniqueName="OutptMgmtEditChgFormDetailCommand1">
        </EditFormSettings>
    </MasterTableView>
 
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
</telerik:RadGrid>
 
<%--Datasources--%>
<asp:SqlDataSource ID="dsGetChargeForms" runat="server" ConnectionString="<%$ ConnectionStrings:OutpatientChargesConnectionString %>" SelectCommand="pSDGenie_OutpatientCharges_Get_ChargeForms" SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:ControlParameter ControlID="ddlEditClinic" DefaultValue="" Name="Clinic" PropertyName="SelectedValue" Type="String" />
        <asp:ControlParameter ControlID="ddlEditCategory" DefaultValue="" Name="Category" PropertyName="SelectedValue" Type="String" />
    </SelectParameters>
</asp:SqlDataSource>

Here is my ItemCommand code.  This was working correctly but today I must have introduced a bug that affected it.
Private Sub rgvEdit_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles rgvEdit.ItemCommand
    Select Case e.CommandName
        Case "PerformInsert"
            Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)
 
            If MyUserControl IsNot Nothing Then
                'Insert
                Dim chgId As Integer 'ToDo: get charge id
 
                Dim subcategory As String = TryCast(MyUserControl.FindControl("ddlSubcategories"), DropDownList).SelectedValue
                Dim procedureCode As String = TryCast(MyUserControl.FindControl("txtProcedureCode"), TextBox).Text
                Dim displayCode As String = TryCast(MyUserControl.FindControl("txtDisplayCode"), TextBox).Text
                Dim description As String = TryCast(MyUserControl.FindControl("txtDescription"), TextBox).Text
                Dim minutes As String = TryCast(MyUserControl.FindControl("txtMinutes"), TextBox).Text
                Dim blnModifier As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresModifier"), CheckBox).Checked
                Dim blnEpsdt As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresEPSDT"), CheckBox).Checked
                Dim blnContMgmt As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresContraceptiveMgmt"), CheckBox).Checked
                Dim blnNoMd As Boolean = TryCast(MyUserControl.FindControl("cbxNoMdCharge"), CheckBox).Checked
                Dim userMeditechId As String = process.UserInfo_SDGenieMeditechID
 
                If IsNumeric(minutes) = False Then
                    minutes = "0"
                End If
 
                If OCTools.AddChargeFormDefaultValue(Me.ddlEditClinic.SelectedValue, Me.ddlEditCategory.SelectedValue, subcategory, procedureCode, displayCode, description, minutes, blnModifier, blnEpsdt, blnContMgmt, blnNoMd) = True Then
                    Log("Inserted New Charge Info", String.Format("{0} inserted new charge info with ID {1}", process.UserInfo_SDGenieUserName, chgId))
                    Me.UpdateUser("Insert")
                Else
                    Me.UpdateUser("Error")
                End If
            End If
        Case "Update"
            Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)
 
            If MyUserControl IsNot Nothing Then
                Dim id As String = TryCast(MyUserControl.FindControl("lblID"), Label).Text
                Dim subcategory As String = TryCast(MyUserControl.FindControl("ddlSubcategories"), DropDownList).SelectedValue
                Dim procedureCode As String = TryCast(MyUserControl.FindControl("txtProcedureCode"), TextBox).Text
                Dim displayCode As String = TryCast(MyUserControl.FindControl("txtDisplayCode"), TextBox).Text
                Dim description As String = TryCast(MyUserControl.FindControl("txtDescription"), TextBox).Text
                Dim minutes As String = TryCast(MyUserControl.FindControl("txtMinutes"), TextBox).Text
                Dim blnModifier As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresModifier"), CheckBox).Checked
                Dim blnEpsdt As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresEPSDT"), CheckBox).Checked
                Dim blnContMgmt As Boolean = TryCast(MyUserControl.FindControl("cbxRequiresContraceptiveMgmt"), CheckBox).Checked
                Dim blnNoMd As Boolean = TryCast(MyUserControl.FindControl("cbxNoMdCharge"), CheckBox).Checked
                Dim userMeditechId As String = process.UserInfo_SDGenieMeditechID
 
                If OCTools.UpdChargeFormDefaultValue(CInt(id), subcategory, procedureCode, displayCode, description, minutes, blnModifier, blnEpsdt, blnContMgmt, blnNoMd) = True Then
                    Log("Updated Charge Info", String.Format("{0} updated charge info with ID {1}", process.UserInfo_SDGenieUserName, id))
                    Me.UpdateUser("Update")
                Else
                    Me.UpdateUser("Error")
                End If
            End If
        Case "Delete"
            Dim id As Integer = 0
            Try
                id = DirectCast((DirectCast(e.Item, GridDataItem)).GetDataKeyValue("id"), Integer)
            Catch ex As Exception
            End Try
 
            If id > 0 Then
                If OCTools.DelChargeFormDefaultValue(id) = True Then
                    Log("Deleted Charge Info", String.Format("{0} deleted charge info with ID {1}", process.UserInfo_SDGenieUserName, id))
                    Me.UpdateUser("Delete")
                Else
                    Me.UpdateUser("Error")
                End If
            End If
        Case Else
            'Do Nothing
    End Select
End Sub




southwynd
Top achievements
Rank 1
 answered on 26 Jun 2014
8 answers
874 views
I am trying to set default skin using Web.config - all documentation says is to use [ShortProductName] but no example shows what is the 'ShortProductName' (whether it is with namespace or without).

I am using it as below:
    <add key="Telerik.Web.UI.RadComboBox.Skin" value="Vista"/>
Above does not work.

    <add key="Telerik.RadComboBox.Skin" value="Vista"/>
This does not work either.

The only thing that works is:
    <add key="Telerik.Skin" value="Vista"/>

But this overrides everything in the site contrary to the documentation about EnableEmbeddedScript/EnableEmbeddedSkin - that says that page level overrides > control level in web.config overrides > global setting in web.config.

How should I configure web.config now? so that I have one default skin and then some specific skins for some controls?

Thanks,
Piyush

Michael
Top achievements
Rank 1
 answered on 26 Jun 2014
1 answer
120 views
Hi, We are using the PDF export on a grid with images which works fine apart from the pdf file size which at the moment is over 25MB. We have run the optimizer in Acrobat and it can reduce the file down to less than 1MB with it still looking fine. I think the size issue is due to the images not being optimized I have tried the filter set to Flate with little change. We use a dynamic library to re-size images on the fly but I see that the pdf generation access the original files from the file system which would be quite large especially considering that there are lots of images and we are only showing them at 50px by 50px. Is there a way to intercept the pdf generation at the point where it is accessing the image files from the file system so that we can optimize the image at that point before it inserts it?

Thanks
Michael
Kostadin
Telerik team
 answered on 26 Jun 2014
4 answers
162 views
I normally use a grid along with a gridbinaryimagecolumn to display images from the database in my grid.

How do I go about doing the same thing in a RadTreeList?  I've tried with a template column and a radbinaryimage but can't get a way of storing the database driven image into a hidden column.

Any suggestions?

Regards

Jon
Jon
Top achievements
Rank 1
 answered on 26 Jun 2014
1 answer
127 views
Hi!

I'm wondering if there is a possibility to place links in the shapes text or render the complete shape as a link.

Any help is very appreciated :)

Pascal
Slav
Telerik team
 answered on 26 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?