Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
321 views
Somthing simple, I'm just missing it.  We have a grid in which we provide link buttons on each item.  These buttons show another control for viewing or editing the item.

So, I handle the ItemCommand event of the grid and start the process to populate and show the edit/view control, it works great.

However, since we handle the ItemCommand event, filtering doesn't work, since we don't do anything with the FilterCommandName.  I'd like for it to simply use the grid's default filtering.  Just a simple brain lock, I'm sure, that I'm not seeing how to invoke the base filtering.

protected void grdQuestionPool_ItemCommand(object source, GridCommandEventArgs e){
    
if (e.CommandName.Equals(RadGrid.EditCommandName))
    {
        ViewOrEditQuestion(e);
    }
else if (e.CommandName.Equals(RadGrid.FilterCommandName)) {
        
??
    
}
}

golddog
Top achievements
Rank 1
 answered on 08 Sep 2008
4 answers
142 views
I've seen an example of drag & drop appointments from a RadGrid with different pre-set durations somewhere on this site, but a can't recall where it was.... Can anyone give me the URL? I am testing the Telerik ASP.NET Ajax framework and need this in a scenario with service-request with a pre-arranged timespan.
Pim
Top achievements
Rank 1
 answered on 08 Sep 2008
1 answer
237 views
I am using a user control as my edit form for my data grid.  Everything was going great until I had to populate my dropdown lists on the user control with the data when in edit mode on the datagrid.  Once I figured out how to populate the dropdowns in edit mode by using this code:

Protected

Sub grdProject_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grdProject.ItemDataBound
    If (TypeOf e.Item Is GridEditableItem AndAlso CType(e.Item, GridEditableItem).IsInEditMode) Then
        Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
        Dim UserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)
        CType(UserControl.FindControl("dlstClassification"), DropDownList).SelectedValue = e.Item.DataItem("PROJECT_CLASSIFICATION")
        CType(UserControl.FindControl("dlstRating"), DropDownList).SelectedValue = e.Item.DataItem("PROJECT_RATING_ID")
        CType(UserControl.FindControl("dlstProjectStatus"), DropDownList).SelectedValue = e.Item.DataItem("PROJECT_STATUS")
        If Not e.Item.DataItem("PROJECT_ASSIGN_ID") Is System.DBNull.Value Then
            CType(UserControl.FindControl("dlstProjectAssignID"), DropDownList).SelectedValue = e.Item.DataItem("PROJECT_ASSIGN_ID")
        End If
        CType(UserControl.FindControl("dtReqCompDate"), Telerik.Web.UI.RadDatePicker).SelectedDate = e.Item.DataItem("PROJECT_REQ_COMP_DATE")
    End If
End Sub

My insert function stopped working correctly.  I started getting an error in the code above stating "No default member found for the type 'GridInsertionObject'.  Can anyone help me figure out what the issue is.
Ronnie
Top achievements
Rank 1
 answered on 08 Sep 2008
0 answers
113 views
My controls such as tabstrip and sometime panels seem to dissapear after a timeout of 30 min, even though my authentication time out hasn't. I ajax enable my telerik controls.

<

authentication mode="Forms">

<

forms name=".ADAuthCookie" loginUrl="Login.aspx" timeout="480" />

</

authentication>

Auth timeout set for 8 hrs just as a test.

<

sessionState mode="InProc" cookieless="false" timeout="480" />

Session set for 8 hr timeout also

I am using RadControlsQ1 2007
Shai Leib
Top achievements
Rank 1
 asked on 08 Sep 2008
3 answers
127 views
i cant seem to get my javascript confirmation to fire when using the ajax manager.

ASPX
        <script language="JavaScript" type="text/javascript">  
 
            function confirmSubmit()  
            {  
                var agree=confirm("Are you sure you wish to reset content?");  
                if (agree)  
                    return true ;  
                else  
                    return false ;  
            }  
        </script> 
 
 
 
<asp:Button ID="btnReset" runat="server" Text="Reset" /> 
 
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableEmbeddedScripts="true" EnableAJAX="true">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="btnReset">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadEditor1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
    </telerik:RadAjaxManager> 


ASPX.VB
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
        btnReset.Attributes.Add("onClick=""return confirmSubmit()"""Nothing)  
    End Sub 

Thanks in advance
Chase Florell
Top achievements
Rank 1
 answered on 08 Sep 2008
8 answers
248 views
I'm converting a page to use the new Prometheus grid that was using the old grid.

Everything seems to be OK except for the grouping functionality.  I can drag a column into the group panel and it groups properly, but after that I can drag anymore columns and I can't drag any columns out of the group panel.  Attempting to expand/collapse a group gives a javascript error.

If I leave the page and come back in, everything is fine until I try to change the grouping again.

Anyone else experience anything like this?

Thanks,

Greg
Mitch
Top achievements
Rank 1
 answered on 08 Sep 2008
8 answers
1.3K+ views
Hello!

I have just upgraded my toolbar from the old version to the new prometheus  (release) build and the syntax has totally changed and I can't work out how to get what I was working again.

