Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
173 views
Hi,

I need to change color of rating with black to rate and alternate to white.

Thanks,
Kaushal Jani
Bozhidar
Telerik team
 answered on 20 Apr 2012
8 answers
1.1K+ views
Hi,

I've tried everything I could dig up in every combination, but the Grid column widths just won't become static. I want to specify exact column size, but as it is, every grid and column shows up a different size depending on the data and it looks very bad.

This is the ASMX(I set the datasource via code):
    <telerik:RadGrid ID="rgrdOrders" runat="server" EnableEmbeddedSkins="False" ImagesPath="~\RadControls\Skins\GluckVision\Grid" 
        Skin="GluckVision" AutoGenerateColumns="False" GridLines="None" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" Width="100%">  
        <ExportSettings> 
            <Pdf FontType="Subset" PaperSize="Letter" /> 
            <Excel Format="Html" /> 
            <Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" /> 
        </ExportSettings> 
        <PagerStyle FirstPageImageUrl="~\RadControls\Skins\GluckVision\Grid\PagingFirst.gif" 
            LastPageImageUrl="~\RadControls\Skins\GluckVision\Grid\PagingLast.gif" NextPageImageUrl="~\RadControls\Skins\GluckVision\Grid\PagingNext.gif" 
            PrevPageImageUrl="~\RadControls\Skins\GluckVision\Grid\PagingPrev.gif" /> 
        <MasterTableView CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" 
            Dir="LTR" Frame="Border" TableLayout="Auto">  
            <CommandItemSettings AddNewRecordImageUrl="~\RadControls\Skins\GluckVision\Grid\AddRecord.gif" 
                RefreshImageUrl="~\RadControls\Skins\GluckVision\Grid\Refresh.gif" /> 
            <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterImageUrl="~\RadControls\Skins\GluckVision\Grid\Filter.gif" 
                FilterListOptions="VaryByDataType" SortAscImageUrl="~\RadControls\Skins\GluckVision\Grid\SortAsc.gif" 
                SortDescImageUrl="~\RadControls\Skins\GluckVision\Grid\SortDesc.gif" Visible="False">  
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn CollapseImageUrl="~\RadControls\Skins\GluckVision\Grid\SingleMinus.gif" 
                CurrentFilterFunction="NoFilter" ExpandImageUrl="~\RadControls\Skins\GluckVision\Grid\SinglePlus.gif" 
                FilterImageUrl="~\RadControls\Skins\GluckVision\Grid\Filter.gif" FilterListOptions="VaryByDataType" 
                Resizable="False" SortAscImageUrl="~\RadControls\Skins\GluckVision\Grid\SortAsc.gif" 
                SortDescImageUrl="~\RadControls\Skins\GluckVision\Grid\SortDesc.gif" Visible="False">  
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
            <EditFormSettings> 
                <EditColumn CancelImageUrl="~\RadControls\Skins\GluckVision\Grid\Cancel.gif" CurrentFilterFunction="NoFilter" 
                    EditImageUrl="~\RadControls\Skins\GluckVision\Grid\Edit.gif" FilterImageUrl="~\RadControls\Skins\GluckVision\Grid\Filter.gif" 
                    FilterListOptions="VaryByDataType" InsertImageUrl="~\RadControls\Skins\GluckVision\Grid\Insert.gif" 
                    SortAscImageUrl="~\RadControls\Skins\GluckVision\Grid\SortAsc.gif" SortDescImageUrl="~\RadControls\Skins\GluckVision\Grid\SortDesc.gif" 
                    UpdateImageUrl="~\RadControls\Skins\GluckVision\Grid\Update.gif">  
                </EditColumn> 
            </EditFormSettings> 
            <PagerStyle FirstPageImageUrl="~\RadControls\Skins\GluckVision\Grid\PagingFirst.gif" 
                LastPageImageUrl="~\RadControls\Skins\GluckVision\Grid\PagingLast.gif" NextPageImageUrl="~\RadControls\Skins\GluckVision\Grid\PagingNext.gif" 
                PrevPageImageUrl="~\RadControls\Skins\GluckVision\Grid\PagingPrev.gif" /> 
            <Columns> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="OrderNo" FilterImageUrl="RadControls/Skins/GluckVision/Grid\Filter.gif" 
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Order #" 
                    SortAscImageUrl="RadControls/Skins/GluckVision/Grid\SortAsc.gif" SortDescImageUrl="RadControls/Skins/GluckVision/Grid\SortDesc.gif" 
                    UniqueName="column">  
                    <FooterStyle Width="100px" /> 
                    <HeaderStyle Width="100px" /> 
                    <ItemStyle Width="100%" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Status" FilterImageUrl="RadControls/Skins/GluckVision/Grid\Filter.gif" 
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Status" 
                    SortAscImageUrl="RadControls/Skins/GluckVision/Grid\SortAsc.gif" SortDescImageUrl="RadControls/Skins/GluckVision/Grid\SortDesc.gif" 
                    UniqueName="column1">  
                </telerik:GridBoundColumn> 
                <telerik:GridDateTimeColumn CurrentFilterFunction="NoFilter" DataField="OrderDate" DataFormatString="{0:dd/MM/yy}" 
                    FilterImageUrl="RadControls/Skins/GluckVision/Grid\Filter.gif" FilterListOptions="VaryByDataType" 
                    ForceExtractValue="None" HeaderText="Order Date" SortAscImageUrl="RadControls/Skins/GluckVision/Grid\SortAsc.gif" 
                    SortDescImageUrl="RadControls/Skins/GluckVision/Grid\SortDesc.gif" UniqueName="column2" DataType="System.DateTime">  
                </telerik:GridDateTimeColumn> 
            </Columns> 
        </MasterTableView> 
        <FilterMenu NotSelectedImageUrl="~\RadControls\Skins\GluckVision\Grid\NotSelectedMenu.gif" 
            SelectedImageUrl="~\RadControls\Skins\GluckVision\Grid\SelectedMenu.gif"></FilterMenu> 
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">  
        </ClientSettings> 
        <HeaderStyle Width="100px" /> 
    </telerik:RadGrid> 

