Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
281 views
Hello!

I've seen couple of examples on how to validate RadComboBox with RequiredFieldValidator, but I can't get it working. In my scenario I have RadGrid with EditUserControl which has couple of RadComboBoxes I tried to validate, but without any success. What happens is that on a button click code is executed, but without any validation.

This is the code example of a UserControl:

<div class="ucWrapper">
    <div class="ucLeft">
        <table>
            <tr>
                <td>
                    Vrsta prijave:
                </td>
                <td>
                    <telerik:RadComboBox ID="rcbVrstaPrijave" Text='<%# DataBinder.Eval(Container, "DataItem.VrstaPrijave") %>'
                        runat="server" Skin="Hay">
                    </telerik:RadComboBox>
                    <asp:RequiredFieldValidator ID="rfv1" ControlToValidate="rcbVrstaPrijave"
                        runat="server" ErrorMessage="*" InitialValue="0"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Tip:
                </td>
                <td>
                    <telerik:RadComboBox ID="rcbTip" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Tip") %>'
                        Skin="Hay">
                    </telerik:RadComboBox>
                                   
                    Status:               
                    <telerik:RadComboBox ID="rcbStatus" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Status") %>'
                        Skin="Hay">
                    </telerik:RadComboBox>
                    <asp:RequiredFieldValidator runat="server" ID="rfv2" ValidationGroup="Group1" ControlToValidate="rcbTip"
                        Display="dynamic" ErrorMessage="*" />
                </td>
            </tr>
            <tr>
                <td>
                    Opis:
                </td>
                <td>
                    <asp:TextBox ID="txtOpis" runat="server" TextMode="MultiLine" Width="455px" Height="200px"
                        Text='<%# DataBinder.Eval(Container, "DataItem.Opis") %>' Font-Names="Calibri"
                        Font-Size="10pt"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnUpdate" Text="Spremi" runat="server" CommandName="Update" ValidationGroup="Group1" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>'>
                    </asp:Button>
                    <asp:Button ID="btnInsert" Text="Spremi" runat="server" ValidationGroup="Group1" CommandName="PerformInsert"
                        Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>'></asp:Button>
                </td>

Any help would be appreciated.

Thank you,

Hrvoje
Dimitar Terziev
Telerik team
 answered on 28 Oct 2011
1 answer
193 views
First, we remove ShowOnFocus option from Radeditor because there were a lot of bugs, and i had no ideas how to fix it.
Second, even with static radeditor without any floating toolbars bugs presented.
1. If I add RadToolTip for radeditor, and move mouse on toolbar there are two tooltips - one from radeditor, second - radtooltip with custom message. How to add radTooltip ONLY for CONTENT of radeditor< not fow whole radeditor - i don't know.
2. Alignment options in FF. Under different browsers, radeditor generates different content tegs. Under firefox it generates <div align="center"></div> - if at first click on some align, but if I click for example on 'bold' it generates <b></b> and after that align apply to parent teg reContentArea reContentAreaToggle - how to fix it I don't know. 
Is any way to unify generating content of radeditor, in order to have the same content under all browsers?
Rumen
Telerik team
 answered on 28 Oct 2011
4 answers
231 views
Hi,

Could anyone tell me how can I change the  font size of the "remove" button that gets displayed after you select a file to upload in "AsyncUpload" control? Changing "Font-size" only changes the font size of the filename to be uploaded but not the "remove" button.

<telerik:RadAsyncUpload ID="importFileUpload" runat="server" Localization-Select="Browse" InputSize="50" MaxFileInputsCount="1" Font-Size="12pt">    
</telerik:RadAsyncUpload>


Many thanks.

MG
Dimitar Terziev
Telerik team
 answered on 28 Oct 2011
1 answer
81 views
The printing option works well.  I think I know what the answer is but not certain how to execute it.  When I print I would like to do three things:
  1. Remove the buttons from the print-out.  I have a set of standard and radbuttons on the screen and I would assume this is done using CSS but not certain exact syntax required to achieve that.
  2. Is it possible to print without showing the popup window and just having the print box come up?
  3. Is there a way I can control printing of portrait or landscape or is that something you just have to do using the print properties button?

Thanks for the follow-up to this.
Shane
Rumen
Telerik team
 answered on 28 Oct 2011
