User Profile & Activity

Michael Giger Member
Page
of 8

Thanks for the additional note.

I am very grateful for such advice!

Posted: October 13, 2009 4:00 AM

Hi Handy

I have try AutoFitColumn propery. With this setting, all columns will be adjusted proportionally. I would only adjust the Notes column. Is there a property for each column to able/disable fit size?

Regards

Michael

Posted: October 13, 2009 1:53 AM

Hi Glenn

I have still problem with AutoFilterSuggestion. Following code is from sample AutomaticFilterSuggestion.aspx. I have added property DataFormatString="dd.MM.yyyy HH:mm:ss" on columns BirthDate and HireDate. Please check this. I get Errormessages like attached pictures.

    <ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="300px" UseDefaultStyle="True"
        Width="100%" DataSourceID="AccessDataSource1">
        <RootTable DataKeyField="EmployeeID">
            <Columns>
                <ISWebGrid:WebGridColumn Caption="LastName" DataMember="LastName" Name="LastName"
                    Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="FirstName" DataMember="FirstName" Name="FirstName"
                    Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="Title" DataMember="Title" Name="Title" Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="TitleOfCourtesy" DataMember="TitleOfCourtesy" Name="TitleOfCourtesy"
                    Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="BirthDate" DataMember="BirthDate" DataType="System.DateTime"
                    Name="BirthDate" Width="200px" DataFormatString="dd.MM.yyyy HH:mm:ss">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="HireDate" DataMember="HireDate" DataType="System.DateTime"
                    Name="HireDate" Width="200px" DataFormatString="dd.MM.yyyy HH:mm:ss">
                </ISWebGrid:WebGridColumn>
            </Columns>
        </RootTable>
        <LayoutSettings AutoFilterSuggestion="True">
        </LayoutSettings>
    </ISWebGrid:WebGrid>

 

 

Posted: October 13, 2009 12:02 AM

Hi Gordon

Thanks for the clarifications!
This would certainly be very helpful in the releases and service packs.
 
Best Regards
Michael
Posted: October 12, 2009 12:47 PM

Hi Glenn

I still have a problem if the rows are groupiert. Please have a look on attached pictures and sample.
Following Code (DelChanges[i].Row.GetCell()) works in first group only!
Have I forgotten anything?
var DelChanges = grd.GetChanges("Deleted");
for (var i in DelChanges) {
    if (DelChanges[i].Row.GetCell("Dependencies").Value > 0) {
        if (DependenciesText.length > 0)
            MessageQuantity = 2;
        else
            MessageQuantity = 1;
        DependenciesText += "\n - " + DelChanges[i].Row.GetCell("CustomerID").Text + " | " + DelChanges[i].Row.GetCell("CompanyName").Text + " | " + DelChanges[i].Row.GetCell("ContactName").Text + " | " + DelChanges[i].Row.GetCell("ContactTitle").Text;
        DelChanges[i].Row.UndoChanges();
    }
}

Please try my sample.

  1. Change ConnectionString and run sample
  2. Delete a row in first group
  3. Accept all Changes (-> Messagebox)
  4. Delete a row in second group
  5. Accept all Changes (-> Error)
Posted: October 11, 2009 9:28 AM

Hi Glenn

Yes you are right but it doesn't work if <Column> is not visible.

That's my problem.

Hi Glenn

It did not solve the problem!
I also get the error message when I try to add only one child record.
It works fine with WebGrid Version 304!

The code was always executed!

Thanks for tip.

Michael

Now I set the property on the individual column (in PrepareDataBinding Event), but i get the same error message!

            WebGridColumn Dependencies = grd.RootTable.Columns[0];
            WebGridColumn ID = grd.RootTable.Columns[1];
            WebGridColumn ProductID = grd.RootTable.Columns[2];
            WebGridColumn AttributeID = grd.RootTable.Columns[3];
            WebGridColumn Setpoint = grd.RootTable.Columns[4];
            WebGridColumn Min = grd.RootTable.Columns[5];
            WebGridColumn Max = grd.RootTable.Columns[6];
            WebGridColumn FormatID = grd.RootTable.Columns[7];
            WebGridColumn ValueIndex = grd.RootTable.Columns[8];

            Dependencies.UseValueListForSorting = ValueListSorting.No;
            ID.UseValueListForSorting = ValueListSorting.No;
            ProductID.UseValueListForSorting = ValueListSorting.Yes;
            AttributeID.UseValueListForSorting = ValueListSorting.Yes;
            Setpoint.UseValueListForSorting = ValueListSorting.No;
            Min.UseValueListForSorting = ValueListSorting.No;
            Max.UseValueListForSorting = ValueListSorting.No;
            FormatID.UseValueListForSorting = ValueListSorting.Yes;
            ValueIndex.UseValueListForSorting = ValueListSorting.No;

It's interesting that the data is still inserted into the database!

Michael

Posted: October 6, 2009 5:26 AM

Hi Glenn

Thank you for advise.

 

 

It's possible to sort Items alphabetically if I use Dropdownlist?

 

 

I use following Dateformat "dd.MM.yyyy hh:mm:ss". AutoFilterSuggestion for Date (e.g. Today, Yesterday, ... -> in Contextmenu) doesn't work. I have set LanguageMode to UseCulture:

            e.Layout.TextSettings.Language = LanguageMode.UseCulture;
            e.Layout.TextSettings.UseWebResources = false;
            e.Layout.TextSettings.LocalizationFolder = @"~/Localization/";
 
 
If I create Columnset programmatically the row on the right side overlaps when a filter is active (see FilterOverlapColumnset.jpg). But this is only visible when there is no scroll bar is present. I have also attached a sample with Northwind Database. You should reproduce the scenario with following steps:
  1. Change ConnectionString and run sample
  2. Type Filtertext "Maria" in ContactName Column
  3. Apply all Filters

 

WebCombo with ValueList has following Items:

  • ProductA added
  • ProductA deleted
  • ProductA modifided

Now I want to filter by ProductA.

Is there a way to choose more then one Item (like sample Multiple Values in WebValueList) or set Filtertext to e.g. ProductA*?

 

Best regards

Michael

 

All times are GMT -5. The time now is 9:41 PM.
Previous Next