This grid uses a custom skin and column filters.

Any ideas?

Thanks,
Kia
Sachidanand
Top achievements
Rank 1
 answered on 20 Apr 2012
1 answer
102 views
I have an exportToPdf function call which I copied from your demo. It's supposed to store the pdf to a byte stream and save it to a file. The code snippets are below:

Aspx
<telerik:RadEditor ID="c_reMessage" runat="server" ContentFilters= "DefaultFilters,PdfExportFilter" Height="345" Width="760">
    <ExportSettings OpenInNewWindow="true"></ExportSettings>
     <Tools>
           <telerik:EditorToolGroup>
                 <telerik:EditorTool Name="Print"/>
                 <telerik:EditorTool Name="AjaxSpellCheck"/>
                 <telerik:EditorTool Name="FindAndReplace"/>
                 <telerik:EditorTool Name="SelectAll"/>
                 <telerik:EditorTool Name="Cut"/>
                 <telerik:EditorTool Name="Copy"/>
                 <telerik:EditorTool Name="Paste"/>
                 <telerik:EditorTool Name="PasteStrip"/>
                 <telerik:EditorSeparator />
                 <telerik:EditorTool Name="Undo"/>
                 <telerik:EditorTool Name="Redo"/>                                                                                     
                 <telerik:EditorTool Name="ImageManager"/>
                 <telerik:EditorSeparator />
                 <telerik:EditorTool Name="LinkManager"/>
                 <telerik:EditorTool Name="Unlink"/>
            </telerik:EditorToolGroup>  
             <telerik:EditorToolGroup>
                 <telerik:EditorTool Name="ForeColor"/>
                 <telerik:EditorTool Name="BackColor"/>
                 <telerik:EditorTool Name="ApplyClass"/>
                 <telerik:EditorTool Name="FormatStripper"/>                                       
                 <telerik:EditorTool Name="InsertTable"/>
                 <telerik:EditorTool Name="InsertFormElement"/>
                 <telerik:EditorTool Name="ToggleScreenMode"/>                                             
            </telerik:EditorToolGroup>                                       
            <telerik:EditorToolGroup>
                 <telerik:EditorTool Name="FormatBlock"/>
                 <telerik:EditorTool Name="FontName"/>
                 <telerik:EditorTool Name="RealFontSize"/>                                       
                 <telerik:EditorTool Name="AbsolutePosition"/>
                 <telerik:EditorSeparator />
                 <telerik:EditorTool Name="Bold"/>
                 <telerik:EditorTool Name="Italic"/>
                 <telerik:EditorTool Name="Underline"/>
                 <telerik:EditorTool Name="StrikeThrough"/>
                 <telerik:EditorSeparator />
                 <telerik:EditorTool Name="JustifyLeft"/>
                 <telerik:EditorTool Name="JustifyCenter"/>
                 <telerik:EditorTool Name="JustifyRight"/>
                 <telerik:EditorTool Name="JustifyFull"/>
                 <telerik:EditorTool Name="JustifyNone"/>
                 <telerik:EditorSeparator />
                 <telerik:EditorTool Name="Indent"/>
                 <telerik:EditorTool Name="Outdent"/>
                 <telerik:EditorSeparator />
                 <telerik:EditorTool Name="InsertOrderedList"/>
                 <telerik:EditorTool Name="InsertUnorderedList"/>
                 <telerik:EditorSeparator />
                 <telerik:EditorTool Name="ToggleTableBorder"/>
                 <telerik:EditorTool Name="XhtmlValidator"/>
            </telerik:EditorToolGroup>
                                        
     </Tools>                            
