Posted 7 August 2024, 11:45 am EST - Updated 7 August 2024, 11:54 am EST
I have a support ticket open, but I’m reaching out here to see if anyone else has had these problems.
I seem to have multiple strange behaviors that I was not expecting:
*The filtering options throwing errors such as “the Filtering event was not handled”. Nowhere in the documentation does it say that the Filtering events have to be handled. In fact, the advertising for the product made it sound like it was “code-free” features. I created empty events just to make the errors go away, but I shouldn’t have to, this seems like a bug to me. See the attached error message.
*Even though I have the “CallbackSettings” set to “Partial” when I press “Enter” on the Filter row, it still performs a full PostBack on the page, which is not desired. I verified that none of my other controls are causing postbacks by setting their UseSubmitBehavior values to “false” and their AutoPostBack values to false (where appropriate). I ended up having to put in some JavaScript to prevent the Enter button from being used at all on the page to prevent this postback. JavaScript code shown below:
//Prevent the "enter" key from causing a postback on the page, see https://stackoverflow.com/a/895231/7308469
$(document).ready(function () {
$(window).keydown(function (event) {
if (event.keyCode == 13) {
event.preventDefault();
return false;
}
});
});
*Every filtering action must be performed twice to take effect. You have to enter in your filtering text value once, then select the filter option (contains, begins with, etc). Once you choose the filter option, I’d expect the grid to be automatically filtered on the click of it, but it’s not. I have to go and open that filter menu and click the same menu option a second time, THEN it re-filters. This doesn’t appear to match up with the behavior shown in the samples provided here:
https://developer.mescius.com/componentone/demos/aspnet/ControlExplorer/C1GridView/Overview.aspx
*Can’t re-order columns - the graphic/animation shows as if it WANTS to let me re-order the columns, but the moment I let go of the mouse - the column goes right back to where it was before. Again, doesn’t match the behavior shown in the samples.
Below is my code defining the GridView, please let me know if anyone can see anything obvious that I’m doing wrong that might be causing any of these issues.
<wijmo:C1GridView ID="gvMain" runat="server" Width="95%" OnRowDeleting="gvMain_RowDeleting"
ShowFilter="True" AllowColMoving="True" AllowColSizing="True" AutoGenerateDeleteButton="true"
AllowSorting="True" AllowVirtualScrolling="False" AutogenerateColumns="False" FreezingMode="None"
RowHeight="19" ScrollMode="None" StaticColumnIndex="-1" StaticRowIndex="-1"
OnFiltering="gvMain_Filtering" OnFiltered="gvMain_Filtered" OnRowDataBound="gvMain_RowDataBound"
OnSorting="gvMain_Sorting" OnSorted="gvMain_Sorted" AutoGenerateFilterButton="true" style="left: 0px; top: 0px">
<CallbackSettings Action="Sorting, Filtering" Mode="Partial" />
<Columns>
<wijmo:C1BoundField DataField="IFD ITEM #" HeaderText="IFD ITEM #" SortExpression="IFD ITEM #" />
<wijmo:C1BoundField DataField="IFD_BUYING_SHOW_ITEMS_ID" HeaderText="IFD_BUYING_SHOW_ITEMS_ID" SortExpression="IFD_BUYING_SHOW_ITEMS_ID" Visible="False" />
<wijmo:C1BoundField DataField="MASTER VENDOR" HeaderText="MASTER VENDOR" SortExpression="MASTER VENDOR" />
<wijmo:C1BoundField DataField="ITEM VENDOR" HeaderText="ITEM VENDOR" SortExpression="ITEM VENDOR" />
<wijmo:C1BoundField DataField="DESCRIPTION" HeaderText="DESCRIPTION" SortExpression="DESCRIPTION" />
<wijmo:C1BoundField DataField="BRAND" HeaderText="BRAND" SortExpression="BRAND" />
<wijmo:C1BoundField DataField="PACK" HeaderText="PACK" SortExpression="PACK" />
<wijmo:C1BoundField DataField="MFG" HeaderText="MFG" SortExpression="MFG" />
<wijmo:C1BoundField DataField="GTIN" HeaderText="GTIN" SortExpression="GTIN" />
<wijmo:C1BoundField DataField="SUGGESTED ALLOWANCE" HeaderText="SUGGESTED ALLOWANCE" SortExpression="SUGGESTED ALLOWANCE" />
<wijmo:C1TemplateField DataField="APPROVED ALLOWANCE" HeaderText="APPROVED ALLOWANCE" SortExpression="APPROVED ALLOWANCE">
<ItemTemplate>
<asp:TextBox ID="txtApprovedAllowance" runat="server" ToolTip="Approved Allowance" AutoPostBack="false" />
</ItemTemplate>
</wijmo:C1TemplateField>
</Columns>
</wijmo:C1GridView>