Hi,
i'm trying to implement a simple demo you wrote on this address:
http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/GeneralFeatures/CalculatedColumns/DefaultCS.aspx
With the change that I implement the code in a control. You can assume the control inherits <scriptManager>. The page that loads the control does that thorugh the TabStrip comp.
The problem is that when I try to filter the data using the GUI, I get an error: "Object reference is not set to an object". When I put the same code in a single ASPX file, It works fine. I had several problems with grid examples in your site when I tried to include them as controls.
Can you please check it out?
i'm trying to implement a simple demo you wrote on this address:
http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/GeneralFeatures/CalculatedColumns/DefaultCS.aspx
With the change that I implement the code in a control. You can assume the control inherits <scriptManager>. The page that loads the control does that thorugh the TabStrip comp.
The problem is that when I try to filter the data using the GUI, I get an error: "Object reference is not set to an object". When I put the same code in a single ASPX file, It works fine. I had several problems with grid examples in your site when I tried to include them as controls.
Can you please check it out?
| <!-- content start --> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadGrid1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadGrid ShowGroupPanel="true" AutoGenerateColumns="false" ID="RadGrid1" |
| DataSourceID="SqlDataSource1" Skin="Vista" AllowFilteringByColumn="True" AllowSorting="True" |
| ShowFooter="True" runat="server" GridLines="None" AllowPaging="true"> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <MasterTableView AllowMultiColumnSorting="true"> |
| <Columns> |
| <telerik:GridBoundColumn Aggregate="Count" DataField="id" HeaderText="Product ID" |
| FooterText="Total products: "> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="title" HeaderText="Product name" SortExpression="title" |
| UniqueName="title"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn Aggregate="Sum" DataField="price" HeaderText="Unit price" |
| FooterText="Total price: "> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn Aggregate="Sum" DataField="amount" HeaderText="Units in stock" |
| FooterText="All units in stock: "> |
| </telerik:GridBoundColumn> |
| <telerik:GridCalculatedColumn HeaderText="Total Price" UniqueName="TotalPrice" DataType="System.Double" |
| DataFields="price, amount" Expression="{0}*{1}" FooterText="Total : " Aggregate="Sum" /> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings AllowDragToGroup="true" EnableRowHoverStyle="true" /> |
| </telerik:RadGrid> |
| <asp:Button ID="Button1" Text="PostBack!" CssClass="button" Style="margin: 10px 22px 10px 0px" |
| runat="server"></asp:Button> |
| Click PostBack to see the state of the grid is preserved. |
| <br /> |
| <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="Data Source=vmsmc;Initial Catalog=hadar;User ID=sa" |
| SelectCommand="SELECT * FROM tblProducts" runat="server"></asp:SqlDataSource> |
| </div> |