</telerik:RadEditor>

vb.net
   Private Sub c_ibtnAuditPlanComplete_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles c_ibtnAuditPlanComplete.Click
           c_reMessage.ExportToPdf()
  
...
 
 
   Private Sub c_reMessage_ExportContent(ByVal sender As Object, ByVal e As Telerik.Web.UI.EditorExportingArgs) Handles c_reMessage.ExportContent
        ' this will run when the pdf export method is called
        Dim fileData As Byte()
        fileData = System.Text.Encoding.Default.GetBytes(e.ExportOutput)

All of this works fine in IE and FireFox, but in Chrome it never gets to the c_reMessage_ExportContent sub. I have tried it with both OpenNewWindow set to true and false. With true, it attempts to open Adobe and fails. With false, it just hangs. Note that I don't actually want the pdf to open in a window, and there is a redirect further down in the ExportContent sub that prevents that, but it never gets there.

Can you tell me what I need to do to get this to work in Chrome?
 
FYI, sometimes if I call c_reMessage.ExportToPdf() repeatedly in Chrome, it will work, but not always.
Rumen
Telerik team
 answered on 20 Apr 2012
1 answer
153 views
Setting header text property for clientselectcolumn is not shown in grid. I want to show a text for the column.Please help.

<telerik:GridClientSelectColumn UniqueName="Select" HeaderText="Select All">
                    </telerik:GridClientSelectColumn>
Princy
Top achievements
Rank 2
 answered on 20 Apr 2012
1 answer
128 views
Hello,
I'm having a rendering issue with RadDateTimePicker and RadDatePicker controls.
When I set the selected date on server side the control display for a little time a strange value: 2012-04-17-15-19-33. Moreover the input control overlaps the first icon. I have attached a sample picture (raddatetimepicker_before.jpg).
After some milliseconds the control renders fine (raddatetimepicker_after.jpg).

My users complain that the control "flickers" when the page start and infact this behavior is strange.
Is there a way to avoid this behavior?

Thanks.

EDIT
I don't have an update panel in all of my pages and I cannot insert it when there isn't. I have done a simple test and if I wrap the control with an update panel I don't have the issue.
Vasil
Telerik team
 answered on 20 Apr 2012
6 answers
191 views
Hello, 
  I have a project in which have two DetailTables at the same level which need to be binded programatically at the same time. I have tried the example for binding DetailTables programmatically, however it only allows me to set one datasource property so the example does not work in this instace. I have been unable to find any examples of this, nor have I been able to figure it out by combining the "Multiple DetailTables at the Same-Level" example with the "Bind Hierarchy Programmatically" example. Any help would be greatly appreciated.

