Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
268 views
I have two RadDateTimePickers and I want to set the value of one of the pickers equal to the other RadDateTimePicker any time the user changes the date (either by typing or using the calendar popup.   I was looking for an example of how do this but cannot figure it out.

Here is what I have...

<tr>
<td>
<asp:Label ID="Label2" runat="server" Text="Start Time:"></asp:Label>
</td>
<td>
<telerik:RadDateTimePicker ID="dtStart" runat="server" Width="200px">
<Calendar>
<ClientEvents OnDateClick="StartDateClick" />

</Calendar>
</telerik:RadDateTimePicker>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Visible="true" ErrorMessage="Start Time is required." Display="Dynamic" Text="*" ControlToValidate="dtStart"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label3" runat="server" Text="End Time:"></asp:Label>
</td>
<td>
<telerik:RadDateTimePicker ID="dtEnd" runat="server" Width="200px"></telerik:RadDateTimePicker>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Visible="true" ErrorMessage="End Time is required." Display="Dynamic" Text="*" ControlToValidate="dtEnd"></asp:RequiredFieldValidator>
<asp:CustomValidator ID="cvDateRange" runat="server" Visible="true" Text="*" ErrorMessage="Events cannot span multiple days. Starting and Ending dates must be the same." OnServerValidate="ServerValidation"></asp:CustomValidator>
</td>
</tr>

​ function StartDateClick(sender, eventArgs) {
                   var day = sender.get_selectedDate();
                   var endDate = $find("<%= dtEnd.ClientID %>");
                    endDate.set_selectedDate(day);
}
Princy
Top achievements
Rank 2
 answered on 24 Mar 2014
4 answers
252 views
I have browsed over similar posts, but cannot find a solution.  Here is my request:

Simple Part
I have a client login page
I have a textbox for a username and one for password
In the username the .text value is "Enter your 8 digit Account #"
In the password the .text value is "Enter your Password"

Dificult Part
When the user gives focus to the password textbox I want the .text="" and the .textmode="password"

This is giving me fits.

The control has the property of EmptyMessage which is nice, it would be nice if that would display even if the Textmode was set to password.  I understand not allowing the password to be compromised, but this is a diferent situation being a login screen.

Any help would be appreciated!

John
nissim
Top achievements
Rank 1
 answered on 24 Mar 2014
4 answers
292 views
hello friends,

is there any way to increase the size of the footer text for the same 
do not break the line? Something similar to colspan attribute of html ... 

Thank you!

Code:

<telerik:RadGrid ID="rgTeste" runat="server" AutoGenerateColumns="false" ShowFooter="true"
        AllowPaging="true" PageSize="10" AllowSorting="true" AllowFilteringByColumn="False"
        EnableTheming="false" Width="99.7%" OnNeedDataSource="rgTeste_NeedDataSource" 
        OnSelectedIndexChanged="rgPedidosPessoa_SelectedIndexChanged" OnItemDataBound="rgTeste_ItemDataBound">
        <ClientSettings AllowGroupExpandCollapse="false" ReorderColumnsOnClient="false" AllowDragToGroup="false"
                        AllowColumnsReorder="false" EnablePostBackOnRowClick="true"  >
            <Selecting AllowRowSelect="true" />

            <ClientEvents OnRowContextMenu="RowContextMenuRgPedidosPessoa" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="false" NoMasterRecordsText="Sem informações."
            Width="100%" TableLayout="Fixed" DataKeyNames="codigoPessoa,nome">
            <Columns>                  
               <telerik:GridBoundColumn DataField="quantidade" HeaderText="Qtde" HeaderStyle-Width="6%" Aggregate="Sum" 
               FooterText="Total: " HeaderTooltip="Quantidade">//                    
               </telerik:GridBoundColumn>
               <telerik:GridBoundColumn DataField="adress" HeaderText="Código SG." HeaderStyle-Width="10%" HeaderTooltip="Código sistema gestão"/>               
               <telerik:GridBoundColumn DataField="total" HeaderText="Total" HeaderStyle-Width="10%" DataFormatString="{0:N}" Aggregate="Sum" 
               FooterAggregateFormatString="Total: {0:N}" FooterStyle-Width="400px"/>//                                                            
            </Columns>                                    
        </MasterTableView>        
</telerik:RadGrid>
Viktor Tachev
Telerik team
 answered on 24 Mar 2014
1 answer
47 views
I have a RadGrid with a Details Table that is using a RadComboBox in the FilterTemplate.  The RadComboBox get populated correctly and it works correctly filtering one Details Table.  

<telerik:GridTemplateColumn HeaderText="State" SortExpression="State_cd" UniqueName="State_cd" ShowFilterIcon="True"
     DataField="State_cd" CurrentFilterFunction="EqualTo" AutoPostBackOnFilter="True" >
    <ItemTemplate>
        <asp:Label runat="server" ID="lblState" Text='<%# Eval("State_cd") %>'></asp:Label>
    </ItemTemplate>
 
    <FilterTemplate>
        <telerik:RadComboBox runat="server" ID="rcbState" DataTextField="State_cd" DataValueField="State_cd" AppendDataBoundItems="true"
            RenderingMode="Simple" EnableEmbeddedSkins="False" Skin="2015"
            SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("State_cd").CurrentFilterValue %>'
            OnClientSelectedIndexChanged="State_Changed" OnInit="rcbState_Init">
            <Items>
                <telerik:RadComboBoxItem Text="All" />
            </Items>
        </telerik:RadComboBox>
        <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
            <script type="text/javascript">
                function State_Changed(sender, args) {
                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                    var strState = args.get_item().get_value();
                    tableView.filter("State_cd", strState, "EqualTo");
                }
            </script>
        </telerik:RadScriptBlock>
    </FilterTemplate>                   
</telerik:GridTemplateColumn>
 

But as soon as I set that one filter and go to expand a different Details Table, I'm getting an error.

Selection out of range
Parameter name: value Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Selection out of range
Parameter name: value

I'm going to guess that is because I am attempting to populate the RadComboBox uniquely for each Details Table so that it only contains values in the data source for that Details Table.  Is what I'm trying to achieve possible?  Or does the datasource for the RadComboBox  filter need to be the same in all the Details Tables.
Eyup
Telerik team
 answered on 24 Mar 2014
8 answers
124 views
I have a radgrid displaying user records and an hyperlink . on the click of the hyperlink I want to open up a radwindow which navigates to edituserpermissions page using the userID as a querystring. How can i achieve this. Any help please
Edd
Top achievements
Rank 1
 answered on 24 Mar 2014
2 answers
542 views
hi

what is the correct way to update the RadTextBox value in jquery?
when one field is updated, i need to update another RadTextBox.
the code bellow seems to update the text box but when i click inside the text box the field becomes empty, and when submitting it it's empty as well.
what am doing wrong?

   <telerik:RadTextBox ID="txtName" runat="server" Height="24px" ClientEvents-OnBlur="txtName_Blur">
   </telerik:RadTextBox>
   <telerik:RadTextBox ID="txtProductSiteNumber" runat="server" Height="24px">
   </telerik:RadTextBox>

        function txtName_Blur(sender, eventArgs)
        {
                var productName = sender.get_value();
                var txtProductSiteNumber = "";
                var txtProductSiteNumber = $telerik.$("#ctl00_ContentPlaceHolder1_txtProductSiteNumber").val();

                 $telerik.$("#ctl00_ContentPlaceHolder1_txtProductSiteNumber").val(productName);
                 $telerik.$("#ctl00_ContentPlaceHolder1_txtProductSiteNumber_text").val(productName);
        }

10x
lina
Lina
Top achievements
Rank 1
 answered on 24 Mar 2014
1 answer
164 views
Do we have client side equivalent of RADGrid's PageIndexChanged event?

Thanks
Eyup
Telerik team
 answered on 24 Mar 2014
1 answer
141 views
Hi,
 I am displaying a Code11 barcode with the Text . On decreasing the ShortLinesLengthPercentage, I recently found the text got very far from the barcode. I want to control position of text How can I fix this?
Thanks
Angel Petrov
Telerik team
 answered on 24 Mar 2014
1 answer
148 views
Hi All

please see attached picture first

I Have 3 questions

1. How can I add Add new record button for Insert like sample
    How change text of it ?

2. How can I change text of Edit ? (telerik:GridEditCommandColumn)

3. How can I have Refresh button like sample ?
    How change text of it ?


Princy
Top achievements
Rank 2
 answered on 24 Mar 2014
3 answers
158 views
I have a grid where users can open the rows in edit mode to perform updates, and they can also select the rows and perform actions on those selected rows.  The problem is that a row in edit mode appears to be seen as selected by default from what I am seeing. 

Therefore, if my application wants to perform certain actions on selected rows and there are rows in edit mode at the same time, it will apply those actions to the rows in edit mode as well.  Since I can't seem to find a way to seelct rows in edit mode and have them show in the grid as selected, how do you get around this?  it's possible the user may want to select both rows in edit mode and rows not in edit mode at the same time and apply actions to both.

Is there any way to visually select a row in edit mode?

Thanks
Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 23 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?