Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
341 views
I wanted to know if there is a way I can add validation elements/settings to the RadInputManager dynamically for a situation where all validation criteria is stored in a database. 

For example: Imagine you have a form that is dynamically generated from database data and the number of input fields to validate and their names are not fixed/known ahead of time.  Fields are dynamically loaded from the database and they are named vaules like txtControl12.


        'Create an instance of the RadInputManager  
        Dim controlvalidation As New RadInputManager  
        controlvalidation.ID = "RadInputManager1" 
 
        'Add various settings and specific controls to validate within those settings  
        'E.g. There is one field in the form that should be an e-mail address, 1 field that  
        'has a validation date range, another field that has a different validation date  
        'range.  
 

In the example above there are 2 different date validations for two date input fields and 1 e-mail address.  I am looking for a way to programatically create the VB.NET/C# equal to the following, but am having trouble figuring out how to add something like a new DateInputSetting for RadInputManager 1 that applies to control X and a RegExpTextBoxSetting that applies to a different set of controls (it could apply to one or more).
<telerik:RadInputManager ID="RadInputManager1" runat="server">     
        <telerik:DateInputSetting MinDate="1/1/1980" MaxDate="1/1/2020">     
            <ClientEvents OnError="onClientDateTxtError" OnKeyPress="onClientTextChanged" />    
            <TargetControls>    
                <telerik:TargetInput ControlID="txtControl1" />    
            </TargetControls>    
        </telerik:DateInputSetting>   
        <telerik:DateInputSetting MinDate="1/1/2009" MaxDate="1/1/2030">     
            <ClientEvents OnError="onClientDateTxtError" OnKeyPress="onClientTextChanged" />    
            <TargetControls>    
                <telerik:TargetInput ControlID="txtControl2" />    
            </TargetControls>    
        </telerik:DateInputSetting>   
   
        <telerik:RegExpTextBoxSetting IsRequiredFields="true" ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$">     
            <ClientEvents OnError="onClientRegTxtError" OnKeyPress="onClientTextChanged" />    
            <TargetControls>    
                <telerik:TargetInput ControlID="txtControl3" />    
            </TargetControls>    
        </telerik:RegExpTextBoxSetting>    
    </telerik:RadInputManager>    
 


Any help would be appreciated.  Thank you.
Dimo
Telerik team
 answered on 30 May 2009
2 answers
137 views
When filtering by column and using AutoPostBackOnFilter="true" after the postback the filter box is no longer selected, it lost focus. What's worse is that FilterDelay doesn't seem to do anything, or at least not what I would expect it to do, so after each character the client types a postback occurs and the focus to the filter box is lost. If it would at least wait for the client to stop typing and only after FilterDelay millisecond to do the postback it would be somewhat OK. The way it works now it's completely useless. Am I missing something? Thanks.

P.S. I'm using the Jan14 version.
Tsvetoslav
Telerik team
 answered on 30 May 2009
3 answers
132 views
I am exporting pdf files and was wondering if there was a way that if the cell is right aligned in the grid, to make it right align in the pdf file as well.  I created a custom control.  I have/will have over 200 reports. I want to be able to determine if the cell is right aligned or not other then 

            GridColumn col = (GridColumn)RadGrid1.MasterTableView.GetColumn("ColumnUniqueName"); 

where I would have to know each ColumnUniqueName.
Daniel
Telerik team
 answered on 30 May 2009
3 answers
271 views
Hi,

I would like to create appointment slots to either force user to create their appointment in defined slots, or allow them to create appointment outside of slots with confirmation.
And I would like slots to be rendered as a background area under appointments, with templated rendering...

In the first time, I would like only to have them been rendered as background area...

Do you know if it is possible to do it easily please ?
Peter
Telerik team
 answered on 30 May 2009
12 answers
199 views
Hi,
I have a splitter control on my page with a sliding pane & other panes.
I also have a Radtooltipmanager that displays a tooltip for a control within one of the splitter panes.

My problem is..
When i hover over the sliding pane bar, it activates the OnAjaxUpdate, which displays my bespoke tooltip.
I have not coded this.

How can i stop this happening ?

Many Thanks
Mark
Svetlina Anati
Telerik team
 answered on 30 May 2009
3 answers
113 views
Hi, 
My problem started when I tried to add the property to export PDF within the "CommandItemTemplate" of RadGrid.
In the examples I saw, was being used "RadAjaxManagerProxy", however, I already use the RadGrid "RadAjaxManager" but the effect does not happen.
Any ideas?
Daniel
Telerik team
 answered on 30 May 2009
3 answers
247 views
I am using the RadScheduler and here is my scenario:
  • I would like to disable the onclick event of the scheduler control and add an external button that says "add event"
  • When users click this button, I would like it to open a custom insert form with custom attributes that also uses recurrence
  • I need this custom insert form to be a web page not a user control

I have been working with this control for a very short time and I have the custom attributes and recurrence working just fine in a user control.  When I try using the schedulerDefaultForm as part of a webpage, however, it gives me an error because the schedulerFormContainer is null, therefore the appointment and owner fields are null and I get null reference exceptions.  I have searched around the forums and documentation a bit but I can't find an example of a custom insert form that is a web page and not a user control.  Any help would be appreciated.
Peter
Telerik team
 answered on 30 May 2009
5 answers
427 views
I have a RadGrid that has a Templated column containing a RadComboBox that is populated with data from a different datasource that the RadGrid's datasource (Example: You have a RadGrid of Products which can have ParentProducts.  When inserting new Products or editing existing Products you want to allow the user to select that the Product has no Parent Product or select a Product from a list of Products as the parent).