<telerik:RadGrid ID="rg_Report" runat="server" 
AutoGenerateColumns="false" 
PageSize="25" 
AllowPaging="true" 
OnDataBinding="rg_Report_DataBinding"   
onitemcommand="rg_Report_ItemCommand" 
ondetailtabledatabind="rg_Report_DetailTableDataBind"   
> 
<PagerStyle Mode="NumericPages" /> 
<MasterTableView DataKeyNames="PackageId">  
    <DetailTables> 
        <telerik:GridTableView DataKeyNames="package_id" Name="PackageNotes" Width="100%">  
            <Columns> 
                <telerik:GridBoundColumn UniqueName="Notes" DataField="notes" HeaderText="Notes">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn UniqueName="ShipNotes" DataField="shipnotes" HeaderText="Ship Notes">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </telerik:GridTableView> 
        <telerik:GridTableView DataKeyNames="package_id" Name="TrackingScans" Width="100%">  
            <Columns> 
                <telerik:GridBoundColumn UniqueName="ScanDesc" DataField="scandesc" HeaderText="Scan Description">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn UniqueName="Location" DataField="location" HeaderText="Location">  
                </telerik:GridBoundColumn> 
                <telerik:GridDateTimeColumn UniqueName="DateTime" DataField="date_time" HeaderText="Date">  
                </telerik:GridDateTimeColumn> 
                <telerik:GridBoundColumn UniqueName="Notes" DataField="notes" HeaderText="Notes">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </telerik:GridTableView> 
    </DetailTables>                          
    <Columns> 
        <telerik:GridBoundColumn UniqueName="PackageId" DataField="PackageId" HeaderText="Package ID" 
            ConvertEmptyStringToNull="true">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn UniqueName="Recipient" DataField="Recipient" HeaderText="Recipient">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn UniqueName="Location" DataField="location" HeaderText="Location">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn UniqueName="Room" DataField="room" HeaderText="Room/Cube">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn UniqueName="Sender" DataField="Sender" HeaderText="Sender">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn UniqueName="Carrier" DataField="Carrier" HeaderText="Carrier">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn UniqueName="TrackingNumber" DataField="TrackingNumber" HeaderText="Tracking #">  
        </telerik:GridBoundColumn> 
        <telerik:GridDateTimeColumn UniqueName="DateReceived" DataField="DateReceived" HeaderText="Date Received">  
        </telerik:GridDateTimeColumn> 
    </Columns> 
</MasterTableView> 
 

    protected void rg_Report_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)  
    {  
        GridDataItem dataItem = e.DetailTableView.ParentItem;  
 
        string spackageId = dataItem["PackageId"].Text.Replace("&nbsp;""");  
 
        if (!String.IsNullOrEmpty(spackageId.Trim()))  
        {  
            packageId = Convert.ToInt32(spackageId);  
        }  
 
        if (packageId != null)  
        {  
            switch (e.DetailTableView.Name)  
            {  
                case "PackageNotes":  
                    {  
                        e.DetailTableView.DataSource = reportProcs.GetPackageNotes(packageId);  
 
                        break;  
                    }  
                case "TrackingScans":  
                    {  
                        e.DetailTableView.DataSource = reportProcs.GetTrackingScans(packageId);  
 
                        break;  
                    }  
            }  
        }  
        else 
        {  
            e.DetailTableView.DataSource = null;  
        }  
    }  
 
Mukul
Top achievements
Rank 1
 answered on 20 Apr 2012
6 answers
89 views
I am having issues with using CascadingDropDowns with AdvancedInsert/Edit templates. As soon as I add them to the form and attach to couple of DropDowns iot becomes inoperable. The Save and Cancel buttons can no longer be clicked. Could you please let me know if there are any known bugs with Advanced Templates and CascadingDropDowns? Thanks
Peter
Telerik team
 answered on 20 Apr 2012
1 answer
53 views
pls help me............................

Thankssssssssssssssss
Shinu
Top achievements
Rank 2
 answered on 20 Apr 2012
3 answers
117 views

Please help?

If I want to see below chart clearly, am trying to zoom in the chart by selecting some portion from chart.

