Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
56 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
156 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
889 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
128 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
186 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
133 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
4 answers
623 views
What I have is a radgrid, wonderfully populated with data. On each row of this grid, I have three buttons (inherited from RadButtons). One of these buttons does not need any confirmation. Two of them, however, need confirmation before firing ItemCommand.

Part of the issue is a certain convoluted way the button is implemented, it requires me to use fireCommand from JavaScript. However, I need to obtain the row index to pass as a parameter to the fireCommand function.

How do I obtain the row index of the row containing my button for use in JavaScript?

01.function OnClientClickingDelete(sender, args) {
02.    var r = confirm('This action will delete the selected employee. Are you sure?');
03. 
04.    if (r == true) {
05.        var masterTable = $find('<%= rgEnrolled.ClientID %>').get_masterTableView();
06.        masterTable.fireCommand('Delete', ****RowIndex****);
07.    }
08.}
09. 
10.function OnClientClickingRestore(sender, args) {
11.    var r = confirm('This action will restore the selected employee. Are you sure?');
12. 
13.    if (r == true) {
14.        var masterTable = $find('<%= rgEnrolled.ClientID %>').get_masterTableView();
15.        masterTable.fireCommand('Restore', ****RowIndex****);
16.    }
17.}
Eyup
Telerik team
 answered on 26 Jun 2014
12 answers
1.0K+ views
Hi ,

I want to export the data to a excel file from the rad grid which have a hirarchical data.
I tried exporting in normal grid. It works fine. But i dont know how to do the same for hirarchical data.
If anybody knows the answer please let me know.

Thanks & Regards,
Pradeep K S
Daniel
Telerik team
 answered on 26 Jun 2014
8 answers
175 views
 void rdsch_AppointmentDataBound(object sender, SchedulerEventArgs e) 
        { 
               e.Appointment.AllowDelete = false; 
                e.Appointment.AllowEdit = false; 
         } 
If I set atrributes "AllowDelte" and "AllowEdit" on false, I can delete and edit appointment - why????
Plamen
Telerik team
 answered on 26 Jun 2014
1 answer
78 views
Hello,

I am using editor.get_html(true) in order to copy editor's content to a div, but when I only change  the text color, the color style isn't copied to a div.

I think the problem is that the color style is added to the body where it should wrap the text by span with color style.

*screenshot of the editor html is attached.

Scenario to reproduce:

1. mark the text
2. change the text color to red
3. use  editor.get_html(true) to copy the html content to a div
4. It can be notice the color red doesn't appear

Telerik version: 2014.1.225.40

Thanks,

Ianko
Telerik team
 answered on 26 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?