User Profile & Activity

Jason Wright Member
Page
of 2

This is still a problem.  It works fine for new projects but for existing projects that was initially using version 3.0.7200.308 it is still looking for the old assembly instead of the 3.0.7200.310 assembly.

 

Any ideas or do I have to recreate the entire project?

Posted: August 25, 2010 12:47 AM

The link http://www.intersoftpt.com/ApplyHotfix doesn't appear to be valid anymore.

 

The assemblies tags appear to be ok in the Web Config file.  Is there a way for me to reapply the hot fix?

Posted: June 12, 2010 1:43 AM

I've attached my project - it has the database that I've been using.  I've removed the ISNET files from the bin directory to save space (you should be able to add them in) - I've attached a word doc to show the files that I had.

Love to hear what I'm doing wrong.

 

Cheers,

 

Jason.

Posted: June 10, 2010 8:12 PM

Hello Andi,

 

The <http handlers> are there - as you said, the chart prob wouldn't show at all without it.

 

Not sure what you mean by "does the status bar of WebGrid is getting filtered?"  I've attached a file with the code showing the table accessing the Personnels table - as well as some screen dumps of the issue I'm having.

 

What is interesting is that after I click on the button, the grid shows the correct data and the status bar is showing the correct number of records loaded - yet when I click on the Pivot Chart, it still shows the old data but the status bar is showing the correct number of records loaded. 

Please see attached.

 

Cheers,

 

Jason.

Posted: June 10, 2010 1:01 AM

Ok this one is really doing my head in.

I've copied your code and modified the table so that it accesses the Personnels table from the Database.mdf file so that I can use the SQL call.

 

Here is my code.

Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports System.Data.SqlClient
Imports ISNet.WebUI.WebGrid
Imports System.Data.SqlClient.SqlCommand

Partial Class Test

    Inherits System.Web.UI.Page
    Dim i As Boolean

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

    End Sub

    Protected Sub WebGrid1_InitializeDataSource(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.DataSourceEventArgs) Handles WebGrid1.InitializeDataSource

        Dim ds As New DataSet
        Dim orders As New SqlDataAdapter
        Dim conn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("SqlConnectionString").ConnectionString)
        conn.Open()

        Dim stringcon As String

        If (i) Then
            stringcon = "SELECT * FROM [Personnels] where [DepartmentID] = 2"
        Else
            stringcon = "SELECT * FROM [Personnels]"
        End If

        orders.SelectCommand = New SqlCommand(stringcon, conn)
        orders.Fill(ds, "Personnels")
        e.DataSource = ds
        conn.Close()

    End Sub

    Protected Sub WebGrid1_PrepareDataBinding(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.DataSourceEventArgs) Handles WebGrid1.PrepareDataBinding
        WebGrid1.RetrieveStructure()
    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        i = True
        WebGrid1.ClearCachedDataSource()
        WebGrid1.RebindDataSource()
    End Sub
End Class


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %>

<%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %>
<html>
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="100%" UseDefaultStyle="True"
            Width="100%" AllowPivotCharting="True" ChartMode="InteractiveUI" DefaultStyleMode="Win7">
            <FlyPostBackSettings PostInputControls="true" PostControlState="true" PostViewState="true"
                PostHiddenFields="true" />
            <ChartSettings ChartType="Column">
            </ChartSettings>
            <ChartInteractiveUI ChartAutoRefresh="true">
            </ChartInteractiveUI>
            <ChartSeriesCollection>
                <ISWebGrid:ChartPivotFilterConfig DataMember="Name" />
            </ChartSeriesCollection>
            <ChartDataCollection>
                <ISWebGrid:ChartPivotDataConfig DataMember="PersonnelID" AutoCalc="Count" />
            </ChartDataCollection>
            <RootTable DataKeyField="PersonnelID">
            </RootTable>
        </ISWebGrid:WebGrid>
        <asp:Button ID="Button1" runat="server" Text="Button" />
    </div>
    </form>
</body>
</html>

 

The really annoying thing is that whilst I still can't get it to work in my project (the Pivot Chart is still not updating!) it works fine when I add it to the Intersoft Tutorial Project.  I don't know why - the connection strings in the Web.Config are the same - and I can't see anything that would be different between the two (the code on both projects are identical - straight copy/paste).  Is there a config variable that I should be looking out for?  Sorry for nagging but I've run out of hair to pull out.

 

Cheers,

 

Jason.

Posted: June 3, 2010 3:30 AM

Ah ha!!!  That did the job.  Didn't know about

<FlyPostBackSettings PostInputControls="True" />

 