2 answers
202 views
I'm trying to understand how the RadScheduler interacts with the database, as I'd like to use one for handling both recurring and non-recurring schedules, but I need to tie it into a clock-in system that can identify whether a user has clocked in for a particular occurence of an appointment (including individual recurrence of an recurring appointment). It also may involve users in different timezones.

So here are some questions:

1) User A is in California (PST), User B is in Alabama (CST), and the server is in EST timezone. User A creates an appointment for 3-5pm their time (PST). User B creates an appointment for 3-5pm their time (CST). What time is actually stored in the database in the start and end fields by the RadScheduler for each of these users? Does it store it in UTC time? As the server time? In their local time? How does it know they're on different timezones so that the EST user sees his own appointment as 3pm-5pm but sees the California appointment as 6pm-8pm if both appointments show on one calendar?

2) When a user clocks in for a recurring appointment, every Monday 5pm to 8pm for instance, is there any unique ID between occurences of a recurring appointment that I can use to tie an October 24th clock-in to a different ID than an October 31st clock-in? Is there a simple way to take advantage of recurring appointments while still being able to know whether someone has clocked in for a particular instance of the recurring appointment?

3) If I need to access appointments created through the RadScheduler from code that is not part of RadScheduler, such as in my check-in code, are there any Rad data classes/structures I can reference that allow me to easily query whether a particular date and time falls within any of my scheduled appointments (including their recurrences)? I'm concerned about whether I can easily retrieve the data created by RadScheduler in code elsewhere for other purposes.
Peter
Telerik team
 answered on 28 Oct 2011
1 answer
211 views
Hi,
We are using Telerik rad editor control on one of our web pages. The issue I am facing is that the editor seems to be adding several <p>  tags in the html. I am aware that you"ll have a few forums where this is discussed but the scenarios are always different and there does not seem to be a fixed answer. I have tried some some of the solutions mentioned in those forums i,.e setting the NewLineBr (tried both true and false) and disabling the ConvertToXhtml filter. The NewLineBr did not work at all . However the ConvertToXhtml filter gave mixed success in the sense that it changed the color attributes in the HTML for eg
color: #663366 to color: rgb(102, 51, 102);
This may be effectively the same thing but it is still different HTML. Hence it makes me feel a little uncomfortable using this filter as I am not aware of any pros and cons of using this.
Can somebody let me know if there is any other way to fix this issue. As a sample please see the HTML below. Note that when <p> tags are inserted it looks like:
 <p style="text-align: center;"><span style="font-family: arial; color: #663366; font-size: 16px;">Activity</span></p>              <p>              </td>
