Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
968 views
I have rad datetimepicker control. i want that if user enter date and also time part which is greater than today's date and time then validation message appear.
atif iqbal
Top achievements
Rank 1
 answered on 09 Mar 2010
1 answer
169 views
In the "How to Add" version of this thread the following block of code was posted:
        Dim InputMgr As RadInputManager = New RadInputManager    
        InputMgr.ID = "RadInputManager1"    
        InputMgr.Skin = "Vista"    
            
        Dim DateSetting As DateInputSetting = New DateInputSetting    
        DateSetting.MinDate = New DateTime(1980, 1, 1)    
        DateSetting.MaxDate = New DateTime(2020, 1, 1)    
        DateSetting.ClientEvents.OnError = "onClientDateTxtError"    
        DateSetting.ClientEvents.OnKeyPress = "onClientTextChanged"    
        InputMgr.InputSettings.Add(DateSetting)    
            
        TryCast(InputMgr.InputSettings(0), InputSetting).TargetControls.Add(New TargetInput(TextBox1.UniqueID, True))    
            
 

What I have a is form full of fields and a dropdown list.  By default a certain set of fields are handled through the input manager through the Regular Expression Text Box setting, as well as being set as required.  When certain options are selected in the dropdown list, different sets of fields are required.

So what I'd like to do is if Social Security number is no longer required I'd like to set the SSN Behavior to no longer be required, or if that doesn't work, then I'd like to remove the control txtSSN from the target control list for that Input setting.

In trying to make the input no longer required I tried this:
Dim a As String = RadInputManager1.InputSettings(0).TargetControls.Item(0).ControlID.ToString()  
 
Stop  
 
RadInputManager1.InputSettings(0).Validation.IsRequired = False 

At the stop point I verify that variable a holds the correct control name, which it does, but the final line seems to do nothing.  The control still appears to be required.

In trying to remove the control from the Input Manager behavior all together I tried the following:
Dim a As String = RadInputManager1.InputSettings(0).TargetControls.Item(0).ControlID.ToString()  
 
Stop  
 
RadInputManager1.InputSettings(0).TargetControls.RemoveAt(0) 

At the stop point I verify that variable a has the correct control name, which it does.  Then I would think the final line would remove that control from the Input Manager, but if I go to that control after this executes the field is still required and the regular expression still restricts my input into that field.
Nikolay Rusev
Telerik team
 answered on 09 Mar 2010
1 answer
134 views
I have a treeview that uses a webservice as its datasource, and is setup to use LoadOnDemand. I am using the context menus to allow users to add, move, or delete nodes. My question is this:

once the user clicks Paste (for instance) to add a node they have copied from another location in the tree, the treeview posts back to my asp.net page and that page calls out to the database to add the node to the appropriate parent node. That all works great but, how do I force the parent node that has just had a node added to it to refresh itself, and show the newly added node?

The same goes for deleting a node. Once my code returns from the database functionality that removes the record from the DB, how do I cause the node to refresh itself, showing that its "child" node has been removed?

Thanks.
Veronica
Telerik team
 answered on 09 Mar 2010
5 answers
337 views
Hello
i  had a problem with time picker(rad).am using 1.2.2.1 version.

<

radCln:RadTimePicker ID="tpArrivalTime" runat="server">

<TimeView runat="server" StartTime="0:0:0" EndTime="23:31:00" Interval="0:30:0" Columns="5" TimeFormat="HH:mm"

Culture="en-US">

</TimeView>

<DateInput DateFormat="HH:mm" Culture="en-US">

</DateInput>

<DatePopupButton Visible="False" />

</radCln:RadTimePicker>
am not getting the selected time .am getting the selected date with time.do this control have property to get time itself or else how to get the value in the textbox field after selecting the time (in code behind not javascript)

regards
Mathews Baby

Sebastian
Telerik team
 answered on 09 Mar 2010
7 answers
178 views
I have a radgrid and I would like to provide checkboxes in first column for each record. If I use 
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />

how can I get the checkbox selection on server side so that I know which record to update. the user can do multiple selections. pls provide me an example.
Sebastian
Telerik team
 answered on 09 Mar 2010
2 answers
138 views
I have created a wrapper control around the telerik RadGrid to be able to set some default settings and implement some of my own methods. Within my wrapper user control I added the property ShowEditButton and ShowDeleteButton which implement my own update / delete action. Once this property is set I programmatically add a GridButtonColumn which represents the update and/or delete button in the grid.

I add my custom action column with the following code:

if (!IsPostBack){ 
GridButtonColumn col = new GridButtonColumn(); 
col.CommandName = col.Text = col.HeaderText = "Delete"
col.UniqueName = "DeleteColumn"
radDataGrid.Columns.Add(col); 



If I execute this code within de Load event of my wrapper the column doesn't get added at all. If I execute the code in the Init event of my wrapper the column is added but with every (ajax) postback the column is being re-added to the grid which results in having multiple delete buttons within the grid.

Implementation (Implementation of custom wrapper, DataGrid, see below):
<myapp:DataGrid ID="grdAdminOverview" runat="server" ShowEditButton="true" ShowDeleteButton="true"
    <Columns> 
        <telerik:GridBoundColumn HeaderText="Firstname" DataField="firstname" /> 
        <telerik:GridBoundColumn HeaderText="Lastname" DataField="lastname" /> 
        <telerik:GridBoundColumn HeaderText="Username" DataField="username" /> 
        <telerik:GridBoundColumn HeaderText="Email" DataField="email" /> 
        <telerik:GridBoundColumn HeaderText="Isadmin" DataField="isadmin" /> 
    </Columns> 
</myapp:DataGrid> 

Wrapper (wraps RadGrid with default settings):
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DataGrid.ascx.cs" Inherits="Controls.DataGrid" %> 
<telerik:RadGrid ID="radDataGrid" runat="server" AutoGenerateColumns="false" AllowPaging="true" Height="425px" Width="750px"
</telerik:RadGrid> 


As soon as I add my custom columns within the Init event of my custom control the columns are being added, but as said this results in having a column being added with each (ajax) postback. To prevent this from happening I tried checking if the column is already added (also in init event) using: radDataGrid.Columns.FindByUniqueNameSafe("DeleteColumn") but this always returns null.

Am I doing something wrong here?
Renzo Koning
Top achievements
Rank 1
 answered on 09 Mar 2010
1 answer
131 views

Hello Telerik Team,

I have an very strange behavior happenin...

I have this ajaxsettings

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="Order_Type">

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="suggestionsCb" LoadingPanelID="AjaxLoadingPanel1">

 

 

 

 

 

</telerik:AjaxUpdatedControl>

 

 

</UpdatedControls>

 

 

 

 

 

</telerik:AjaxSetting>

 

 

for some reason when I change the "order_type" (which is a radcombobox) 2 times in a row and the "suggestionsCb" gets updated (which is also another radcombobox) each time, on the 2nd time the "suggestionsCb" textbox is disable, the user have to click on the arrow in order to put custom text in the box

Let me know if you need more detail

Regards

 

Veselin Vasilev
Telerik team
 answered on 09 Mar 2010
1 answer
121 views
Hi

how can i make the grid spread over the whole page instead of just half?

thanks

D

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="scrollbar.aspx.vb" Inherits="scrollbar" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
    </div> 
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None">  
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="ProductID" DataSourceID="SqlDataSource1">  
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32" HeaderText="ProductID" 
                    ReadOnly="True" SortExpression="ProductID" UniqueName="ProductID">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" 
                    UniqueName="ProductName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="SupplierID" DataType="System.Int32" HeaderText="SupplierID" 
                    SortExpression="SupplierID" UniqueName="SupplierID">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="CategoryID" DataType="System.Int32" HeaderText="CategoryID" 
                    SortExpression="CategoryID" UniqueName="CategoryID">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="QuantityPerUnit" HeaderText="QuantityPerUnit" 
                    SortExpression="QuantityPerUnit" UniqueName="QuantityPerUnit">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal" HeaderText="UnitPrice" 
                    SortExpression="UnitPrice" UniqueName="UnitPrice">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="UnitsInStock" DataType="System.Int16" HeaderText="UnitsInStock" 
                    SortExpression="UnitsInStock" UniqueName="UnitsInStock">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="UnitsOnOrder" DataType="System.Int16" HeaderText="UnitsOnOrder" 
                    SortExpression="UnitsOnOrder" UniqueName="UnitsOnOrder">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="ReorderLevel" DataType="System.Int16" HeaderText="ReorderLevel" 
                    SortExpression="ReorderLevel" UniqueName="ReorderLevel">  
                </telerik:GridBoundColumn> 
                <telerik:GridCheckBoxColumn DataField="Discontinued" DataType="System.Boolean" HeaderText="Discontinued" 
                    SortExpression="Discontinued" UniqueName="Discontinued">  
                </telerik:GridCheckBoxColumn> 
                <telerik:GridBoundColumn DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" 
                    UniqueName="CategoryName">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <Scrolling AllowScroll="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=local;Initial Catalog=Northwind;Integrated Security=True" 
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [Alphabetical list of products]">  
    </asp:SqlDataSource> 
    </form> 
</body> 
</html> 
 
Dimo
Telerik team
 answered on 09 Mar 2010
1 answer
146 views
I noticed that the File Explorer Control allows you to upload a file by right clicking on a folder, but you can right click on a folder other than the one currently selected.
If you do so, the file will be uploaded to the selected folder rather than the one you right clicked on. This seems like a bug. If I have an option to perform an action by right clicking on an item, that action should be performed on the item that was clicked, whether it is the selected item or not.

Using your client-side events example, select the Customers folder (Once you do so, it will be highlighted in blue.). Then right click on the Products folder and select upload. Upload a file and note the location it uploads into. It uploads into the Customers folder, not the Products folder as I would have expected.

If I right click on the products folder and select upload, the document should be uploaded to the Products folder.

Telerik, can you please advise on this issue.

If i right click on a folder in windows explorer, it becomes the selected folder. It seems like that should be what happens in the file explorer.
Fiko
Telerik team
 answered on 09 Mar 2010
1 answer
116 views
Hi,

I'm using client side insert/update/delete. When I click on any row of the grid the values of control in the edit mode doesn't change. I am referring http://www.telerik.com/help/aspnet-ajax/client-update-insert-delete.html of the demo. The only difference is instead of webservice I'm using codebehind method to get the selected row detail. using alert I checked that the values coming after row selection is right. the only thing is I can not see the change in the tab.
Am I missing some event of tabs??
Yavor
Telerik team
 answered on 09 Mar 2010
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?