Hi all,
I'm trying to freeze the first two columns of the grid. I'm not able to freeze it. Below is the code that I've used. Any help on this would be highly appreciated.
<
telerik:RadGrid ID="rgSupervisorDataEntry" runat="server" AllowMultiRowSelection="True"
SkinID="grdDynamic" ClientSettings-Scrolling-ScrollHeight="40%" AllowPaging="True"
PageSize="15" OnNeedDataSource="rgSupervisorDataEntry_NeedDataSource" Width="100%">
<headerstyle wrap="true" Width="10%" />
<mastertableview headerstyle-wrap="true" width="150%" TableLayout="Auto">
<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" Width="100%" />
<Columns>
<telerik:GridClientSelectColumn UniqueName="CheckSelected" HeaderStyle-Width="10">
</telerik:GridClientSelectColumn >
</Columns>
</mastertableview>
<clientsettings allowkeyboardnavigation="true" allowcolumnsreorder="false" reordercolumnsonclient="false">
<Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
<Scrolling AllowScroll="true" FrozenColumnsCount="2" UseStaticHeaders="true" ScrollHeight="300px" />
<Resizing AllowColumnResize="true" AllowRowResize="false" ResizeGridOnColumnResize="true"
ClipCellContentOnResize="true" EnableRealTimeResize="true" />
<ClientEvents OnRowSelecting="RadGrid_RowSelecting" OnRowDeselecting="RadGrid_RowDeselecting" />
</clientsettings>
</telerik:RadGrid>
Thanks in advance!!
<telerik:RadGrid ID="grdLineManagement" runat="server" AllowFilteringByColumn="true" AllowCustomPaging = "true" EnableEmbeddedSkins="false" Skin="eMod" AllowPaging="true" PageSize="10" Width="926" GridLines="None" AllowSorting="true" OnInit="grdLineManagement_Init"> <ClientSettings AllowColumnsReorder="false" ReorderColumnsOnClient="true"> <DataBinding Location="../Services/ManageLinesService.asmx" SelectMethod="GetChassisPoolLines" /> <Resizing AllowResizeToFit="true" AllowColumnResize="true" /> <ClientEvents OnCommand="grdLineManagement_Command" OnRowDataBound="grdLineManagement_RowDataBound"/> <Scrolling AllowScroll="true" ScrollHeight="" UseStaticHeaders="true" FrozenColumnsCount="1" /> </ClientSettings> <PagerStyle AlwaysVisible="True" PageButtonCount="5" /> <FilterMenu EnableImageSprites="False"> </FilterMenu> <MasterTableView TableLayout="Fixed" CommandItemDisplay="Top" HierarchyLoadMode="Client" ExpandCollapseColumn-Visible="false" > <CommandItemTemplate> <div class='fr tm10 bm10'>Export: <asp:ImageButton ID="btnExcel" runat="server" ImageUrl="~/IMAGES/CONTROLS/ExcelExport.jpg" onclick="btnExcel_Click"/> <asp:ImageButton ID="btnPdf" runat="server" ImageUrl="~/IMAGES/CONTROLS/ExportPDF.jpg" onclick="btnPdf_Click" /></div> </CommandItemTemplate> <Columns> <telerik:GridButtonColumn UniqueName="Edit" HeaderStyle-Width="50" Text="Edit" CommandName="Edit"> </telerik:GridButtonColumn> <telerik:GridBoundColumn HeaderStyle-Width="180" FilterControlWidth="68px" DataField="ChassisPoolLineId" HeaderText="ChassisPoolLineId" UniqueName="ChassisPoolLineId" FilterListOptions="VaryByDataType" Visible="false"> </telerik:GridBoundColumn> ...... <telerik:GridBoundColumn HeaderStyle-Width="125" HeaderStyle-Font-Bold="true" FilterControlWidth="85px" DataField="SalesTaxRate" DataType="System.Decimal" HeaderText="Sales Tax Rate" UniqueName="SalesTaxRate" FilterListOptions="VaryByDataType" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right"> </telerik:GridBoundColumn> </Columns> <NestedViewTemplate> </NestedViewTemplate> <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" ShowExportToExcelButton="true" /> </MasterTableView> </telerik:RadGrid>Dim expression As GridGroupByExpression = New GridGroupByExpression Dim gridGroupByField As GridGroupByField = New GridGroupByField 'SelectFields values (appear in header) gridGroupByField = New GridGroupByField gridGroupByField.FieldName = "Reg" gridGroupByField.HeaderText = "Reg" expression.SelectFields.Add(gridGroupByField) expression.GroupByFields.Add(gridGroupByField) gridJourneys.MasterTableView.GroupByExpressions.Add(expression)<GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldName="Reg" HeaderText="Reg" /> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="reg" HeaderText="reg" /> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions>Field Reg not found in the source table. Please check the expression syntax. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: Telerik.Web.UI.GridGroupByException: Field Reg not found in the source table. Please check the expression syntax. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [GridGroupByException: Field Reg not found in the source table. Please check the expression syntax.] Telerik.Web.UI.GridDataSetHelper.CreateGroupByTable(DataTable SourceTable, GridTableView view) +376 Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation() +2699 Telerik.Web.UI.GridEnumerableFromDataView.TransformEnumerable() +21 Telerik.Web.UI.GridTableView.GetEnumerator(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ArrayList dataKeysArray) +105 Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +169 Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +499 System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57 System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142 Telerik.Web.UI.GridTableView.PerformSelect() +4 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73 Telerik.Web.UI.GridTableView.DataBind() +238 Telerik.Web.UI.RadGrid.DataBind() +80 Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +2122 Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +121 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 <telerik:GridBoundColumn DataField="Reg" HeaderText="Reg">
Protected Sub gridJourneys_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles gridJourneys.ItemDataBound If e.Item.OwnerTableView.Name = "Journeys" Then If TypeOf e.Item Is GridDataItem Then Dim dataItem As GridDataItem = CType(e.Item, GridDataItem) Dim x As TimeSpan = TimeSpan.Parse(dataItem("IdlingTime").Text) idlingTime = (idlingTime + x) Dim y As Double = Double.Parse(dataItem("DistanceTravelled").Text) distanceTravelled = (distanceTravelled + y) Dim z As TimeSpan = TimeSpan.Parse(dataItem("TimeTaken").Text) timeTaken = (timeTaken + z) ElseIf TypeOf e.Item Is GridFooterItem Then Dim footerItem As GridFooterItem = CType(e.Item, GridFooterItem) footerItem("DistanceTravelled").Text = distanceTravelled.ToString("F2") 'footerItem("TimeTaken").Text = timeTaken.ToString footerItem("TimeTaken").Controls.Add(New LiteralControl("Total: " & timeTaken.ToString & "<br/>")) footerItem("TimeTaken").Controls.Add(New LiteralControl("Idling: " & idlingTime.ToString)) End IfHi,
I am using the FileExplorer and I have EnableAsyncUpload set to true. I have also applied these modifications so that the Open menu option will always force a download.
With the Telerik AsynchUpload control, I can use the OnClientValidationFailed to verify the status of an upload. I need to be able to do this when clicking the Upload toolbar button within FileExplorer. But I don’t want to validate a “failed” upload; I want to validate a “successful” upload.
And I’m not sure that either test can be preformed when forcing a download, since I am actually invoking my browser’s “Save As” feature, as opposed to a Telerik download feature.
Any suggestions?
Thanks,
Steven