I am having an issue with the RadGrid always selecting the ""/Nul/Select an option value even when the user selects a value.  The effect of this is that any new item inserted via the RadGrid always has no Parent and any item with a Parent that is edited ends up having no Parent.

Is there something missing or wrong in the code below?

 <telerik:GridTemplateColumn HeaderText="SectionID" UniqueName="SectionID">  
                        <EditItemTemplate> 
                            <telerik:RadComboBox ID="SectionIDEditor" runat="server" AppendDataBoundItems="true" DataValueField="SectionID" DataTextField="SectionName" DataSourceID="SqlDataSource3" Skin="WebBlue" > 
                            <Items> 
                                <telerik:RadComboBoxItem Value="" Text="Select Parent Section" /> 
                            </Items> 
                            </telerik:RadComboBox> 
                        </EditItemTemplate> 
                        <ItemTemplate> 
                            <asp:Label ID="SectionIDLabel" runat="server" Text='<%# Eval("SectionID") %>'></asp:Label> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 

    Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
        If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then 
 
            'access/modify the edit item template settings here  
            Dim Section As RadComboBox = CType(e.Item.FindControl("SectionIDEditor"), RadComboBox)  
            Section.DataSourceID = "SqlDataSource3" 
            Section.DataBind()  
 
            If Not DataBinder.Eval(e.Item.DataItem, "SectionID") Is Nothing And IsNumeric(DataBinder.Eval(e.Item.DataItem, "SectionID")) Then 
                ''Section.SelectedValue = DirectCast(DataBinder.Eval(e.Item.DataItem, "SectionID"), Integer)  
                ''Section.Items(0).Attributes("style") = "color: red"  
                'Section.SelectedValue = DataBinder.Eval(e.Item.DataItem, "SectionID")  
 
                ''If Section.Items.FindItemByValue("", True).Selected Then  
 
                ''End If  
                ''Dim ComboItem As RadComboBoxItem  
                ''For Each ComboItem In Section.Items  
                ''    If ComboItem.Value.Equals(e.Item.DataItem) Then  
                ''        ComboItem.Selected = True  
                ''    End If  
                ''Next ComboItem  
                If (Not Session("updatedValue") Is Nothing) Then 
                    Section.SelectedValue = Session("updatedValue")  
                End If 
            Else 
                Section.SelectedValue = "" 
            End If 
 
        End If 
 
        'If (TypeOf e.Item Is GridEditableItem AndAlso CType(e.Item, GridEditableItem).IsInEditMode) Then  
        '    'Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)  
        '    'Dim editMan As GridEditManager = editedItem.EditManager  
        '    'Dim editor As GridTemplateColumnEditor = CType(editMan.GetColumnEditor("SectionID"), GridTemplateColumnEditor) 'in case you have RadComboBox editor for the GridDropDownColumn (this is the default editor), 'you will need to use ComboBoxControl below instead of DropDownListControl 'and add RadComboBoxItems instead of ListItems to the Items collection of the editor   
        '    'Dim Section As RadComboBox = editor.ComboBoxControl  
 
        '    Dim Section As RadComboBox = CType(e.Item.FindControl("SectionIDEditor"), RadComboBox)  
        '    'Section.Items.Insert(0, New RadComboBoxItem("Select Parent Section", "NotSetItem"))  
        '    If Not DataBinder.Eval(e.Item.DataItem, "SectionID") Is Nothing And IsNumeric(DataBinder.Eval(e.Item.DataItem, "SectionID")) Then  
        '        'Section.SelectedValue = DirectCast(DataBinder.Eval(e.Item.DataItem, "SectionID"), Integer)  
        '        'Section.Items(0).Attributes("style") = "color: red"  
        '        Section.SelectedValue = DataBinder.Eval(e.Item.DataItem, "SectionID")  
 
        '        'If Section.Items.FindItemByValue("", True).Selected Then  
 
        '        'End If  
        '        'Dim ComboItem As RadComboBoxItem  
        '        'For Each ComboItem In Section.Items  
        '        '    If ComboItem.Value.Equals(e.Item.DataItem) Then  
        '        '        ComboItem.Selected = True  
        '        '    End If  
        '        'Next ComboItem  
        '    End If  
 
 
        'End If  
 
    End Sub 
Iana Tsolova
Telerik team
 answered on 30 May 2009
7 answers
815 views


Hello


              I want the my grid to load in the same manner as the demo is shown of the Drag-Drop grid.

I inserted the loading Panel ,but I am not able to show theloading image when the backroung goes gray.
In the demo they have written a cssclass which I will have to include in my aspx but the CssClass is not there in the sample demo .Please help me with this is required very importantly.



Thankx in advance,
Regards
Ritzie
Iana Tsolova
Telerik team
 answered on 30 May 2009
1 answer
123 views

                                            
Hi telerik team,

I have a doubt hiding edit and delete images in a column based upon Groupby status in outlook style grid.

i followed below URL

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/webmail/defaultcs.aspx

instead of Received from date i will have status:open(4) on Expand group shows 4 (rows)items
in which edit and delte should display
if Satus:Closed(8) in which Edit and delete column will display but without images

I m able to do in common grid but in outlook style grid?
Appreciable for any quick help

Thanks & Regards
G.Sudheer kumar

Georgi Krustev
Telerik team
 answered on 30 May 2009
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?