Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
313 views
Hello,

I have the following code:
 function OnClientSelectedIndexChanging(sender, eventArgs) 
     { 
      
       var vItem = eventArgs.get_item(); 
        
       if (vItem.get_value() == "..."
       { 
            alert('bad value'); 
            return false//cancel post back. 
       } 
        
     } 

I get the alert box, but what do i need to do to cancel the post back?

TIA
Aarsh
Top achievements
Rank 1
 answered on 11 Jan 2013
0 answers
69 views
how to create the forum reply box using asp.net c#
Michael
Top achievements
Rank 1
 asked on 11 Jan 2013
3 answers
121 views
I have been trying to use a date range filter for a RadGrid with manual filter in code behind.  I understand that it is a string expression, however no matter what I try it keeps getting an error that it is not a valid boolean expression.  Here is the aspx and code behind.  What am I missing? Thanks in advance.
<telerik:RadGrid ID="TimeGrid" AllowPaging="true" DataSourceID="DetailSource" runat="server" GridLines="None" AllowSorting="false" EnableLinqExpressions="false">
               <MasterTableView>
                    <Columns>
                        <telerik:GridBoundColumn DataField="WorkDate" HeaderText="Date" UniqueName="WDate" DataFormatString="{0:MM/dd/yy}" ItemStyle-Width="75px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Shift" HeaderText="Shift" ItemStyle-Width="25px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Reg" HeaderText="Reg" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ShftHrs" HeaderText="ShftHrs" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="OT" HeaderText="OT" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Vac40" HeaderText="Vac 40 Hrs" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Vac48" HeaderText="Vac 48 Hrs" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Vac36" HeaderText="Vac 36 Hrs" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Sick40" HeaderText="Sick 40 Hrs" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Sick48" HeaderText="Sick 48 Hrs" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Sick36" HeaderText="Sick 36 Hrs" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Exc_Absence" HeaderText="Exc Abs Hrs" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Holiday_Worked" HeaderText="Holiday Worked" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Holiday_Not_Worked" HeaderText="Holiday Not Worked" ItemStyle-Width="35px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Comments" HeaderText="Comment" ItemStyle-Width="135px"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Additional_Comment" HeaderText="Additional Comment" ItemStyle-Width="135px"></telerik:GridBoundColumn>
                        <telerik:GridCheckBoxColumn DataField="Five" HeaderText="5%"></telerik:GridCheckBoxColumn>
                        <telerik:GridCheckBoxColumn DataField="Ten" HeaderText="10%"></telerik:GridCheckBoxColumn>
                    </Columns>
               </MasterTableView>
            </telerik:RadGrid>
**Server side
Partial Class Administration_TimesheetUserControl2
    Inherits System.Web.UI.UserControl
 
    Protected Sub PayDatesDDL_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles PayDatesDDL.SelectedIndexChanged
        Dim strFilterExpression As String
        strFilterExpression = "(([WORKDATE] >= '" + e.Value + "') AND ([WORKDATE] <= '" + Calc_PP_EndDate(e.Value) + "'))"
        TimeGrid.MasterTableView.FilterExpression = strFilterExpression
        TimeGrid.MasterTableView.Rebind()
    End Sub
    Public Shared Function Calc_PP_EndDate(ByVal strBeginDate As String) As String
        Dim dtmEndDate As Date
        Dim dtBeginDate As Date = Date.Parse(strBeginDate)
        Dim strEndDate As String
 
        If Day(dtBeginDate) = 1 Then
            dtmEndDate = DateSerial(Year(dtBeginDate), Month(dtBeginDate), 15)
        Else
            dtmEndDate = DateSerial(Year(dtBeginDate), Month(dtBeginDate) + 1, 1 - 1)
        End If
 
        strEndDate = CType(dtmEndDate, String)
        Return (strEndDate)
    End Function
End Class

Elliott
Top achievements
Rank 2
 answered on 11 Jan 2013
5 answers
89 views
I am having strange results with the combo box.  For some reason it is rebindig after I bind it.  
My first issue was u was trying to remove an item from the list if it was not selected.  Since it was doing this word reminding,  I had to remove it on the ondataload method. The next problem was that the selected value was not remaining. I set the value.  I step through the code and I see it being set.  Then when the page is displayed the value is no longer set.  How can I track these behind the scenes processes. 
John Giblin
Top achievements
Rank 1
 answered on 11 Jan 2013
1 answer
79 views
In my Chart I have around 16-20 Legends and they are taking very much space. I want to show only top 8 Legends and hide the rest. How can I do it? A code sample would be appreciated. Thanks.
Missing User
 answered on 11 Jan 2013
1 answer
190 views
I am trying to prevent a tab stop on an entire RadGrid control, but I have not been able to accomplish this.  I have tried setting the TabIndex property equal to -1 and also tried surrounding the grid with a panel with a TabIndex of -1.  Neither of these attempts were successful.
Can anyone provide any assistance with this issue?
MightyQuinn
Top achievements
Rank 1
 answered on 11 Jan 2013
1 answer
137 views
Hi there

I have a consistent but intermittent (maybe 50:50) problem with the image for a radCaptcha control not being displayed, showing instead only the grey box on the occasions that the rendering fails. I know about using the HttpHandlerUrl property to explicitly provide the location of Telerik.Web.UI.axd, and the fact that the image is loaded from the Cache by default, so I am wondering if this is some issue with a cache management conflict caused by some other javascript functions I am running on page load?

Could anybody point me in a good direction about how to troubleshoot this issue, as I have run out of ideas! Is there any client-side API for radCaptcha that might allow me to examine what is going on with the captcha control as the client side script runs? Failing that, is there a recommended location for setting the HttpHandlerUrl property back at the server-side processing? I have tried the init handlers for both the page and the control itself, but nothing makes any difference to the problem.

Thanks if you can advise

Slav
Telerik team
 answered on 11 Jan 2013
1 answer
33 views
I am facing an issue with RadTabStrip control. When i browse my page its height automatically increasing and background image also repeats.
I have also attach an image for better understand.

I check my page code there is not any additional css styles define.

Regards, Saif
Kate
Telerik team
 answered on 11 Jan 2013
3 answers
83 views
this is a radFilter (not on a grid) that i would like to save & or load settings and have the filter expand and show them.
i get a method error when trying to use the :
            Session["RadFilterExpressions"] = RadFilter1.SaveSettings();
            LoadSettings.Enabled =
true;
tells me there's no method for this. is this something that's reserved for the radGridFilters only? i've done this before on grid filters, but not the STAND ALONE RADFILTER.
and i've looked a literally every tutorial out there, so, if not doable - just lemme know and i'll walk away from this one.
thanks
rik

 

 

 

<telerik:RadFilter ID="WorkOrdersRadFilter" runat="server" Skin="WebBlue" ShowApplyButton="true"

 

 

 

 

 

 

 

OnApplyExpressions="WorkOrdersRadFilter_Apply" ApplyButtonText="Filter Work Orders"

 

 

 

 

 

 

 

OnPreRender="WorkOrdersRadFilter_PreRender" OnFieldEditorCreating="RadFilter_FieldEditorCreating" OnItemCommand="WorkOrdersRadFilter_ItemCommand">

 

 

 

 

 

 

 

 

<FieldEditors>

 

 

 

 

 

 

 

<telerik:RadFilterTextFieldEditor FieldName="WORKORDERNUMBER" DisplayName="Work Order#"

 

 

 

 

 

 

 

DataType="System.String" />

 

 

 

 

 

 

 

<goldcustom:RadFilterComboBoxEditor FieldName="WOTYPENAME" DisplayName="WO Type"

 

 

 

 

 

 

 

DataTextField="WOTYPENAME" DataSourceID="WorkOrderTypeFilterODS" DataType="System.String"

 

 

 

 

 

 

 

ComboBoxSkin="WebBlue" />

 

 

 

 

 

 

 

</FieldEditors>

 

 

 

 

 

 

 

 

 

</telerik:RadFilter>

 

 

 

 

                                  

                            
                    </telerik:RadFilter>

Kostadin
Telerik team
 answered on 11 Jan 2013
1 answer
193 views
Hi!!
Am calling the webmethod from the javascript and in the webmethod am trying to find the radgrid. But i can't able to find the rad grid,please any one tell me any solutions for this problem.


thanks in advance!!! 
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Jan 2013
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?