Also the tags are inserted from server side as well as client side( i.e. when we switch back and forth between design and HTML views)
<p style="text-align: right;"> </p>
<p> <span style="line-height: 1.33em; font-family: arial; color: #663366; font-size: 24px;">Prepare sales materials</span> </p>
<p>
<table style="width: 100%;" border="1" cellpadding="10">
    <tbody>
        <tr>
            <td style="width: 50%;" valign="top">
            <p style="text-align: center;"><span style="font-family: arial; color: #663366; font-size: 16px;">Activity</span></p>
            </td>
            <td style="width: 50%;" valign="top">
            <p style="text-align: center;"><span style="font-family: arial; color: #663366; font-size: 16px;">How to</span></p>
            </td>
        </tr>
        <tr>
            <td valign="top"><span style="font-family: arial; color: #663366; font-size: 14px;">
            <ol>
                <li>Prepare appropriate literature: brochures, white papers, and journal articles </li>
            </ol>
            </span></td>
            <td valign="top"><span style="font-family: arial; color: #663366; font-size: 14px;">
            <ul>
                <li>Order Literature through <a href="http://hospira.litorders.com/" target="_blank"><span style="color: #3333ff;">Comac</span></a><span style="color: #3333ff;"> </span></li>
            </ul>
            <p><a href="https://www.gosavo.com/prod/Post/Post.aspx?id=955015&;view="><strong><span style="color: #663366;">Click Here</span></strong></a><span style="color: #663366;"> for EffectIV<span style="font-family: arial,sans-serif;"><sup>TM  </sup></span><br />
            </span><a href="https://www.gosavo.com/prod/Post/Post.aspx?id=955027&;view="><strong><span style="color: #663366;">Click Here</span></strong></a><span style="color: #663366;"> for AMC<span style="font-family: arial,sans-serif;"><sup>TM </sup></span><br />
            </span><a href="https://www.gosavo.com/prod/Post/Post.aspx?id=955068&;view="><strong><span style="color: #663366;">Click Here</span></strong></a><span style="color: #663366;"> for <span style="font-family: arial,sans-serif;">ChemoCLAVE<sup><span style="font-size: 13px;">TM</span> </sup></span></span></p>
            </span></td>
        </tr>
        <tr>
            <td style="background-color: #e2e2e2;" valign="top"><span style="font-family: arial; color: #663366; font-size: 14px;">
            <ol start="2">
                <li>Order product samples </li>
            </ol>
            </span></td>
            <td style="background-color: #e2e2e2;" valign="top"><span style="font-family: arial; color: #663366; font-size: 14px;">
            <ul>
                <li>Complete a <a href="http://DELTA Demo Unit Order form" target="_blank"><span style="color: #3333ff;">DELTA Demo Unit Order form</span></a>  and fax into the Delta program </li>
            </ul>
            </span></td>
        </tr>
        <tr>
            <td valign="top"><span style="font-family: arial; color: #663366; font-size: 14px;">
            <ol start="3">
                <li>Ensure computer tools are loaded on computer </li>
            </ol>
            </span></td>
            <td valign="top"><span style="font-family: arial; color: #663366; font-size: 14px;">
            <ul>
                <li>CLAVE<span style="font-family: arial,sans-serif;"><sup>TM</sup></span> Computer Selling Tool </li>
            </ul>
            </span></td>
        </tr>
        <tr>
            <td style="background-color: #e2e2e2;" valign="top"><span style="font-family: arial; color: #663366; font-size: 14px;">
            <ol start="4">
                <li>Recommended product configurations </li>
            </ol>
            </span></td>
            <td style="background-color: #cccccc;">
            <ul>
                <li><span style="color: #663366; font-size: 14px;">This can be done with literature, based on customer's best practice. </span></li>
            </ul>
            </td>
        </tr>
    </tbody>
</table>
</p>
Rumen
Telerik team
 answered on 28 Oct 2011
1 answer
198 views
Hello,

I'm having problems getting the value of RadDatePicker and using that value as an input for my SQL statement.  The query works if I replace the variables to normal values.

Here is my code snippet.

<asp:SqlDataSource ID="SqlDataSource" runat="server"
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
        SelectCommand="SELECT column, column, column, column, column
FROM table A, table B
WHERE (A.ACCEPTANCE_DATE >= TO_DATE(:fromDate, 'dd-mon-yyyy'))
AND (A.ACCEPTANCE_DATE <= TO_DATE(:toDate, 'dd-mon-yyyy'))
AND column = column
AND (column LIKE 'A')
ORDER BY column, column">
         
        <SelectParameters>
            <asp:ControlParameter ControlID="radDatePickerFrom" Name="fromDate" />
            <asp:ControlParameter ControlID="radDatePickerTo" Name="toDate" />
        </SelectParameters>
   </asp:SqlDataSource>
Vasil
Telerik team
 answered on 28 Oct 2011
1 answer
54 views
I just started today on trying out Telerik's controls for Visual Studio 2010. I've downloaded the Ultimate Collection for .Net. I have used LINQ-to-SQL and ASP.NET Configuration to setup roles and membership in the past with all my dynamic asp.net website. Are there some tools or other easier ways of setting up membership and roles when using telerik tools?

Any pointers or suggestions is much appreciated.
Sebastian
Telerik team
 answered on 28 Oct 2011
2 answers
274 views
Hi Team,
I have a aradgrid with some bound columns, CheckBox column and ClientSelect Column
What I want is, when I select All Rows (by clicking select all), i dont want some of the rows to get selected based on the values in my CheckBox column.
And I want this functionality from client side.
I tried this with server side DataBound Event and it worked (though not completly.)

