protected void grdQuestionPool_ItemCommand(object source, GridCommandEventArgs e){
if (e.CommandName.Equals(RadGrid.EditCommandName))
{
ViewOrEditQuestion(e);
} else if (e.CommandName.Equals(RadGrid.FilterCommandName)) {
??
}
}
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
<
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| <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> |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| btnReset.Attributes.Add("onClick=""return confirmSubmit()""", Nothing) |
| End Sub |
| <telerik:RadToolBarButton CommandName="if" Text="if" CommandArgument="condition" /> |
| <telerik:RadToolBarButton CommandName="then" Text="then" CommandArgument="condition" /> |
| <telerik:RadToolBarButton CommandName="else" Text="else" CommandArgument="condition" /> |
| string defaultText = e.Button.CommandName; |
| string commandArg = e.Button.CommandArgument; |
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
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?
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?