Then, Screen is coming up as  attached Chart View Issue Due to number of x-Axis scale points1.


XY-axis Label’s position Issue: 
DID YOU OBSERVE THE X-AXIS AND Y-AXIS LABLE NAMES ARE AT THE SCALING POINT X-AXIS AROUND 25 AND Y-AXIS AROUND 150, NOW IF I SCROLL THE XYAXIS THE AXIS LABLE NAMES ARE STICKING AT 25,150 POINTS.

EXAMPLE, NOW AM ZOOMING IN MORE AND TRYING TO SCROLLING LEFT OR RIGHT ON X-AXIS AT SOME POINT, I CAN’T SEE THE LABLE NAME PLEASE SEE BELOW FOR UNDERSTANDING.

THE SAME SITUATION HAPPEN FOR YAXIS LABEL ALSO.

Please refer image XY-axis Label’s position Issue

Is this possible to limit the distance between two scale points on x-Axis ?

After I click on Zoom In, It is taking about 3mints to zoom the chart, is there any option to kill the performance?

Ves
Telerik team
 answered on 20 Apr 2012
4 answers
253 views
I have 2 listboxes on my page, I tried the allowduplicates = false and it still does not work.  what I have is a 1st LB that takes many values and they drag and drop which ones they want to a second LB, however they can reload the 1st lb with the same Id's sometimes and tehn drag tehm over agian becuase in the db I do not failsafe that they cannot get ahold of the id until they save.  I put allowSuplicates to false but it still happens, what is my way to get around this without haveing to write a bunch of codebehind to cut it out or figure out Javascript to work with it as well.

<table width="100%">
                                       <tr>
                                           <td style="width:15%"></td>
                                           <td style="width:30%"><telerik:RadListBox ID="lbItems" runat="server" Width="300px" Height="450px" AllowTransferOnDoubleClick="true" EnableDragAndDrop="true" CssClass="aspControl" 
                                                                   SelectionMode="Multiple" AllowTransfer="true" TransferToID="lbIssue" AllowTransferDuplicates="false" /></td>
                                           <td style="width:10%"></td>
                                           <td style="width:30%"><telerik:RadListBox ID="lbIssue" runat="server" Width="300px" Height="450px" CssClass="aspControl" AllowTransferDuplicates="false"></telerik:RadListBox></td
                                           <td style="width:15%"></td>      
                                       </tr>
                                   </table>

Here are the follwoing 2 events that can load the 1st dropdownlist.

Protected Sub txtSearch_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtSearch.TextChanged
        Dim Id As Integer = HFSN.Value
        ClearLookup()
        lbItems.Items.Clear()
  
        sql = "Select dr.intRecId, dr.strSN  + ' \ ' + dm.strMake + ' ' + m.strModel SN from Drat_Received dr INNER JOIN Drat_Model m on m.intModelId = dr.intModelId INNER JOIN Drat_Make dm on dm.intMakeId = " _
            & "m.intMakeId where dr.intRecId = " & Id & " And intTransTypeID = 4 and bitTempRec IS NULL"
  
        lbItems.DataSource = getData(sql)
        lbItems.DataValueField = "intRecId"
        lbItems.DataTextField = "SN"
        lbItems.DataBind()
  
    End Sub

Protected Sub ddlModel_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlModel.SelectedIndexChanged
    Dim Id As Integer = ddlModel.SelectedValue
    ClearLookup()
    lbItems.Items.Clear()
    sql = "Select dr.intRecId, dr.strSN  + ' \ ' + dm.strMake + ' ' + m.strModel SN from Drat_Received dr INNER JOIN Drat_Model m on m.intModelId = dr.intModelId INNER JOIN Drat_Make dm on dm.intMakeId = " _
        & "m.intMakeId where dr.intModelId = " & Id & " And intTransTypeID = 4  and bitTempRec IS NULL Order by dr.strSN"
    lbItems.DataSource = getData(sql)
    lbItems.DataValueField = "intRecId"
    lbItems.DataTextField = "SN"
    lbItems.DataBind()
End Sub


Kate
Telerik team
 answered on 20 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?