
<telerik:RadGridID="RadGrid2"runat="server"AutoGenerateColumns="True"EnableViewState="True" OnNeedDataSource="RadGrid2_NeedDataSource"ShowHeader="False"Width="100%"OnDeleteCommand="test"> <MasterTableViewTableLayout="Fixed"EditMode="PopUp"> <ItemTemplate> <tablewidth="100%"> <colwidth="50px"/> <colwidth="50px"/> <colwidth="*"/> <colwidth="*"/> <colwidth="*"/> <tr> <td> <asp:ImageButtonrunat="server"ID="edit"CommandName="Edit"ImageUrl="http://localhost/imgftcarto/editicon.gif"/> </td> <td> <asp:ImageButtonrunat="server"ID="delete"CommandName="Delete"CommandArgument='<%# Eval("Identifiant")%>' ImageUrl="http://localhost/imgftcarto/delete.gif" OnClientClick="return confirm('Delete this user?');" /> </td> <td> <b>test <%# Eval("Identifiant")%></b> </td> <td> <%# Eval("Nom")%> </td> <td> <asp:DropDownListrunat="server"ID="ddl"> <asp:ListItemText="Mr"Value="Mr"></asp:ListItem> <asp:ListItemText="Mrs"Value="Mrs"></asp:ListItem> <asp:ListItemText="Ms"Value="Ms"></asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td> </td> <td> </td> <td> <b>test2</b> </td> <td> <%# Eval("Prenom")%> </td> <tdrowspan="2"> <asp:TextBoxrunat="server"ID="textplace"TextMode="MultiLine"Width="100%"></asp:TextBox> </td> </tr> <tr> <td> </td> <td> </td> <td> <b>test3</b> </td> <td> <%# Eval("Inscription") %> </td> </tr> </table> </ItemTemplate> <EditFormSettingsCaptionDataField="Identifiant"EditFormType="Template"PopUpSettings-Width="700px"PopUpSettings-Height="200px"PopUpSettings-Modal="true"> <FormTemplate> <tableid="Table1"cellspacing="1"cellpadding="1"width="100%"border="0"> <tr> <td> Nom </td> <td> <asp:TextBoxID="TextBox10"Text='<%# Bind("Nom") %>' runat="server"> </asp:TextBox> </td> </tr> <tr> <td> Prenom </td> <td> <asp:TextBoxID="TextBox1"Text='<%# Bind("Prenom") %>' runat="server"> </asp:TextBox> </td> </tr> <tr> <td> Inscription </td> <td> <telerik:RadDatePickerID="picker1"runat="server"DbSelectedDate='<%# Bind("Inscription") %>'> </telerik:RadDatePicker> </td> </tr> </table> <tablewidth="100%"> <tr> <tdalign="right"colspan="2"> <asp:ButtonID="Button1"Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'> </asp:Button> <asp:ButtonID="Button2"Text="Cancel"runat="server"CausesValidation="False"CommandName="Cancel"> </asp:Button> </td> </tr> </table> </FormTemplate> </EditFormSettings> </MasterTableView></telerik:RadGrid><telerik:GridNumericColumnEditorID="GridNumericColumnEditor1"runat="server"NumericTextBox-Width="40px"/><telerik:GridTextBoxColumnEditorID="GridTextBoxColumnEditor1"runat="server"TextBoxStyle-Width="200px" TextBoxStyle-BackColor="#FF6600"/><telerik:GridTextBoxColumnEditorID="GridTextBoxColumnEditor2"runat="server"TextBoxStyle-Width="200px" TextBoxStyle-BackColor="#666666"/><telerik:GridDateTimeColumnEditorID="GridDateTimeColumnEditor"runat="server"/><radG:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" Skin="None" DataSourceID="sdsBlogs" GridLines="None" AutoGenerateColumns="False">
<
MasterTableView DataSourceID="sdsBlogs" DataKeyNames="BLOG_ID">
<Columns>
<radG:GridHyperLinkColumn DataNavigateUrlField="BLOG_ID" DataNavigateUrlFormatString=http://my.impactwrestling.com/Blog.aspx?ID={0} DataTextField="TITLE" HeaderText="Title" SortExpression="TITLE" UniqueName="TITLE">
</radG:GridHyperLinkColumn
>
<radG:GridHyperLinkColumn DataNavigateUrlField="UserId" DataNavigateUrlFormatString=http://my.impactwrestling.com/MyProfile.aspx?ID={0} DataTextField="UserName" HeaderText="User" SortExpression="UserName" UniqueName="column">
</radG:GridHyperLinkColumn>
<radG:GridBoundColumn DataField="POST_COUNT" HeaderText="# of Comments" SortExpression="POST_COUNT" UniqueName="column1">
</radG:GridBoundColumn>
<radG:GridTemplateColumn HeaderText="Last Post">
<ItemTemplate>
<asp:Label id="lblLocation" runat="server" Text='<%# LastPost((int)Eval("BLOG_ID")) %>'>
</asp:Label>
</ItemTemplate> </radG:GridTemplateColumn>
</Columns>
<ExpandCollapseColumn Visible="False">
<HeaderStyle Width="19px" />
</ExpandCollapseColumn>
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
</MasterTableView>
</radG:RadGrid>
I want to make forecolor of Bold n Underlined hyperlink column white
<telerik:radgrid id="gvStudentClassSchedule" runat="server" cellspacing="0" gridlines="None" skin="Outlook" showfooter="True" datasourceid="sqlDSClassRoster"> <exportsettings excel-format="ExcelML" exportonlydata="true" ignorepaging="true" openinnewwindow="true" hidestructurecolumns="true" /> <mastertableview autogeneratecolumns="False" datakeynames="CourseID" showgroupfooter="true" allowfilteringbycolumn="true" allowpaging="true" commanditemdisplay="Top"> <commanditemsettings showexporttoexcelbutton="true" showexporttocsvbutton="true" showaddnewrecordbutton="false" /> <rowindicatorcolumn filtercontrolalttext="Filter RowIndicator column"> </rowindicatorcolumn> <expandcollapsecolumn filtercontrolalttext="Filter ExpandColumn column"> </expandcollapsecolumn> <groupbyexpressions> <telerik:gridgroupbyexpression> <selectfields> <telerik:gridgroupbyfield fieldalias="Name" fieldname="Name" /> <telerik:gridgroupbyfield fieldalias="Age" fieldname="Age" /> <telerik:gridgroupbyfield fieldname="Address1" fieldalias="Address" /> <telerik:gridgroupbyfield fieldname="City" /> <telerik:gridgroupbyfield fieldname="State" /> <telerik:gridgroupbyfield fieldname="Zip" /> <telerik:gridgroupbyfield fieldname="HomePhone" /> <telerik:gridgroupbyfield fieldname="CellPhone" /> <telerik:gridgroupbyfield fieldname="EmailAddress" /> <telerik:gridgroupbyfield fieldname="InvoiceNumber" fieldalias="InvoiceNumber" /> </selectfields> <groupbyfields> <telerik:gridgroupbyfield fieldalias="StudentID" fieldname="PersonID" sortorder="None" /> <telerik:gridgroupbyfield fieldname="Name" fieldalias="Name" sortorder="Ascending" /> </groupbyfields> </telerik:gridgroupbyexpression> </groupbyexpressions> <columns> <telerik:gridboundcolumn datafield="CourseID" datatype="System.Int32" filtercontrolalttext="Filter CourseID column" headertext="CourseID" readonly="True" sortexpression="CourseID" uniquename="CourseID" display="false"> </telerik:gridboundcolumn> <telerik:griddatetimecolumn datafield="InvoiceDate" headertext="Transaction Date" allowfiltering="true" pickertype="DatePicker" dataformatstring="{0:d}" filtercontrolwidth="100px" uniquename="InvoiceDate" /> <telerik:gridboundcolumn datafield="CategoryDesc" filtercontrolalttext="Filter AgeGroup column" headertext="AgeGroup" sortexpression="AgeGroup" uniquename="AgeGroup"> </telerik:gridboundcolumn> <telerik:gridboundcolumn datafield="SubjectDesc" filtercontrolalttext="Filter Subject column" headertext="Subject" sortexpression="Subject" uniquename="Subject"> </telerik:gridboundcolumn> <telerik:gridboundcolumn datafield="Days" filtercontrolalttext="Filter Days column" headertext="Days" sortexpression="Days" uniquename="Days"> </telerik:gridboundcolumn> <telerik:gridboundcolumn datafield="StartTime" filtercontrolalttext="Filter StartTime column" headertext="StartTime" sortexpression="StartTime" uniquename="StartTime"> </telerik:gridboundcolumn> <telerik:gridboundcolumn datafield="EndTime" filtercontrolalttext="Filter EndTime column" headertext="EndTime" sortexpression="EndTime" uniquename="EndTime"> </telerik:gridboundcolumn> <telerik:gridboundcolumn datafield="TermDesc" filtercontrolalttext="Filter Term column" headertext="Term" sortexpression="Term" uniquename="Term"> </telerik:gridboundcolumn> <telerik:gridboundcolumn datafield="CourseLength" datatype="System.Int32" filtercontrolalttext="Filter CourseLength column" headertext="Length (Weeks)" sortexpression="CourseLength" uniquename="CourseLength"> </telerik:gridboundcolumn> <telerik:gridboundcolumn datafield="Cost" datatype="System.Decimal" filtercontrolalttext="Filter CostResident column" headertext="Cost" sortexpression="CostResident" uniquename="CostResident" aggregate="Sum" dataformatstring="{0:C}" footeraggregateformatstring="Total Cost: {0:C}"> </telerik:gridboundcolumn> </columns> <editformsettings> <editcolumn filtercontrolalttext="Filter EditCommandColumn column"> </editcolumn> </editformsettings> </mastertableview> <filtermenu enableimagesprites="False"> </filtermenu> <headercontextmenu cssclass="GridContextMenu GridContextMenu_Default"> </headercontextmenu> </telerik:radgrid>If
Request("eid") <> "" Then
Dim nodeSelected As RadTreeNode = rtvEventList.FindNodeByValue(Request("eid"))
nodeSelected.Selected =
True
Dim js As String = "ScrollToSelectedNode();"
RadScriptManager.RegisterStartupScript(Page, Page.[GetType](), "nodeSelection", js, True)
End If
The node is selected and page is filled out correctly. The function ScrollToSelectedNode() is called.
function ScrollToSelectedNode()
{
var treeviewInstance = <%=rtvEventList.ClientID %>;
var selectedNode = treeviewInstance.SelectedNode;
if (selectedNode != null)
{
window.setTimeout(
function() { selectedNode.ScrollIntoView(); }, 200);
}
}
It seems that the treeviewInstance has as object, but I keep getting errors that the SelectedNode of the treeviewInstance is null. So the page will not scroll the treeview to the correct node. What am I doing wrong?
protected void grdTransaction_GridExporting(object sender, GridExportingArgs e){ byte[] byteArray = Encoding.UTF8.GetBytes( e.ExportOutput); byte[] asciiArray = Encoding.Convert(Encoding.UTF8, Encoding.Default, byteArray); e.ExportOutput = Encoding.ASCII.GetString(asciiArray); }Hello.
I have built a very simple web page (Default.aspx) with the RadScheduler component:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %> <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> <!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></title> </head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <telerik:RadScheduler ID="RadScheduler1" runat="server"> <WebServiceSettings Path="/App_Code/Service1.svc" ResourcePopulationMode="ServerSide" /> </telerik:RadScheduler> </div> </form> </body> </html>using System; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Activation; using System.ServiceModel.Web; using System.Data.Common; using Telerik.Web.UI; using System.Collections.Generic; using System.Data.SqlClient; using System.Configuration; namespace WebApplication1 { [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [ServiceBehavior(IncludeExceptionDetailInFaults = true)] public class Service1 { private WebServiceAppointmentController _controller; private MyProvider _provider; private MyProvider Provider { get { if (_provider == null) { var connString = ConfigurationManager.ConnectionStrings["BossDB"].ConnectionString; var factory = DbProviderFactories.GetFactory("System.Data.SqlClient"); _provider = new MyProvider() { ConnectionString = connString, DbFactory = factory, PersistChanges = true }; } return _provider; } } private WebServiceAppointmentController Controller { get { if (_controller == null) { _controller = new WebServiceAppointmentController(Provider); } return _controller; } } [OperationContract] public IEnumerable<AppointmentData> GetAppointments(SchedulerInfo schedulerInfo) { return Controller.GetAppointments(schedulerInfo); } [OperationContract] public IEnumerable<AppointmentData> InsertAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData) { return Controller.InsertAppointment(schedulerInfo, appointmentData); } [OperationContract] public IEnumerable<AppointmentData> UpdateAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData) { return Controller.UpdateAppointment(schedulerInfo, appointmentData); } [OperationContract] public IEnumerable<AppointmentData> DeleteAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData, bool deleteSeries) { return Controller.DeleteAppointment(schedulerInfo, appointmentData, deleteSeries); } [OperationContract] public IEnumerable<AppointmentData> CreateRecurrenceException(SchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData) { return Controller.CreateRecurrenceException(schedulerInfo, recurrenceExceptionData); } [OperationContract] public IEnumerable<AppointmentData> RemoveRecurrenceExceptions(SchedulerInfo schedulerInfo, AppointmentData masterAppointmentData) { return Controller.RemoveRecurrenceExceptions(schedulerInfo, masterAppointmentData); } } }using System; using System.Collections.Generic; using System.Data.Common; using System.Data.SqlClient; using System.Configuration; using System.Transactions; using Telerik.Web.UI; public class MyProvider : DbSchedulerProviderBase { private SqlConnection m_connection; private SqlCommand m_cmdReservationListSelect; public MyProvider() { m_connection = new SqlConnection(ConfigurationManager.ConnectionStrings["BossDB"].ConnectionString); m_cmdReservationListSelect = new SqlCommand("procReservationListSelect"); m_cmdReservationListSelect.CommandType = System.Data.CommandType.StoredProcedure; m_cmdReservationListSelect.Connection = m_connection; m_cmdReservationListSelect.Parameters.Add(new SqlParameter("@ClubId", System.Data.SqlDbType.SmallInt)); m_cmdReservationListSelect.Parameters.Add(new SqlParameter("@ResourceType", System.Data.SqlDbType.Char, 15)); m_cmdReservationListSelect.Parameters.Add(new SqlParameter("@ReservationDate", System.Data.SqlDbType.Char, 10)); m_cmdReservationListSelect.Parameters.Add(new SqlParameter("@ReservationType", System.Data.SqlDbType.Char, 1)); m_cmdReservationListSelect.Parameters.Add(new SqlParameter("@MembershipNbr", System.Data.SqlDbType.Char, 10)); } public override IEnumerable<Appointment> GetAppointments(ISchedulerInfo shedulerInfo) { Int16 clubId = 201; String resourceType = "PERS TRAINING"; String reservationDate = "04/01/2011"; String reservationType = "L"; String membershipNbr = ""; List<Appointment> appointments = new List<Appointment>(); using (TransactionScope scope = new TransactionScope()) { m_cmdReservationListSelect.Parameters["@ClubId"].Value = clubId; m_cmdReservationListSelect.Parameters["@ResourceType"].Value = resourceType; m_cmdReservationListSelect.Parameters["@ReservationDate"].Value = reservationDate; m_cmdReservationListSelect.Parameters["@ReservationType"].Value = reservationType; m_cmdReservationListSelect.Parameters["@MembershipNbr"].Value = membershipNbr; m_connection.Open(); using (SqlDataReader reader = m_cmdReservationListSelect.ExecuteReader()) { if (reader.HasRows) { int resource = reader.GetOrdinal("resource"); int reservation = reader.GetOrdinal("reservation"); int qoh = reader.GetOrdinal("qoh"); int limit = reader.GetOrdinal("limit"); int start_time = reader.GetOrdinal("start_time"); int res_units = reader.GetOrdinal("res_units"); int invtr_desc = reader.GetOrdinal("invtr_desc"); int trainer_cust_code = reader.GetOrdinal("trainer_cust_code"); int remaining_sessions = reader.GetOrdinal("remaining_sessions"); int recurring = reader.GetOrdinal("recurring"); while (reader.Read()) { Appointment apt = new Appointment(); apt.ID = (!reader.IsDBNull(reservation) ? reader.GetInt32(reservation) : 0); apt.Subject = (!reader.IsDBNull(invtr_desc) ? reader.GetString(invtr_desc) : ""); apt.Start = Convert.ToDateTime("04/01/2011 " + reader.GetString(start_time)); apt.End = Convert.ToDateTime("04/01/2011 " + reader.GetString(start_time)).AddHours(reader.GetInt16(res_units)); apt.RecurrenceRule = ""; apt.RecurrenceParentID = null; appointments.Add(apt); } } } m_connection.Close(); scope.Complete(); return appointments; } } public override void Insert(ISchedulerInfo shedulerInfo, Appointment appointmentToInsert) { if (!PersistChanges) { return; } } public override void Update(ISchedulerInfo shedulerInfo, Appointment appointmentToUpdate) { if (!PersistChanges) { return; } } public override void Delete(ISchedulerInfo shedulerInfo, Appointment appointmentToDelete) { if (!PersistChanges) { return; } } }Server Error in '/' Application. -------------------------------------------------------------------------------- Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0234: The type or namespace name 'Transactions' does not exist in the namespace 'System' (are you missing an assembly reference?) Source Error: Line 4: using System.Data.SqlClient; Line 5: using System.Configuration; Line 6: using System.Transactions; Line 7: using Telerik.Web.UI; Line 8:Line 6 is highlighted, indicating an error in statement "using System.Transactions;".
In order to compile file MyProvider.cs, System.Transactions needs to be referenced not only in the source code, but also as part of the project, under "References".
Is there another place where System.Transactions need to be referenced?
I would appreciate whether someone could assist me in solving this problem.
Thank you in advance.
Paulo