Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
181 views
I Have a RadSlider with that code
<telerik:RadSlider ID="RadSliderResBedrooms" runat="server" ItemType="item" Width="350px"
                                Height="70px" AnimationDuration="400" ThumbsInteractionMode="Free"
                                EnableDragRange="true" IsSelectionRangeEnabled="true" SelectionEnd="12" SelectionStart="0" >
                                <Items>
                                    <telerik:RadSliderItem Text="1" Value="1" Width="100px" />
                                    <telerik:RadSliderItem Text="2" Value="2" />
                                    <telerik:RadSliderItem Text="3" Value="3" />
                                    <telerik:RadSliderItem Text="4" Value="4" />
                                    <telerik:RadSliderItem Text="5" Value="5" />
                                    <telerik:RadSliderItem Text="6" Value="6" />
                                    <telerik:RadSliderItem Text="7" Value="7" />
                                    <telerik:RadSliderItem Text="8" Value="8" />
                                    <telerik:RadSliderItem Text="9" Value="9" />
                                    <telerik:RadSliderItem Text="10" Value="10" />
                                    <telerik:RadSliderItem Text="11" Value="11" />
                                    <telerik:RadSliderItem Text="12" Value="12" />
                                </Items>
                            </telerik:RadSlider>

The problem that its width when the page first loads is very small and looked crashed but after reloading pages it goes 
that's the crashed slider image:
http://i.imgur.com/wWGm0.png
Slav
Telerik team
 answered on 09 Aug 2012
1 answer
729 views
Hi All,

I am facing a situation where I need a grid where there are multiple rows. Now, inside each row there can be multiple child rows and each child row should be editable.

Eg.

Col1         Col2        Col3    Col4   (Row1)
                Col2        Col3    Col4
                Col2        Col3    Col4


Above is only 1 row. So, in that Col1 is repeating only once, but other columns are repeating mulitple times, as well as they are editable (but Col1 is not editable). So, now on saving all the data from Row1 should go to database.

The good thing is that only one row is editable at a time. I want the look and feel exactly like this....Actually grouping does not give a look and feel like this and I don't know whether it is editable or not....

If anyone can put a light into this then it will be of good help....Thanks in advance.

Dhaval Tamhane
Radoslav
Telerik team
 answered on 09 Aug 2012
1 answer
233 views
I have a user control that is displayed via the content template of RadWindow .

The user control has a textbox with a requiredFieldValidator that doesnt get fired on client side when a button is clicked in the same user control.

Sample code: 

<telerik:RadWindow ID="sample" runat="server"
        Title="My Sample" Modal="true" Width="800px" Height ="720px"  >
        <ContentTemplate>
            <UC1:Sample runat="server" ID="sampleControl" />
        </ContentTemplate>
    </telerik:RadWindow>
 
-- User control contents --
<div>
 <telerik:RadTextBox ID="txtTest" runat="server" CausesValidation="true" />
                        <asp:RequiredFieldValidator ID="rfv" ControlToValidate="txtTest" runat="server" Display="Dynamic"
                        ErrorMessage="*" Text="*" />
</div>
<telerik:RadButton ID="radButton" runat="server" Text="Click me" CausesValidation="true" />

This happens when i make the an partial postback using ajax rather than a complete postback.
Marin Bratanov
Telerik team
 answered on 09 Aug 2012
2 answers
704 views
My users want the ability to receive a warning if they leave a page without hitting the save button.  I found some great code at 4GuysFromRolla, and have been able to make a necessary adjustment  to get it working with the RadComboBox.  I am struggling on finding the right change for the RadEditor.  What is the correct html element id to put in the following code?