here is my aspx :
<telerik:RadGrid ID="rgProjectBudget" runat="server" AllowFilteringByColumn="true" AllowMultiRowSelection="true" AllowPaging="true"
                                            OnNeedDataSource="rgProjectBudget_NeedDataSource" OnDeleteCommand="rgProjectBudget_DeleteCommand" PageSize="50"
                                            OnItemDataBound="rgProjectBudget_ItemDataBound" OnPreRender="rgProjectBudget_PreRender" PagerStyle-AlwaysVisible="true" >
                                            <ClientSettings  Selecting-AllowRowSelect="true">
                                                <ClientEvents OnRowSelected="RowSelected" />
                                            </ClientSettings>
                                    <MasterTableView EditMode="InPlace">
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="COABudgetDetailID" DataType="System.Int32"
                                                                HeaderText="COABudgetDetailID" Display="false"
                                                                UniqueName="COABudgetDetailID" AutoPostBackOnFilter="true">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="EntityKeyName" DataType="System.String" FilterControlWidth="40%"
                                                                HeaderText="Project Name" AllowFiltering="true" AutoPostBackOnFilter="true"
                                                                CurrentFilterFunction="Contains" UniqueName="EntityKeyName">
                                            <HeaderStyle Width="32%" HorizontalAlign="Left" />
                                            <ItemStyle  Width="32%" HorizontalAlign="Left" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="ChartOfAccountSetDetailValueCode" DataType="System.String"
                                                                HeaderText="Project Heads" AllowFiltering="true" AutoPostBackOnFilter="true" FilterControlWidth="30%"
                                                                CurrentFilterFunction="Contains" UniqueName="ChartOfAccountSetDetailValueCode">
                                             <HeaderStyle Width="10%" HorizontalAlign="Left" />
                                            <ItemStyle  Width="10%" HorizontalAlign="Left" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="ChartOfAccountSetDetailDescription" DataType="System.String"
                                                                 HeaderText="Description" AllowFiltering="true" AutoPostBackOnFilter="true"
                                                                 CurrentFilterFunction="Contains" UniqueName="ChartOfAccountSetDetailDescription"
                                                                 FilterControlWidth="60%">
                                            <HeaderStyle Width="20%" HorizontalAlign="Left" />
                                            <ItemStyle  Width="20%" HorizontalAlign="Left" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="QuotedValue" HeaderText="Quoted Amount" DataField="QuotedValue"
                                                                 CurrentFilterFunction="EqualTo" AllowFiltering="true" DataType="System.Double" FilterControlWidth="30%"
                                                                 AutoPostBackOnFilter="true">
                                            <HeaderStyle Width="10%" HorizontalAlign="Left" />
                                            <ItemStyle  Width="10%" HorizontalAlign="Left" />
                                        </telerik:GridBoundColumn>
                                         <telerik:GridTemplateColumn HeaderText="Project Budget" UniqueName="SecondaryEntityBudget" DataField="SecondaryEntityBudget"
                                                                    CurrentFilterFunction="Contains" AllowFiltering="true" AutoPostBackOnFilter="true">
                                                                    <ItemStyle Width="10%" />
                                            <ItemTemplate>
                                               <asp:TextBox ID="txtBudgetAmount" runat="server" Width="70px"
                                                        Text='<%# DataBinder.Eval(Container,"DataItem.SecondaryEntityBudget") %>' />
                                            </ItemTemplate>
                                             <HeaderStyle Width="10%" HorizontalAlign="Left" />
                                            <ItemStyle  Width="10%" HorizontalAlign="Left" />
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridBoundColumn UniqueName="COAActualAmount" HeaderText="Actual Amount" DataField="COAActualAmount"
                                                                 CurrentFilterFunction="EqualTo" AllowFiltering="true" DataType="System.Double" FilterControlWidth="30%"
                                                                 AutoPostBackOnFilter="true">
                                            <HeaderStyle Width="10%" HorizontalAlign="Left" />
                                            <ItemStyle  Width="10%" HorizontalAlign="Left" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridTemplateColumn HeaderText="Supplementary Budget1" UniqueName="SupplementaryBudget1" Display="true" DataField="SupplementaryBudget1"
                                                                    CurrentFilterFunction="Contains" AllowFiltering="true" AutoPostBackOnFilter="true">
                                                                    <ItemStyle Width="20%" />
                                            <ItemTemplate>
                                               <asp:TextBox ID="txtSupplementaryBudget1" runat="server" Width="70px" Enabled="false"
                                                        Text='<%# DataBinder.Eval(Container,"DataItem.SupplementaryBudget1") %>' />
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Supplementary Budget2" UniqueName="SupplementaryBudget2" Display="true" DataField="SupplementaryBudget2"
                                                                    CurrentFilterFunction="Contains" AllowFiltering="true" AutoPostBackOnFilter="true">
                                            <ItemStyle Width="20%" />
                                            <ItemTemplate>
                                               <asp:TextBox ID="txtSupplementaryBudget2" runat="server" Width="70px" Enabled="false"
                                                        Text='<%# DataBinder.Eval(Container,"DataItem.SupplementaryBudget2") %>' />
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridBoundColumn DataField="StatusID" DataType="System.Int32"
                                                                 HeaderText="StatusID" UniqueName="StatusID"
                                                                 Display="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridHyperLinkColumn DataTextField="StatusName" DataType="System.String" ItemStyle-HorizontalAlign="Center"
                                                                 HeaderText="Status" UniqueName="StatusName" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true"
                                                                 DataNavigateUrlFields="COABudgetDetailID,SecondaryEntityBudget,SupplementaryBudget1,SupplementaryBudget2"
                                                                 DataNavigateUrlFormatString="javascript:CheckBudgetAmount({0},{1},{2},{3});" >
                                        </telerik:GridHyperLinkColumn>
                                        <telerik:GridBoundColumn DataField="SecondaryEntityBudgetApproved" DataType="System.Double" Display="false"
                                                                 HeaderText="SecondaryEntityBudgetApproved" UniqueName="SecondaryEntityBudgetApproved">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="SupplementaryBudget1Approved" DataType="System.Double" Display="false"
                                                                 HeaderText="SupplementaryBudget1Approved" UniqueName="SupplementaryBudget1Approved">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="SupplementaryBudget2Approved" DataType="System.Double" Display="false"
                                                                 HeaderText="SupplementaryBudget2Approved" UniqueName="SupplementaryBudget2Approved">
                                        </telerik:GridBoundColumn>
                                        <%--<telerik:GridBoundColumn DataField="StatusName" DataType="System.String"
                                                                 HeaderText="Status" UniqueName="Status">
                                        </telerik:GridBoundColumn>--%>
                                          
                                        <telerik:GridTemplateColumn HeaderText="Not Applicable" UniqueName="IsBudgetNotApplicable" FilterControlWidth="20%"
                                                                    CurrentFilterFunction="Contains" AllowFiltering="true" AutoPostBackOnFilter="true" Display="false">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chkApplicable" runat="server" Checked='<%# DataBinder.Eval(Container,"DataItem.IsBudgetNotApplicable") %>' />
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Left" Width="5%"/>
                                            <HeaderStyle  Width="5%" />
                                        </telerik:GridTemplateColumn>
                                          
                                        <telerik:GridCheckBoxColumn DataField="IsParent" UniqueName="IsParent" HeaderText="IsParent" Visible="true">
                                        </telerik:GridCheckBoxColumn>
                                          
                                        <telerik:GridClientSelectColumn HeaderText="Select" UniqueName="Select">
                                        </telerik:GridClientSelectColumn>
                                        <telerik:GridButtonColumn CommandName="Delete" HeaderText="Delete?"
                                            Text="Delete" UniqueName="DeleteCommandColumn" ButtonType="ImageButton" 
                                                        ConfirmText="Are you sure you want to delete ?">
                                            <ItemStyle HorizontalAlign="Left" Width="5%"/>
                                            <HeaderStyle Width="5%" />
                                        </telerik:GridButtonColumn>
                                    </Columns>
                                </MasterTableView>
                           </telerik:RadGrid>


And I have reached upto this :

 

function RowSelected(sender, eventArgs)

 

{

 

var grid = sender;

 

 

var MasterTable = grid.get_masterTableView();

 

 

var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];

 

 

var cell = MasterTable.getCellByColumnUniqueName(row, "IsParent");

 

 

//here cell.innerHTML holds the value of the cell

 

alert(cell.innerHTML);

 

// cell.innerHTML doe not return value of CheckBox Column

 

 

// but returns value if its a bound column

 

}

Waiting for your reply.

Regards,
Lok..

Vasil
Telerik team
 answered on 28 Oct 2011
1 answer
34 views
Some mobile device has special markup without HTML standard markup.
For example, <xyz>aaaa</xyz>

In the Internet explorer browser:
  1. switch to "HTML mode" of the Editor
  2. Add "<xyz>aaaa</xyz>"
  3. switch to design mode and back to html mode

You can see "<xyz/>aaaa" instead of  <xyz>aaaa</xyz>
Rumen
Telerik team
 answered on 28 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?