User Profile & Activity

Michael Giger Member
Page
of 8
Posted: September 30, 2009 8:36 AM

Hi Handy

Nothing happens! Display is already set to none!

Maybe the wrong Element?

Regards

Michael

Posted: September 29, 2009 1:01 PM

Hi Dicky

I accidentally closed the thread...

Please check my last answer.

Best regards

Michael

Posted: September 29, 2009 12:56 AM

Hi Dicky

Thanks for your answer.

I found out why it does not work.

It's the same problem as I have described in this thread: [IS-C554F370-167F-4097-9B9E-10502BBF3264]

It works only, when the column name of the primary- and foreign keys are identical!

Thanks for a quick fix to the problem...

Regards

Michael

Hi Glenn

The problem also exists if I want to read the value of a hidden column, e.g. 
WebGridCell ManuallyErrorDependencies = e.Row.Cells.GetNamedItem("ManuallyErrorDependencies");

if ((int)ManuallyErrorDependencies.Value != 0)

Regards

Michael

Posted: September 25, 2009 1:45 AM

Hi Gordon

It's true, it's possible to add a single record.

But try to add more then one record. I get the Message The pending changes already contain a record with key ''.

Regards

Michael

Posted: September 25, 2009 12:14 AM

Hi Dicky

Thanks, it works.

It may be possible to refresh only the grid data instead of the whole page?
 
Regards
Michael
Posted: September 18, 2009 5:27 AM

Hi Gordon

I am using SQL Server 2008.

I have also attached a scriptfile for creating tables. You must only insert some data.

Best regards

Michael

Posted: September 17, 2009 11:09 AM

Hi Gordon

Please see attached files (Delay.aspx and DB Backup file)

Change ConnectionString before you run Delay.aspx.

Regards

Michael

Posted: September 15, 2009 4:15 PM

Hi James

Sorry, I was confused about DataMember="DataSetA".

At the second reading I've noticed that you mean the DataTable...

 

Here is the complete and functional code:

private DataSet ds;

protected void Page_Load(object sender, EventArgs e)
{
    ds = GetData();
}

protected void grd1_PrepareDataBinding(object sender, DataSourceEventArgs e)
{
    if (!Page.IsPostBack)
    {
        grd1.ClearCachedDataSource();
        grd1.RetrieveStructure();
    }
}

protected void grd1_InitializeDataSource(object sender, DataSourceEventArgs e)
{
    grd1.DataMember = "<DataTable1>";
    grd1.RootTable.DataMember = "<DataTable1>";
    e.DataSource = ds;
}

protected void grd2_PrepareDataBinding(object sender, DataSourceEventArgs e)
{
    if (!Page.IsPostBack)
    {
        grd2.ClearCachedDataSource();
        grd2.RetrieveStructure();
    }
}

protected void grd2_InitializeDataSource(object sender, DataSourceEventArgs e)
{
    grd2.DataMember = "<DataTable2>";
    grd2.RootTable.DataMember = "<DataTable2>";
    e.DataSource = ds;
}

Thank you, James!

Regards

Michael

Posted: September 15, 2009 11:49 AM

Hi James

I can't follow your explanation.

In your Example, you bind always to Dataset, but where have I choose the Data Table?

 

I have also problems with following Scenario:

How can I change DataTable, if I have a Dataset with 3 Tables? The WebGrid shows always Data from the first added Table (to Dataset).

Thanks

Michael

All times are GMT -5. The time now is 1:21 AM.
Previous Next