'Dont forget to register controls on the Page_load even.
'Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'    'Monitor the changes for the Web controls whose values you want to watch
'    MonitorChanges(InputControlname)
'    'For those controls (like "Save" buttons) that cause a postback that should NOT prompt the
'    'user, call BypassModifiedMethod
'    BypassModifiedMethod(btnSave)
'End Sub
Public Sub MonitorChanges(ByVal wc As WebControl)
    If wc Is Nothing Then Exit Sub
    If TypeOf wc Is CheckBoxList OrElse TypeOf wc Is RadioButtonList Then
        'Add an array element for each item in the checkbox/radiobutton list
        For i As Integer = 0 To CType(wc, ListControl).Items.Count - 1
            ClientScript.RegisterArrayDeclaration("monitorChangesIDs", """" & String.Concat(wc.ClientID, "_", i) & """")
            ClientScript.RegisterArrayDeclaration("monitorChangesValues", "null")
        Next
    ElseIf TypeOf wc Is Telerik.Web.UI.RadComboBox Then
        ClientScript.RegisterArrayDeclaration("monitorChangesIDs", """" & wc.ClientID & "_Input" & """")
        ClientScript.RegisterArrayDeclaration("monitorChangesValues", "null")
    ElseIf TypeOf wc Is Telerik.Web.UI.RadEditor Then
        'Not working.  Still need to find the correct ID Value.
        ClientScript.RegisterArrayDeclaration("monitorChangesIDs", """" & wc.ClientID & "ContentHiddenTextarea" & """")
        ClientScript.RegisterArrayDeclaration("monitorChangesValues", "null")
    Else
        ClientScript.RegisterArrayDeclaration("monitorChangesIDs", """" & wc.ClientID & """")
        ClientScript.RegisterArrayDeclaration("monitorChangesValues", "null")
    End If
    AssignMonitorChangeValuesOnPageLoad()
End Sub
Private Sub AssignMonitorChangeValuesOnPageLoad()
    If Not ClientScript.IsStartupScriptRegistered("monitorChangesAssignment") Then
        ClientScript.RegisterStartupScript(Me.GetType(), "monitorChangesAssignment", _
           "<script language=""JavaScript"">" & vbCrLf & _
           "  assignInitialValuesForMonitorChanges();" & vbCrLf & _
           "</script>")
        ClientScript.RegisterClientScriptBlock(Me.GetType(), "monitorChangesAssignmentFunction", _
           "<script language=""JavaScript"">" & vbCrLf & _
           "  function assignInitialValuesForMonitorChanges() {" & vbCrLf & _
           "    for (var i = 0; i < monitorChangesIDs.length; i++) {" & vbCrLf & _
           "      var elem = document.getElementById(monitorChangesIDs[i]);" & vbCrLf & _
           "      if (elem) if (elem.type == 'checkbox' || elem.type == 'radio') monitorChangesValues[i] = elem.checked; else monitorChangesValues[i] = elem.value;" & vbCrLf & _
           "    }" & vbCrLf & _
           "  }" & vbCrLf & vbCrLf & vbCrLf & _
           "  var needToConfirm = true;" & vbCrLf & _
           "  window.onbeforeunload = confirmClose;" & vbCrLf & vbCrLf & _
           "  function confirmClose() {" & vbCrLf & _
           "    if (!needToConfirm) return;" & vbCrLf & _
           "    for (var i = 0; i < monitorChangesValues.length; i++) {" & vbCrLf & _
           "      var elem = document.getElementById(monitorChangesIDs[i]);" & vbCrLf & _
           "      if (elem) if (((elem.type == 'checkbox' || elem.type == 'radio') && elem.checked != monitorChangesValues[i]) || (elem.type != 'checkbox' && elem.type != 'radio' && elem.value != monitorChangesValues[i])) { needToConfirm = false; setTimeout('resetFlag()', 750); return ""You have modified the data entry fields since last savings.  If you leave this page, any changes will be lost.  To save these changes, click Cancel to return to the page, and then Save the data.""; }" & vbCrLf & _
           "    }" & vbCrLf & _
           "  }" & vbCrLf & vbCrLf & _
           "  function resetFlag() { needToConfirm = true; } " & vbCrLf & _
           "</script>")
    End If
End Sub
Public Sub BypassModifiedMethod(ByVal wc As WebControl)
    wc.Attributes("onclick") = "javascript:" & GetBypassModifiedMethodScript()
End Sub
Public Function GetBypassModifiedMethodScript() As String
    Return "needToConfirm = false;"
End Function

Thanks for your help,
Dan Neuman
Dan
Top achievements
Rank 1
 answered on 09 Aug 2012
2 answers
158 views
I have a Radgrid already defined in the aspx file

<telerik:RadGrid ID="rgTest" runat="server" >
    <MasterTableView AllowPaging="False" CommandItemDisplay="Top">
        <Columns>
            <telerik:GridBoundColumn DataField="test" FilterControlAltText="Filter by test"
                HeaderText="Text" UniqueName="test" SortExpression="test">
        </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="test1" FilterControlAltText="Filter by test1"
                HeaderText="Test1" UniqueName="test1" >
        </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

I created 2 columns, "test" and "test1", and the datasource of the grid is defined as above:

Protected Sub rgTest_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles rgTEst.NeedDataSource
    LoadPreview()
End Sub
 
Private Sub LoadPreview()
    Dim obj As New TestDataAccess
    Dim ds As DataSet = obj.PreviewGet() 'Return a dataset from the database
    rgTest.DataSource = ds
End Sub

but that datasource returns a lot of columns based on an sproc that create columns dynamically and I don't know how many columns will created, not even the columns names, but for sure brings these 2 ("test", "test1").
The problem is that i am getting these 2 columns repeated, and i just want to show them once, How can I do this?

PD: I note when the grid is creating the columns, the ones that I don't want to repeat, come with a 1 attached to the name, test1, test11
reguapo
Top achievements
Rank 1
 answered on 09 Aug 2012
0 answers
126 views
hi im using rad calendar(i think 2005 onwards i bought this control) on my page. every thing is aligned well  in chrome, except this rad calendar issue.
here is my sample code
<div id="divSearch">
                <!-- PAGE SPECIFIC CONTENT -->
                <table id="tabsearchcriteria" width="100%">
                <!--Search Section-->
                    <tr>
                        <td class="searchlabel" >
                           <asp:Label ID="lbl1" runat="server"></asp:Label>
                        </td>
                        <td class="searchtext" >                          
                           <asp:TextBox runat="server" ID="txt1" CssClass="searchtext" MaxLength="8" onkeypress="uppercase();"/>
                        </td>
                        <td class="searchlabel" >
                            <asp:Label ID="lbl2" runat="server"></asp:Label>
                        </td>
                        <td class="searchtext">
                            <asp:TextBox ID="txt2" runat="server" CssClass="searchtext" MaxLength="8"></asp:TextBox>
                        </td>                   
                    </tr>
                    <tr>
                        <td class="searchlabel" >
                            <asp:Label ID="lblFmDt" runat="server"></asp:Label>
                        </td>
                        <td class="searchtext">                                       

                            <radCln:RadCalendar ID="SharedCalendar" runat="server" EnableMultiSelect="false"
                                RangeMinDate="2006/01/01" Skin="WebBlue">
                            </radCln:RadCalendar>
                            <radCln:RadDatePicker ID="txtRetDtFm" runat="server" MinDate="1980-01-01" SharedCalendarID="SharedCalendar"
                                Width="90px">
                                <DatePopupButton HoverImageUrl="~/RadControls/Calendar/Skins/WebBlue/Img/datePickerPopupHover.gif"
                                    ImageUrl="~/RadControls/Calendar/Skins/WebBlue/Img/datePickerPopup.gif"></DatePopupButton>
                                <DateInput ReadOnly="true" BorderColor="#6D91BF">
                                </DateInput>
                            </radCln:RadDatePicker>
                        </td>
                        .....................

the UI looks, that calendar is aligned bit left compared with other controls, this problem is in chrome and mozila only. may i know how to fix this issue?
jeyaseelan
Top achievements
Rank 1
 asked on 09 Aug 2012
1 answer
64 views
Hi,

          I have used EditFormSettings in my RadGrid. I am also having two buttons one is New and Edit too. I have checkbox and a column (Image Name) in grid. So when click new button, it is creating a row for insertion. At the same time, without entering any information in edit mode, I am clicking the check box, at this time I wanted to remove the created row (which is in insert mode). How to do this? Is it possible to do?

The following statement is not working..

MyRadGrid.MasterTableView.ClearEditItems();


Thanks in advance.
Princy
Top achievements
Rank 2
 answered on 09 Aug 2012
7 answers
119 views
Hi,
           I am using Radgrid for my applicaiton. I have added three  Rad Buttons to "CommandItemTemplate" That are add button, edit button and delete button. When I click add button, it is always inserting a new row in grid. I dont want that. I wanted to enable my own panel. How to disable this new row insertion.
    Also when I am clicking the edit button, it is opening the respective row in edit mode. How to disable this feature. I wanted to enable my own panel, when I click the edit button. Is it possible? Can you kindly help me out to disable this functionality.

         Thanks in advance.

Shinu
Top achievements
Rank 2
 answered on 09 Aug 2012
3 answers
307 views
Hi.
I am Create Dynamic RadComboBox with Programing But Not Fire SelectedIndexChanged  

RadComboBox1.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(PPLIL_SelectedIndexChanged);

 protected void PPLIL_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
         RadAjaxManager1.Alert("Hello");
    }

Not Alert This Message Or Other Command
Why ?
Please Help Me
??
Tanx
Princy
Top achievements
Rank 2
 answered on 09 Aug 2012
4 answers
118 views
Since I upgraded to the latest Telerik controls, my RadGrid Delete column no longer accepts my ImageUrl, but shows the default red Delete X instead. The problem exists only when I use CommandName="Delete". If I label it "CustomDelete" or something else, it works fine.

I have 40-50 pages like this and would rather not have to go and modify each one, as well as the code behind to accommodate the new CommandName.

Is there a fix for this? Is this expected? It only started happening in this Q2 release.

Here is the code
<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton" ImageUrl="~/images/icons/trash_16x16.gif">
    <HeaderStyle Width="20px"></HeaderStyle>
    <ItemStyle Width="20px"></ItemStyle>
</telerik:GridButtonColumn>


Thanks
Clyde
Jonathan
Top achievements
Rank 1
 answered on 09 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?