My new tool bar has buttons as follows..

  <telerik:RadToolBarButton CommandName="if" Text="if" CommandArgument="condition" /> 
  <telerik:RadToolBarButton CommandName="then" Text="then" CommandArgument="condition" /> 
  <telerik:RadToolBarButton CommandName="else" Text="else" CommandArgument="condition" /> 

when someone clicks one I need to get at the commandName and Command Argument in the code behind.
Previously I did this:

string defaultText = e.Button.CommandName;  
string commandArg = e.Button.CommandArgument; 

in the onclick of the of the toolbar event, now there is no onClick, just an onButtonClick, so I have tried using this, but I can't work out how to get at the commandArgument or CommandName.

Please could you give me some sample code?
Thanks

B

Val
Top achievements
Rank 1
 answered on 08 Sep 2008
0 answers
171 views
Hi,

I need to create RadTabStrip and RadMultiPage in code-behind, and put them into a PlaceHolder.  However, I got the  "Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element" error.

It is ok if I declare the RadMultiPage in aspx page,  but failed if I cratead it on-the-fly.

Please help.

Rdgs,
Wilson

Here's the aspx code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RadTabTest.aspx.vb" Inherits="RadTabTest" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<%
@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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>Untitled Page</title>
</head>
<
body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
</div>
<
/form>
</
body>
</
html>

Here's the RadTabTest.aspx.vb code:

Partial Class RadTabTest
    Inherits System.Web.UI.Page
    Dim WithEvents oTabStrip As RadTabStrip
    Dim WithEvents oMultiPage As RadMultiPage

     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        oTabStrip = New RadTabStrip
        oMultiPage = New RadMultiPage

        oTabStrip.Attributes.Add("runat", "server")

        AddTab(oTabStrip, oMultiPage, "Corporate")
        AddTab(oTabStrip, oMultiPage, "Personal")
        AddTab(oTabStrip, oMultiPage, "Personal22")

        oTabStrip.MultiPageID = oMultiPage.ID

        PlaceHolder1.Controls.Add(oTabStrip)
        PlaceHolder1.Controls.Add(oMultiPage)

    End Sub

    Private Sub AddTab(ByVal oTabStrip As RadTabStrip, ByVal oMultiPage As RadMultiPage, ByVal tabName As String, Optional ByVal bSelected As Boolean = False)

        Dim oPage As New RadPageView
        oPage.ID = tabName

        Dim oLabel As New Label
        oLabel.ID = "Label." + tabName
        oLabel.Text = tabName
        oPage.Controls.Add(oLabel)

        Dim oTab As New RadTab
        oTab.Text = tabName
        oTab.Attributes.Add("runat", "server")
        oTab.PageViewID = oPage.ID

        If bSelected Then
            oTab.Selected = True
        End If
        oTabStrip.Tabs.Add(oTab)

        oMultiPage.PageViews.Add(oPage)

    End Sub

    Protected Sub oTabStrip_TabClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTabStripEventArgs) Handles oTabStrip.TabClick

        e.Tab.PageView.Selected = True
        e.Tab.Selected = True

    End Sub

End Class

Wilson
Top achievements
Rank 1
 asked on 08 Sep 2008
3 answers
202 views
I am working on a proj. where I have to use two edit buttons on a RadGrid.

one regular edit button that will edit every column, <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>

and one that is to be used as a replace user.


<
telerik:GridButtonColumn UniqueName="ReplaceCommandColumn" CommandName="Edit" Text="Replace"></telerik:GridButtonColumn>

I am basically trying to acomplish replacing one user account with another in my database.

The problem I am having is since my replace button is using edit as its commandName it is returning all the columns for edit as opposed to specific ones I want.

I just want it to return two fields when I replace, and all fields when I edit.

Is there a way to customize the edit command? Since it is the one that is returning all the field. If not is there a better approach?

Raj
Top achievements
Rank 1
 answered on 08 Sep 2008
1 answer
123 views
Hi,

I'm trying to implement a monthly recurrence rule. What I want is: Starting Sep 9th , every month on 9th the schedule should run from 12 am till 5 pm till Jan 9, 2009. I can't seem to get this to work. Instead of selecting only 9th on the Calendar every month, all days are getting selected between these two days.

Here's the scenario:

Start: Sep 9, 2008 12 am
End:  Jan 9, 2009 5 pm

I'm setting the properties like this:

RecurrenceRange

monthlyRange = new RecurrenceRange();

monthlyRange.Start = Start; // Sep 9, 2008 12 am

monthlyRange.RecursUntil = End;// Jan 9, 2009 5 pm

TimeSpan timeScheduled = Convert.ToDateTime(End.ToShortTimeString()) - Convert.ToDateTime(Start.ToShortTimeString());  //Run from 12 am to 5pm

monthlyRange.EventDuration = timeScheduled.;

MonthlyRecurrenceRule monthlyRecurrenceRule = new MonthlyRecurrenceRule(DayOfMonth, schd.RepeatInterval, monthlyRange); //(9, 1. monthlyRange)

What am I doing wrong?

T. Tsonev
Telerik team
 answered on 08 Sep 2008
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?