Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
319 views
I have an asp.net drop down list. There is a "new" option in it. Selecting that will show 2 labels,2 text boxes and an asp.net button. Entering values in the textboxes("John","Doe")and hitting the button should add a value to the Database table and also refresh this drop down and . It did that when I DID NOT use ajax. Now when i use ajax (radajaxmanager), it adds the value to the table and shows that it is selecting the newly added value in the codebehind, but the drop down selected value shows as "New". It should say for example "John Doe". I went for ajax because I have many drop downs in the page and postbacks were not optimal.  Where did I go wrong?

<telerik:RadAjaxManager ID="ram" runat="server"><br>        <AjaxSettings><br>            <telerik:AjaxSetting AjaxControlID="ddlCustomerContact"><br>                <UpdatedControls><br>                    <telerik:AjaxUpdatedControl ControlID="divAddNewCustomerContact"/><br>                </UpdatedControls>
 </telerik:AjaxSetting>
</AjaxSettings>
        </telerik:RadAjaxManager>

In the codebehind  I write a method BindCustomerContact() after I add "John Doe". 

 If intNewCustomerID > 0 Then<br>            ddlCustomerContact.SelectedValue = intNewCustomerID<br>        Else<br>            ddlCustomerContact.SelectedIndex = 0<br>        End If<br>...

When I debugged it set the value of the drop down as the new value, but my UI shows "New". Any help would be appreciated.
Princy
Top achievements
Rank 2
 answered on 04 Mar 2014
1 answer
529 views
I have a RadDropDownTree and a RadTreeView on the same page.  Basically, a list of messages are being loaded on the page when a category is selected.  The layout of this app requires that the treeview be displayed in a dropdown instead of the traditional treeview.  Since I already have the radtreeview successfully executing all of the code I want it to when a node is selected, I was hoping to fire that code when a selection is made on the raddropdowntree.  Right now, I have some code in javascript which causes a category to get selected in the radtreeview whenever the same cayegory is selected in the raddropdowntree.  However, it seems that the radtreeview node is getting selected with this code, but it is not getting clicked.  The messages do not get loaded the same way they would if someone were to explicitly click on the radtreeview node.

Here is my javascript which causes the readtreeview category to get selected when the same raddropdown is selected.  Does anyone know how I can make it not just select the node, but also click on the node?

<script type="text/javascript">
        function OnClientDropDownClosed1(sender, eventArgs) {
            var tree = $find("ctl00_MainContent_MessageList1_MessageFilter1_RadDropDownTree1");
            var entries = tree.get_entries();
            var selectedText = tree.get_selectedText();
            document.getElementById("ctl00_MainContent_CategoryTree1_hfCategoryNum").value = selectedText;
 
            SelectNode(selectedText);
 
        }
 
        function SelectNode(nodeName) {         
            var tree = $find("ctl00_MainContent_CategoryTree1_TreeViewDirectory");
            var node = tree.findNodeByText(nodeName);
            tree.trackChanges();  
            node.set_selected(true);           
            tree.commitChanges();           
               
        }
 
</script>
 
Shinu
Top achievements
Rank 2
 answered on 04 Mar 2014
4 answers
127 views
Hello there,
I have just upgraded to Q1 2014 from Q3 2013 SP2. I have noticed the following behaviour in the toolbars in IE11:

- The images with the Question tab activated (740px width) - there is a large difference in the way in which the bottom tools are rendered
- The images with the Instructions tab activated (99% width) - the top toolbar behaves so differently to the other.

Before the upgrade, these editors looked like the compatibility mode off images, but the compatibility mode was on.
Now, after the upgrade and with compatibility mode on, they look terrible. Turning off compatibility mode ruins the layout of the rest of my application, so the requirement is to have compatibility mode settings to on.

I have also included a screen capture of my aspx code - I collapsed some areas to fit on to one screen.

Do you have any thoughts / suggestions?
Bryan
Top achievements
Rank 1
 answered on 04 Mar 2014
5 answers
457 views
On my master page I have a telerek radmenu called "myMenu" see attached