That fixed it beautifully for me!  Thanks for your help!!

Posted: June 3, 2010 12:00 AM

Thanks again for your responses.  I've narrowed down what the problem is.  I've managed to get a simplistic version of the multi key update working - however I believe now this is not the original issue as I originally thought it was.  The problem seems to be when I'm using a control (such as a drop down list) as a control parameter in the select parameters of the data source. 

 

So my table is really simple, made up of TableType, TableValue, Description and ExpiryDate (with TableType and TableValue being the primary key fields).

I have a drop down list showing the different table types on the table, and when the user selects the TableType (like State, Location, Workflow type etc), the ISWebGrid shows values on the table based on the entry of the drop down list control.

The sql datasource is configured to use the dropdown list control as a select parameter.  When I don't have the select parameter in the datasource (and I hard code the value of the Table Type), everything works fine - updating/editing is perfect.

When I put the control parameter in it all falls over.  Below is my datasource.

<asp:SqlDataSource ID="sqlGridView" runat="server" ConnectionString="<%$ ConnectionStrings:MVMS %>" SelectCommand="SELECT * FROM [ValidValues] WHERE ([TableType] = @TableType)" UpdateCommand="UPDATE [ValidValues] SET [Description] = @Description, [ExpiryDate] = @ExpiryDate WHERE [TableType] = @original_TableType AND [TableValue] = @original_TableValue AND [Description] = @original_Description AND [ExpiryDate] = @original_ExpiryDate" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [ValidValues] WHERE [TableType] = @original_TableType AND [TableValue] = @original_TableValue AND [Description] = @original_Description AND [ExpiryDate] = @original_ExpiryDate" InsertCommand="INSERT INTO [ValidValues] ([TableType], [TableValue], [Description], [ExpiryDate]) VALUES (@TableType, @TableValue, @Description, @ExpiryDate)" OldValuesParameterFormatString="original_{0}"> <SelectParameters> <asp:ControlParameter ControlID="lstValidValue" Name="TableType" PropertyName="SelectedValue" Type="String" /> </SelectParameters> <DeleteParameters> <asp:Parameter Name="original_TableType" Type="String" /> <asp:Parameter Name="original_TableValue" Type="String" /> <asp:Parameter Name="original_Description" Type="String" /> <asp:Parameter DbType="Date" Name="original_ExpiryDate" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Description" /> <asp:Parameter Name="ExpiryDate" /> <asp:Parameter Name="TableType" /> <asp:Parameter Name="TableValue" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="TableType" Type="String" /> <asp:Parameter Name="TableValue" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter DbType="Date" Name="ExpiryDate" /> </InsertParameters> </asp:SqlDataSource>

 

Love to know if you can help me out.

 

Thanks,

 

Jason.

 

 

 

Posted: May 30, 2010 11:55 PM

Thanks for your quick response.

I had already tried with a blank value in DataKeyField but still got the error.  Perhaps the multiple keys is not the problem?  I only thought that was the case as that is the only difference between the two forms that I have (the web form with the datasource with a single column parent key works).

 

Is there anything else I'm missing?

<ISWebGrid:WebGrid ID="grdValidValue" runat="server" Height="245px" UseDefaultStyle="True" Width="500px" DataSourceID="sqlGridView" DefaultStyleMode="Win7"> <LayoutSettings AllowAddNew="No" AllowEdit="Yes" AllowExport="Yes" AllowFilter="Yes" AllowSelectColumns="Yes" AllowSorting="Yes" CellClickAction="CellSelect" EditOnClick="True" RowChangedAction="FullPagePostback"> </LayoutSettings> <RootTable > <Columns> <ISWebGrid:WebGridColumn Visible="true" AllowMultiLine="True" Caption="TableType" DataMember="TableType" Name="TableType" Width="100px"> <ValueList DataSourceID="sqlGridView" DataTextField="TableType" DataValueField="TableType"> </ValueList> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn AllowMultiLine="True" Caption="TableValue" DataMember="TableValue" Name="TableValue" Width="100px"> <ValueList DataSourceID="sqlGridView" DataTextField="TableValue" DataValueField="TableValue"> </ValueList> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Description" DataMember="Description" Name="Description" Width="100px"> <ValueList DataSourceID="sqlGridView" DataTextField="Description" DataValueField="Description"> </ValueList> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ExpiryDate" DataMember="ExpiryDate" DataType="System.Date" EditType="CalendarCombo" DataFormatString="dd/MM/yyyy" Name="ExpiryDate" Width="100px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid>
All times are GMT -5. The time now is 3:40 AM.
Previous Next