<telerik:RadGrid ID="RadGrid1" runat="server" PageSize="20" AllowSorting="True" AllowPaging="True" ShowGroupPanel="True" OnColumnCreated="RadGrid1_ColumnCreated"> <PagerStyle Mode="NumericPages"></PagerStyle> <MasterTableView Width="100%"> </MasterTableView> <ClientSettings> <Resizing AllowColumnResize="True"></Resizing> </ClientSettings> </telerik:RadGrid>protected void Button1_Click(object sender, EventArgs e){ string groupBY = "CruiseLine [CruiseLine], Sum(Sales) GroupTotal [CruiseLine Total] Group By CruiseLine"; group(groupBY);}protected void Button2_Click(object sender, EventArgs e){ string groupBY = "Ship [Ship], Sum(Sales) GroupTotal [Ship Total] Group By Ship"; group(groupBY);}protected void Button3_Click(object sender, EventArgs e){ string groupBY = "Date [Date], Sum(Sales) GroupTotal [Date Total] Group By Date"; group(groupBY);}protected void group(string groupBY) { try { GridGroupByExpression expression1 = GridGroupByExpression.Parse(groupBY); this.CustomizeExpression(expression1); this.RadGrid1.MasterTableView.GroupByExpressions.Add(expression1); } catch (Exception ex) { lblError.Text = string.Format("<span style='color:red'>Cannot add group by expression: {0}</span>", ex.Message); lblError.Visible = true; } finally { BindData(); } }protected void BindData() { Hashtable htParams = new Hashtable(); htParams.Add("@CruiseLine", ViewState["prmCruiseLine"]); htParams.Add("@Ship", ViewState["prmShip"]); htParams.Add("@FromDate", FromDate.SelectedDate.Value.ToShortDateString()); htParams.Add("@ToDate", ToDate.SelectedDate.Value.ToShortDateString()); // Call SPROC to populate grid DataUtiliities data = new DataUtiliities("PrepaidConnectionString"); DataSet dsRpt = data.ExecuteDataSet("SelectProductInfoByShipAndDate2", htParams); // Bind the Grid RadGrid1.DataSource = dsRpt.Tables[0].DefaultView; RadGrid1.DataBind(); }groupBY = "CruiseLine [CruiseLine], Sum(Sales) GroupTotal [CruiseLine Total] Group By CruiseLine"expression1 = {CruiseLine , sum(Sales) GroupTotal Group By CruiseLine}groupBY = "Ship [Ship], Sum(Sales) GroupTotal [Ship Total] Group By Ship"expression1 = {Ship , sum(Sales) GroupTotal Group By Ship}Protected Sub grdListeCommande_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs) Handles grdListeCommande.RowDrop Dim RowDragged As GridDataItem Dim RowIndexDestin As Integer Dim intChfNRI As Integer Dim intAtcNRI As Integer Dim tabstrip As RadTabStrip Dim grille As RadGrid = Nothing For Each item As GridNestedViewItem In grdChauffeurs.MasterTableView.GetItems(GridItemType.NestedView) tabstrip = item.FindControl("RadTabStrip2") grille = tabstrip.MultiPage.FindControl("grdOrdre") Next RowDragged = e.DraggedItems.FirstOrDefault() If (e.DestDataItem IsNot Nothing) Then If (e.DestDataItem.OwnerGridID = grdChauffeurs.ClientID) Then Me.RowIndex = e.DestDataItem.ItemIndex intAtcNRI = CInt(RowDragged("ATCNRI").Text) intChfNRI = Me.DataTableChauffeur.Rows(Me.RowIndex).Item("NRI") End If Select Case False Case intChfNRI <> Nothing Case intAtcNRI <> Nothing Case pfblnGetRoadSheet(intChfNRI, intAtcNRI) Case Else e.DestDataItem.Expanded = False e.DestDataItem.Expanded = True grille.DataSource = Me.DataTableMouvement End Select End If End Sub<telerik:ResourceType ForeignKeyField="id" KeyField="id" Name="Commands" TextField="CommandName" /> </ResourceTypes>protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e) { if ((e.Container.Mode == SchedulerFormMode.AdvancedEdit) || (e.Container.Mode == SchedulerFormMode.AdvancedInsert)) { RadComboBox ddlCommands = (RadComboBox)e.Container.FindControl("ResCommands"); if (ddlCommands != null) { int assetID = int.Parse(Request.QueryString["id"]); string portal = (string)Session["Portal"]; AssetFactory assetFactory = new AssetFactory(portal); ddlCommands.DataSource = CommandEnums.GetListItems(assetFactory.GetAssetType(assetID)); ddlCommands.DataTextField = "Text"; ddlCommands.DataValueField = "Value"; ddlCommands.DataBind(); }}Thread information:
Thread ID: 12
...
Is impersonating: False
Stack trace: at System.Convert.FromBase64String(String s)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
at System.Web.UI.LosFormatter.Deserialize(String input)
at Telerik.Web.UI.LosSerializer.Deserialize(String serializedObject, Boolean enableMacValidation)
at Telerik.Web.UI.LosSerializer.Deserialize(String serializedObject)
at Telerik.Web.UI.AdvancedTemplate.ExtractResourceValues(IDictionary target)
at Telerik.Web.UI.AdvancedTemplate.ExtractValues(Control container)
at Telerik.Web.UI.RadScheduler.UpdateAppointmentInline(Boolean removeExceptions)
at Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="End" DataKeyField="ID" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID" DataSourceID="SchedulerDataSource" DataDescriptionField="Description" Height="700px" OnAppointmentCommand="RadScheduler1_AppointmentCommand" StartInsertingInAdvancedForm="true" Reminders-Enabled="true" DataReminderField="Reminder" StartEditingInAdvancedForm="true" OnFormCreated="RadScheduler1_FormCreated" AdvancedForm-EnableCustomAttributeEditing="true" OnAppointmentInsert="RadScheduler1_Scheduled_EventsInsert" OnAppointmentUpdate="RadScheduler1_Scheduled_EventsUpdate" CustomAttributeNames="Parameters" DataStartField="Start" DataSubjectField="Subject" Skin="Sitefinity"> <Localization AdvancedEditAppointment="Edit Event" AdvancedNewAppointment="New Event" /> <AppointmentContextMenuSettings EnableDefault="true" /> <AdvancedForm Modal="true" /> <AppointmentTemplate> <%# Eval("Subject") %> <p style="font-style: italic;"> <%# Eval("Parameters")%></p> </AppointmentTemplate> <TimelineView UserSelectable="false" /> <ResourceTypes> <telerik:ResourceType ForeignKeyField="id" KeyField="id" Name="Commands" TextField="CommandName" /> </ResourceTypes> <ResourceStyles> </ResourceStyles> </telerik:RadScheduler> <asp:SqlDataSource ID="SchedulerDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConfigurationConnectionString %>" DeleteCommand="DELETE FROM [Scheduled_Events] WHERE [ID] = @ID" InsertCommand="INSERT INTO [Scheduled_Events] ([Subject], [Start], [End], [RecurrenceRule], [RecurrenceParentID], [Description], [Reminder], [Parameters], [CommandName]) VALUES (@Subject, @Start, @End, @RecurrenceRule, @RecurrenceParentID, @Description, @Reminder, @Parameters, @CommandName)" SelectCommand="SELECT [ID], [Subject], [Start], [End], [RecurrenceRule], [RecurrenceParentID], [Description], [Reminder], [Parameters] FROM [Scheduled_Events]" UpdateCommand="UPDATE [Scheduled_Events] SET [Subject] = @Subject, [Start] = @Start, [End] = @End, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [Description] = @Description, [Reminder] = @Reminder, [Parameters] = @Parameters, [CommandName] = @CommandName WHERE [ID] = @ID"> <DeleteParameters> <asp:Parameter Name="ID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Subject" Type="String" /> <asp:Parameter Name="Start" Type="DateTime" /> <asp:Parameter Name="End" Type="DateTime" /> <asp:Parameter Name="RecurrenceRule" Type="String" /> <asp:Parameter Name="RecurrenceParentID" Type="Int32" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="Reminder" Type="String" /> <asp:Parameter Name="Parameters" Type="String" /> <asp:Parameter Name="ID" Type="Int32" /> <asp:Parameter Name="CommandName" Type="String" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="Subject" Type="String" /> <asp:Parameter Name="Start" Type="DateTime" /> <asp:Parameter Name="End" Type="DateTime" /> <asp:Parameter Name="RecurrenceRule" Type="String" /> <asp:Parameter Name="RecurrenceParentID" Type="Int32" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="Reminder" Type="String" /> <asp:Parameter Name="Parameters" Type="String" /> <asp:Parameter Name="CommandName" Type="String" /> </InsertParameters>
Hello,
Im using the Grid control from Telerik's RadControls. The grid is populated with thousands of records and lists 50 records per page. I have some filtering options appearing above and the solution is in ASP.NET 3.5 with NHibernate 2.1.
Everything works fine and dandy except for when i select one of the bottom rows and some weird onfocus-event occurrs. When a search/listing has been occurred and the focus is on, lets say the search button. I then select one of the bottom rows between record 40-50, and the browser immediately scrolls down an inch or two. But when the focus is on one of the rows within the grid table, i no longer have these strange scrollings. But if i just switch the focus on anything outside the grid, the scrolling bug appears again.
This appears in IE and Chrome, but not Firefox. I guess its some onfocus event that fires when putting the radgrid in focus, but i cant find any solution on how to fix it.
Please help me, its very annoying!
Best regards, Mattias
RadTreeNode node = new RadTreeNode(usedName + " [" + rs.ToString() + "]", "SECTION_" + rs.ToString()); // just some name and valuenode.NodeTemplate = new AdminFunctionsPhenoTreeTemplate(); // makes buttonsnode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack; PhenoTree.Nodes.Add(node); // adding node to RadTree.// selections.RadioButtonList rbRights = (RadioButtonList)node.FindControl("rbRights");if (rbRights != null){ setAccessLevelToRB(rbRights, accessLevel); // set correct radio button using rbRights.SelectedIndex
}node.DataBind();List<RadTreeNode> alls = (List<RadTreeNode>)PhenoTree.GetAllNodes(); foreach (RadTreeNode node in alls) { RadioButtonList rbRights = (RadioButtonList)node.FindControl("rbRights"); accessLevel = getAccessLevelFromRB(rbRights); // this routine simply examines rbRights.SelectedIndex}class AdminFunctionsPhenoTreeTemplate : ITemplate { public void InstantiateIn(Control container) { container.Controls.Add(new LiteralControl("<table style=\"margin:0px;padding:0px;\"><tr><td>")); Label label1 = new Label(); label1.ID = "ItemLabel"; label1.Text = "Text"; label1.Font.Size = 8; // label1.Font.Bold = true; label1.DataBinding += new EventHandler(label1_DataBinding); container.Controls.Add(label1); container.Controls.Add(new LiteralControl("</td><td>")); RadioButtonList rbRights = new RadioButtonList(); rbRights.ID = "rbRights"; rbRights.Items.Add(new ListItem("r/o")); rbRights.Items.Add(new ListItem("r/w")); rbRights.Items.Add(new ListItem("r/w/meta")); rbRights.SelectedIndex = 0; rbRights.RepeatDirection = RepeatDirection.Horizontal; container.Controls.Add(rbRights); container.Controls.Add(new LiteralControl("</td></tr></table>")); } private void label1_DataBinding(object sender, EventArgs e) { Label target = (Label)sender; RadTreeNode node = (RadTreeNode)target.BindingContainer; string nodeText = (string)DataBinder.Eval(node, "Text"); target.Text = nodeText; } }hi there,
I am currently get this unhandled exception in first time of a page load (onetime for application start) and after reloading the same page, I dont get this exception and everythings is OK . I'm not use datetime conversion in my login.aspx page. this problem while cause when i use telerik control. it's attractive this exception in every page that use Telerik Rad Script Manager and stop rendering page.
i will gratefull everyone that help me for solve this problem.
|
|