On my aspx page that uses the master page I am trying to alter the link on the button "door" but the following wont work. Can you please help

Protected Sub Page_Load()
 
Dim H As RadMenu = DirectCast(myMenu.FindControl("House"), RadMenu)
Dim D As RadMenuItem = DirectCast(H.FindControl("door"), RadMenuItem)
 
D.click = LoadStuff()
 
End Sub
 
 
Private Sub LoadStuff()
 
'update something in vb.net
 
End Sub
Shinu
Top achievements
Rank 2
 answered on 04 Mar 2014
7 answers
282 views
I have a problem to while exporting the data of Hierarchical RadGrid data in pdf form.

Please see the attached image.

It is not showing proper data. And i am writng the code to export the pdf of radgrid on a Simple Image Button Click.
Please help me. It is urgent for me. Thanks in advance.
Princy
Top achievements
Rank 2
 answered on 04 Mar 2014
3 answers
656 views
this is how I do it with a MS dropdown:

DropDown1.Items.IndexOf(DropDown1.Items.FindByValue(elementValue))

How is this done in VB with a radDropDown??

thanks
Shinu
Top achievements
Rank 2
 answered on 04 Mar 2014
2 answers
72 views
Hi,

I have a context menu that needs to have it's right click work with a tap and hold on ipads. I have gone through the examples at http://www.telerik.com/forums/radcontextmenu---ipad-safari-right-click but I haven't seen an example that's really like my mine. It's a context menu inside a .NET repeater control where right clicking on a row shows a menu with items that are bound to that row and clicking on an item redirects the user according to the data in that row. The main problem has been finding way to refer to the context menu and the rows since they are generated on the server. I was wondering if it's possible to do this and if anyone has suggestions?

Thanks,
Bill
bill
Top achievements
Rank 1
 answered on 04 Mar 2014
4 answers
127 views
In our site, we have a top menu bar that goes over content in the page. whenever we open radWindows we can set their position or set a restriction zone so that they will never get stuck under this menu. When a user with a small browser window (1024 x 768) clicks on the Track Changes button in radEditor, it is possible that the radWindow for track changes will open under the menu bar. This radWindow also cannot be closed by pressing the Esc key so the only option becomes reloading the page.

Is there any way to set the size, opening position, restriction zone or any other options that would prevent the radWindow for track changes to guarantee its position relative to the menu bar.

Thank You.
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 04 Mar 2014
2 answers
290 views
Modal Dialogues by your functionality always center on the window. In most cases, this makes sense and is the desired functionality. But sometimes we would like to be able to set the position of a Modal Dialogue.

In our case, it is when we have the radwindow modal inside of an iframe; we would prefer the position of the modal to be at the top of the iframe, but centered horizontally.

Is there currently a way to achieve this, without having conflicting client JS with the script that gets run to center the modal window?

Otherwise, feature request:  it would be nice that if the Top or Left properties are set, then the control would override the default auto-center functionality.

thanks,
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 03 Mar 2014
2 answers
215 views
I have a RadGrid with several GridDropDownColumns configured as well as several GridBoundColumns. The grid is bound to a data source programatically using the NeedDataSource event. The dropdown columns use RadComboBox style drop downs which are also bound to datasources programatically, in the grid's ItemDataBound event when the grid is in Edit mode. When the grid is not in Edit mode, I set the value of the dropdown column cell's Text property, also in the ItemDataBound event.

This all works are required. However if I do something that causes a postback, but does not rebind the grid when the grid is not in Edit mode - for example selecting a row in the grid - the values in the dropdown columns go blank. Is the TableCell.Text property not persisted through postback? If not, which property should I use for this purpose, or how can I populate it again, given that the ItemDataBound property does not fire which you simply select a row in the grid.

Code sample below:

<telerik:RadGrid runat="server" ID="grdControl" AllowFilteringByColumn="True" AllowPaging="True"
    AllowSorting="True" GridLines="None">
    <MasterTableView AutoGenerateColumns="False" EditMode="EditForms" DataKeyNames="ControlId, StepId"
        CommandItemDisplay="Bottom">
        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
        <Columns>
            <telerik:GridButtonColumn ButtonType="LinkButton" Text="Select" CommandName="Select" UniqueName="Select">
            </telerik:GridButtonColumn>
            <telerik:GridEditCommandColumn UniqueName="Edit">
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete">
            </telerik:GridButtonColumn>
            <telerik:GridDropDownColumn DataField="ControlName" HeaderText="Control Type" UniqueName="ControlName">
            </telerik:GridDropDownColumn>
            <telerik:GridBoundColumn DataField="MaxLength" HeaderText="Max Length" UniqueName="MaxLength">
            </telerik:GridBoundColumn>
            <telerik:GridDropDownColumn DataField="TextMode" HeaderText="Text Mode"
                UniqueName="TextMode" />
            <telerik:GridDropDownColumn DataField="ListSource" HeaderText="List Source" UniqueName="ListSource">
            </telerik:GridDropDownColumn>
            <telerik:GridBoundColumn DataField="EmptyListText" HeaderText="Empty List Text" UniqueName="EmptyListText">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <FilterMenu>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
</telerik:RadGrid>
 
 
 
        Private Sub grdControl_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grdControl.ItemDataBound
            If TypeOf e.Item Is GridEditableItem Then
                Dim item As GridEditableItem = e.Item
                Dim control As FormControlInfo
                Dim ffc As New FlexFormController()
                If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then
                    If e.Item.OwnerTableView.IsItemInserted Then
                        control = New FormControlInfo()
                    Else
                        control = e.Item.DataItem
                    End If
                    Dim editor As GridDropDownListColumnEditor
                    Dim cbo As RadComboBox
                    'ControlName dropdown
                    Dim path As String = Server.MapPath("~/DesktopModules/Dotcom.FlexForm/Components/FormControls/")
                    Dim files As String() = IO.Directory.GetFiles(path, "*.ascx")
                    For i = 0 To files.Length - 1
                        files(i) = IO.Path.GetFileName(files(i)).Replace(".ascx", String.Empty)
                    Next
                    editor = item.EditManager.GetColumnEditor("ControlName")
                    editor.DataSource = files
                    editor.DataBind()
                    editor.SelectedValue = control.ControlName
                    'ListSource dropdown
                    editor = item.EditManager.GetColumnEditor("ListSource")
                    Dim controller As New Lists.ListController()
                    Dim list As Lists.ListInfoCollection
                    If String.IsNullOrEmpty(control.ParentKey) Then
                        list = controller.GetListInfoCollection()
                        editor.DataTextField = "DisplayName"
                        editor.DataValueField = "Key"
                    Else
                        list = controller.GetListInfoCollection(Nothing, control.ParentKey.Replace(":", "."))
                        editor.DataTextField = "Name"
                        editor.DataValueField = "Name"
                    End If
                    editor.DataSource = list
                    editor.DataBind()
                    cbo = editor.ComboBoxControl
                    cbo.Items.Insert(0, New RadComboBoxItem(Localization.GetString("EmptyListItem", Definition.SharedResources), String.Empty))
                    If Not String.IsNullOrEmpty(control.ListSource) Then
                        editor.SelectedValue = control.ListSource
                    End If
                    'TextMode dropdown
                    editor = item.EditManager.GetColumnEditor("TextMode")
                    editor.DataSource = [Enum].GetNames(GetType(TextBoxMode))
                    editor.DataBind()
                    cbo = editor.ComboBoxControl
                    cbo.Items.Insert(0, New RadComboBoxItem(Localization.GetString("EmptyListItem", Definition.SharedResources), String.Empty))
 
                Else
                    control = e.Item.DataItem
                    item("ControlName").Text = control.ControlName
                    item("ListSource").Text = control.ListSource
                    item("EmptyListText").Text = Server.HtmlEncode(control.EmptyListText)
                    item("ParentControlId").Text = control.ParentId
                    If control.TextMode.HasValue Then
                        item("TextMode").Text = control.TextMode.Value.ToString
                    End If
                End If
            End If
        End Sub



Vikas
Top achievements
Rank 1
 answered on 03 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?