Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
104 views

Please help me on the below issues in Radgrid.I am using NeedDataSource for binding the grid.

1)I have a radgrid and filter with textbox(AutoPostBackOnFilter="true" ShowFilterIcon="false" CurrentFilterFunction="Conatins") for Name. 
On typing letters in the filter textbox ,for example  if I type 'MUH',the GRID should be filled with all records with name starting with 'MUH' ,without pressing enter.
2)In GridDateTimeColumn,I have given filter option as "PickerType="DatePicker" EnableRangeFiltering="true"".Here in the filter box I am having filter options as BETWEEN,NOT BETWEEN,IS NULL,NOT IS NULL,NO FILTER.
Can I have the Filter with options BETWEEN & NOT BETWEEN only?
3)I have entered a name in filter textbox for Name column,pressed enter,fetched corresponding record.Now if I press Refresh button,I need to clear the textbox,and refresh the grid populated with all data.
Presently,my grid is showing the filtered record on refresh.

Highly appreciate your help on this.
Thanks,
Soumya
Eyup
Telerik team
 answered on 24 Jul 2012
4 answers
600 views
Hi,

I am using Rad grid with following definition.

<telerik:RadGrid ID="radGridProject" runat="server"
           AutoGenerateColumns="False" CommandItemDisplay="Top" GridLines="None" AllowFilteringByColumn="True"
           AllowSorting="true" Width="100%" AllowPaging="true" PageSize="15"
           OnNeedDataSource="RadGridProject_NeedDataSource" OnItemDataBound="RadGridProject_OnItemDataBound"
           OnItemCommand="RadGridProject_OnItemCommand" AllowMultiRowSelection="false"
           ClientSettings-Resizing-AllowColumnResize="true" Skin="Default">
           <MasterTableView AutoGenerateColumns="false" GridLines="None" CommandItemDisplay="Top" EditMode="EditForms" DataKeyNames="ProjectID" AllowFilteringByColumn="True" TableLayout="Auto" Width="100%" >
               <RowIndicatorColumn>
                   <HeaderStyle Width="20px" />
               </RowIndicatorColumn>
               <ExpandCollapseColumn >
                   <HeaderStyle Width="20px" />
               </ExpandCollapseColumn>
                <Columns>
                   <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="20px" UniqueName="ProjectsEditButton">
                    <ItemStyle Width="5%" />
                   </telerik:GridEditCommandColumn>
                   <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="25px" UniqueName="ProjectsDeleteButton">
                   <ItemStyle Width="5%" />
                       <ItemTemplate>
                           <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" ImageUrl="~/Images/delete.gif" OnClientClick="javascript:return confirm('Are you sure you want to delete this record?')" />
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="ProjectName" HeaderText="   Project Name" SortExpression="Status" UniqueName="ProjectNameColumn" AllowFiltering="true">
                       <ItemTemplate>
                           <asp:Label ID="labelProjectName" runat="server" Text='<%# Bind("ProjectName") %>'></asp:Label>
                       </ItemTemplate>
                       <EditItemTemplate>
                           <asp:TextBox ID="textboxProjectName" runat="server" Text='<%# Bind("ProjectName") %>'></asp:TextBox>
                       </EditItemTemplate>
                   </telerik:GridTemplateColumn>
 
                   <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="Status" HeaderText="   Status" SortExpression="Status" UniqueName="StatusColumn" AllowFiltering="true">
                       <ItemTemplate>
                           <asp:Label ID="labelStatus" runat="server" Text='<%# Bind("Status") %>'></asp:Label>
                       </ItemTemplate>
                       <EditItemTemplate>
                           <asp:TextBox ID="textboxStatus" runat="server" Text='<%# Bind("Status") %>'></asp:TextBox>
                       </EditItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="ProjectType" HeaderText="   Project Type" SortExpression="ProjectType" UniqueName="ProjectTypeColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelProjectType" runat="server" Text='<%# Bind("ProjectType") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    
                   <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="City" HeaderText="   City" SortExpression="City" UniqueName="CityColumn" AllowFiltering="true">
                       <ItemTemplate>
                           <asp:Label ID="labelCity" runat="server" Text='<%# Bind("City") %>'></asp:Label>
                       </ItemTemplate>
                       <EditItemTemplate>
                           <asp:TextBox ID="textboxCity" runat="server" Text='<%# Bind("City") %>'></asp:TextBox>
                       </EditItemTemplate>
                   </telerik:GridTemplateColumn>
                      <telerik:GridTemplateColumn FilterControlWidth="80%" DataField="ProjectDescription" HeaderText="   Project Description" SortExpression="ProjectDescription" UniqueName="ProjectDescriptionColumn" AllowFiltering="true">
                       <ItemTemplate>
                           <asp:Label ID="labelProjectDescription" runat="server" Text='<%# Bind("ProjectDescription") %>'></asp:Label>
                       </ItemTemplate>
                       <EditItemTemplate>
                           <asp:TextBox ID="textboxProjectDescription" runat="server" Text='<%# Bind("ProjectDescription") %>'></asp:TextBox>
                       </EditItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="StNumber" HeaderText="   St. Number" SortExpression="StNumber" UniqueName="StNumberColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelStNumber" runat="server" Text='<%# Bind("StNumber") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="StPre" HeaderText="   StPre" SortExpression="StPre" UniqueName="StPreColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelStPre" runat="server" Text='<%# Bind("StPre") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="StName" HeaderText="   StName" SortExpression="StName" UniqueName="StNameColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelStName" runat="server" Text='<%# Bind("StName") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="StType" HeaderText="   StType" SortExpression="StType" UniqueName="StTypeColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelStType" runat="server" Text='<%# Bind("StType") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                   <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="StSuffix" HeaderText="   StSuffix" SortExpression="StSuffix" UniqueName="StSuffixColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelStSuffix" runat="server" Text='<%# Bind("StSuffix") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                   <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="Zip" HeaderText="   Zip" SortExpression="Zip" UniqueName="ZipColumn" AllowFiltering="true">
                       <ItemTemplate>
                           <asp:Label ID="labelZip" runat="server" Text='<%# Bind("Zip") %>'></asp:Label>
                       </ItemTemplate>
                       <EditItemTemplate>
                           <asp:TextBox ID="textboxZip" runat="server" Text='<%# Bind("Zip") %>'></asp:TextBox>
                       </EditItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn Visible="false"  FilterControlWidth="80px" DataField="ClientID" HeaderText="   ClientID" SortExpression="ClientID" UniqueName="ClientIDColumn" AllowFiltering="true">
                       <ItemTemplate>
                           <asp:Label ID="labelClientID" runat="server" Text='<%# Bind("ClientID") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                   <telerik:GridTemplateColumn Visible="false"  FilterControlWidth="80px" DataField="ClientName" HeaderText="   Client Name" SortExpression="ClientName" UniqueName="ClientNameColumn" AllowFiltering="true">
                       <ItemTemplate>
                           <asp:Label ID="labelClientName" runat="server" Text='<%# Bind("ClientName") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                   <telerik:GridTemplateColumn Visible="false"  FilterControlWidth="80px" DataField="MSTProjectID" HeaderText="   MSTProjectID" SortExpression="MSTProjectID" UniqueName="MSTProjectIDColumn" AllowFiltering="true">
                       <ItemTemplate>
                           <asp:Label ID="labelMSTProjectID" runat="server" Text='<%# Bind("MSTProjectID") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                   <telerik:GridTemplateColumn Visible="false"  FilterControlWidth="80px" DataField="ProjectID" HeaderText="   Project ID" SortExpression="ProjectID" UniqueName="ProjectIDColumn" AllowFiltering="true">
                       <ItemTemplate>
                           <asp:Label ID="labelProjectID" runat="server" Text='<%# Bind("ProjectID") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
                     
 
                   <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="LatMin" HeaderText="   LatMin" SortExpression="LatMin" UniqueName="LatMinColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelLatMin" runat="server" Text='<%# Bind("LatMin") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="LatMax" HeaderText="   LatMax" SortExpression="LatMax" UniqueName="LatMaxColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelLatMax" runat="server" Text='<%# Bind("LatMax") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="LongMin" HeaderText="   LongMin" SortExpression="LongMin" UniqueName="LongMinColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelLongMin" runat="server" Text='<%# Bind("LongMin") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                    <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="LongMax" HeaderText="   LongMax" SortExpression="LongMax" UniqueName="LongMaxColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelLongMax" runat="server" Text='<%# Bind("LongMax") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
                   <telerik:GridTemplateColumn FilterControlWidth="80px" DataField="ProjectNotes" HeaderText="   Project Notes" SortExpression="ProjectNotes" UniqueName="ProjectNotesColumn" AllowFiltering="true" Visible="false">
                       <ItemTemplate>
                           <asp:Label ID="labelProjectNotes" runat="server" Text='<%# Bind("ProjectNotes") %>'></asp:Label>
                       </ItemTemplate>
                   </telerik:GridTemplateColumn>
 
               </Columns>
               <EditFormSettings editformtype="Template">
                   <FormTemplate>
                       <table>
                           <tr>
                               <td align="left">
                                   <mst:ProjectInfo ID="uctrlProjectInfo" runat="server" />
                               </td>
                           </tr>
                           <tr>
                               <td>
                                   <asp:Button ID="btnUpdate" runat="server" CommandName="Update" Text="Submit" />
                                    
                                   <asp:Button ID="btnCancel" runat="server" CommandName="Cancel" Text="Cancel" CausesValidation="false" />
                               </td>
                           </tr>
                       </table>
                   </FormTemplate>
               </EditFormSettings>
               <NestedViewTemplate>
                   <table>
                       <tr>
                           <td align="left">
                               <mst:ProjectInfo ID="uctrlProjectInfo" runat="server" />
                           </td>
                       </tr>
                   </table>
               </NestedViewTemplate>
                
             
           </MasterTableView>
           <ClientSettings AllowDragToGroup="True">
               <Scrolling AllowScroll="false" UseStaticHeaders="True" />
               <Selecting AllowRowSelect="true" />
               <Resizing AllowColumnResize="True" />
           </ClientSettings>
           <FilterMenu EnableTheming="True" Skin="Default2006">
               <CollapseAnimation Duration="200" Type="OutQuint" />
           </FilterMenu>
           <GroupingSettings CaseSensitive="false" />
           <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
           <HeaderStyle HorizontalAlign="Left" />
           <ValidationSettings CommandsToValidate="PerformInsert,Update" EnableValidation="true" />
           
       </telerik:RadGrid>

I am exporting the grid to excel using an image button click event as follows:

protected void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
       {
 
 
           string fileName = "";
           List<ProjectBO> listProjectBO = ProjectDAP.GetAllProjects();
           if (listProjectBO.Count > 0)
           {
               // Exported excel file name contains of ClientName,ProjectName,ArrivalDate
               fileName = "ProjectData";
           }
           radGridProject.DataSource = ProjectDAP.GetAllProjects();
           radGridProject.Rebind();
           //radGridProject.AutoGenerateColumns = true;
           radGridProject.ExportSettings.FileName = fileName;
 
 
           radGridProject.MasterTableView.Columns.FindByUniqueName("ProjectIDColumn").Visible = true;
           radGridProject.MasterTableView.ExpandCollapseColumn.Visible = false;
           radGridProject.MasterTableView.RowIndicatorColumn.Visible = false;
           radGridProject.MasterTableView.Columns.FindByUniqueName("ProjectsEditButton").Visible = false;
           radGridProject.MasterTableView.Columns.FindByUniqueName("ProjectsDeleteButton").Visible = false;
           radGridProject.MasterTableView.Columns.FindByUniqueName("MSTProjectIDColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("ProjectTypeColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("ProjectDescriptionColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("ClientIDColumn").Visible = true;
 
           radGridProject.MasterTableView.Columns.FindByUniqueName("ClientNameColumn").Visible = false;
 
           radGridProject.MasterTableView.Columns.FindByUniqueName("StNumberColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("StPreColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("StNameColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("StTypeColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("StSuffixColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("LatMinColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("LatMaxColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("LongMinColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("LongMaxColumn").Visible = true;
           radGridProject.MasterTableView.Columns.FindByUniqueName("ProjectNotesColumn").Visible = true;
           this.radGridProject.GridLines = GridLines.Both;
           radGridProject.ExportSettings.Excel.Format = GridExcelExportFormat.Html;
           this.radGridProject.ExportSettings.ExportOnlyData = true;
           this.radGridProject.ExportSettings.IgnorePaging = true;
           foreach (GridItem commandItem in this.radGridProject.MasterTableView.GetItems(GridItemType.CommandItem))
           {
               commandItem.Visible = false;
           }
 
            
           radGridProject.MasterTableView.ExportToExcel();
 
      }

Problem is that when ever I export and open the excel sheet an empty column "A" is shown in the excel sheet and then the columns specified as shown in further column in sheet. I need to remove this column "A". Is it so that while exporting to excel the columns starts from "B" in excel sheet and not "A"..?

Please help me I need to remove this column "A " from excel sheet or rather it should not get displayed at all.

Thanks.
Kris
Top achievements
Rank 1
 answered on 24 Jul 2012
2 answers
229 views
Hi Team,
I have a hierarchical grid in which, in a group header, I am adding a link button control on ItemDataBoundEvent.
On click of this button, I want to get GridDataItem object so that I can find the values in columns.
I tried using GridDataItem dItem = rgVoucherSearch.MasterTableView.GetItems(GridItemType.Item)[0] as GridDataItem, but it always returns me the first (0th) DataItem. 
How can I get the rowindex/groupindex so that I can get the excat row ?

This is my code behind :
void lnkOpenVoucher_Command(object sender, CommandEventArgs e)
 {
    LinkButton lnkOpenVoucher = (LinkButton)sender;
    GridGroupHeaderItem groupHeader = (GridGroupHeaderItem)lnkOpenVoucher.NamingContainer;
     string url = string.Empty;
 
            GridDataItem dItem = rgVoucherSearch.MasterTableView.GetItems(GridItemType.Item)[0] as GridDataItem;
 
      if (dItem["AccountJournalEventTypeID"].Text ==                                             GlobalConstants.ACCOUNTJOURNAL_EVENT_TYPE_ID_FOR_CASH_RECEIPT.ToString())
            url = "ManageTransactionPrerview.aspx?LedgerReferenceKey=" + dItem["AccountJournalLedgerReferenceKey"].Text + "&EventTypeID=" + GlobalConstants.ACCOUNTJOURNAL_EVENT_TYPE_ID_FOR_CASH_RECEIPT;
     if (dItem["AccountJournalEventTypeID"].Text == GlobalConstants.ACCOUNTJOURNAL_EVENT_TYPE_ID_FOR_AR_INVOICE.ToString())
             url = "ManageTransactionPrerview.aspx?LedgerReferenceKey=" + dItem["AccountJournalLedgerReferenceKey"].Text + "&EventTypeID=" + GlobalConstants.ACCOUNTJOURNAL_EVENT_TYPE_ID_FOR_AR_INVOICE;
}

Any help appreciated. 
Thanks,
Lok..
Lokesh
Top achievements
Rank 1
 answered on 24 Jul 2012
8 answers
594 views

Hello,

I am trying, without success, to get the scroll bars to appear properly on my page. Here's the scenario,

  • A default page divided into a header, left nav bar and main content area. The left nav bar has a radtabstrip with each tab linked to a radpageview within a radmultipage that is in the main content area.
  • Each radpageview has a contenturl that loads another page into it
  • The page loaded into the radpageview has a radsplitter with various radpanes and radpanelbars within it

What I want is for the radpageview to occupy 100% of the main content area width and height and for the page loaded into it to scroll up and down within in this area. I've tried many different combinations of setting the heights of the different components on the different pages, but am unable to get the desired result. I get either multiple right scroll bars or the page doesn't resize properly when the browser is resized or content is off the bottom of the window and can't be scrolled to.

Can you suggest the best method of setting the heights and scroll bar properties of each element? What should be fixed, auto, on and off, etc.

Thank you,
John

Vessy
Telerik team
 answered on 24 Jul 2012
5 answers
584 views
Hi Team,
I have a hierarchical grid in which I wan to show sum of values in columns for Groups as well as for total column also.
It was working fine before, but don't know what happened, it is not showing the Footer Text now..

This is my Grid :

<telerik:RadGrid ID="rgProjectBudget" OnNeedDataSource="rgProjectBudget_NeedDataSource"  runat="server" GridLines="None" ShowGroupPanel="false" AllowMultiRowSelection="true" OnDeleteCommand="rgProjectBudget_DeleteCommand" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="false" ShowFooter="true">
                                                <MasterTableView Width="100%" GroupsDefaultExpanded="false" ExpandCollapseColumn-Groupable="true"  CommandItemSettings-ShowAddNewRecordButton="false" GroupLoadMode="Client" ShowGroupFooter="true">
                                                    <GroupByExpressions>
                                                        <telerik:GridGroupByExpression>
                                                            <SelectFields>
                                                                <telerik:GridGroupByField FieldAlias="ChartOfAccountSetDetailDescription" FieldName="ChartOfAccountSetDetailDescription" HeaderText="GL Account" HeaderValueSeparator=" : "></telerik:GridGroupByField>
                                                            </SelectFields>
                                                            <GroupByFields>
                                                                <telerik:GridGroupByField FieldName="ChartOfAccountSetDetailDescription" SortOrder="Descending"></telerik:GridGroupByField>
                                                            </GroupByFields>
                                                        </telerik:GridGroupByExpression>
                                                    </GroupByExpressions>
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="ChartOfAccountSetDetailValueCode" DataType="System.String" HeaderText="Project Heads" AllowFiltering="true" AutoPostBackOnFilter="true" FilterControlWidth="30%" CurrentFilterFunction="Contains" UniqueName="ChartOfAccountSetDetailValueCode">
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Left" Width="10%" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="ChartOfAccountSetDetailDescription" DataType="System.String" HeaderText="Description" AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" UniqueName="ChartOfAccountSetDetailDescription" FilterControlWidth="60%">
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Left" Width="10%" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="PurchaseOrderNo" DataType="System.String" HeaderText="PO No" AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" UniqueName="PurchaseOrderNo" FilterControlWidth="60%">
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Left" Width="10%" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="GR_Number" DataType="System.String" HeaderText="GR No" AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" UniqueName="GR_Number" FilterControlWidth="60%">
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Left" Width="10%" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="QuotedValue" HeaderText="Quoted Amount" DataField="QuotedValue" CurrentFilterFunction="EqualTo" AllowFiltering="true" DataType="System.Double" DataFormatString="{0:N}" FilterControlWidth="30%" AutoPostBackOnFilter="true" Aggregate="Sum" FooterText="Quoted Value: ">
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Right" Width="10%" /><FooterStyle HorizontalAlign="Right" />
                                                            <FooterStyle HorizontalAlign="Right" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="SecondaryEntityBudget" HeaderText="PV1" DataField="SecondaryEntityBudget" DataFormatString="{0:N}" CurrentFilterFunction="EqualTo" AllowFiltering="true" DataType="System.Double" Aggregate="Sum" FooterText="PV1: " FilterControlWidth="30%" AutoPostBackOnFilter="true">
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Right" Width="10%" /><FooterStyle HorizontalAlign="Right" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="SupplementaryBudget1" HeaderText="PV0" DataField="SupplementaryBudget1" DataFormatString="{0:N}" CurrentFilterFunction="EqualTo" AllowFiltering="true" DataType="System.Double" Aggregate="Sum" FooterText="PV0: " FilterControlWidth="30%" AutoPostBackOnFilter="true">
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Right" Width="10%" /><FooterStyle HorizontalAlign="Right" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="COARequisitionAmount" HeaderText="Commited" DataField="COARequisitionAmount" FooterText="Commited: " CurrentFilterFunction="Contains" AllowFiltering="true" DataFormatString="{0:N}" AutoPostBackOnFilter="true" Aggregate="Sum">
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Right" Width="10%" /><FooterStyle HorizontalAlign="Right" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="COAActualAmount" HeaderText="Actual Amount" Aggregate="Sum" FooterText="Actual Amount: " DataField="COAActualAmount" CurrentFilterFunction="EqualTo" AllowFiltering="true" DataFormatString="{0:N}" DataType="System.Double" FilterControlWidth="30%" AutoPostBackOnFilter="true">
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Right" Width="10%" /><FooterStyle HorizontalAlign="Right" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridCalculatedColumn HeaderText="Balance" UniqueName="Balance" DataType="System.Double" DataFormatString="{0:N}" DataFields="SecondaryEntityBudget,COARequisitionAmount,COAActualAmount" Expression="{0}-({1}+{2})" FooterText="Balance: " Aggregate="Sum">
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Right" Width="10%" /><FooterStyle HorizontalAlign="Right" />
                                                        </telerik:GridCalculatedColumn>
                                                        <telerik:GridBoundColumn DataField="StatusID" DataType="System.Int32" HeaderText="StatusID" UniqueName="StatusID" Display="false"></telerik:GridBoundColumn>
                                                        <telerik:GridHyperLinkColumn DataTextField="StatusName" DataType="System.String" ItemStyle-HorizontalAlign="Center" HeaderText="Status" UniqueName="StatusName" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" DataNavigateUrlFields="COABudgetDetailID,SecondaryEntityBudget,SupplementaryBudget1,SupplementaryBudget2" DataNavigateUrlFormatString="javascript:CheckBudgetAmount({0},{1},{2},{3});" Visible="false"></telerik:GridHyperLinkColumn>
                                                        <telerik:GridBoundColumn DataField="SecondaryEntityBudgetApproved" DataType="System.Double" Display="false" HeaderText="SecondaryEntityBudgetApproved" UniqueName="SecondaryEntityBudgetApproved">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="SupplementaryBudget1Approved" DataType="System.Double" Display="false" HeaderText="SupplementaryBudget1Approved" UniqueName="SupplementaryBudget1Approved">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="SupplementaryBudget2Approved" DataType="System.Double" Display="false" HeaderText="SupplementaryBudget2Approved" UniqueName="SupplementaryBudget2Approved">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridTemplateColumn HeaderText="Not Applicable" UniqueName="IsBudgetNotApplicable" FilterControlWidth="20%" CurrentFilterFunction="Contains" AllowFiltering="true" AutoPostBackOnFilter="true" Display="false">
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkApplicable" runat="server" Checked='<%# DataBinder.Eval(Container,"DataItem.IsBudgetNotApplicable") %>' Visible="false" />
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Left" /><ItemStyle HorizontalAlign="Left" Width="10%" />
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridCheckBoxColumn DataField="IsParent" UniqueName="IsParent" HeaderText="IsParent" Display="false"></telerik:GridCheckBoxColumn>
                                                        <telerik:GridBoundColumn DataField="IsParent" UniqueName="IsParent1" HeaderText="IsParent1" Display="false"></telerik:GridBoundColumn>
                                                        <telerik:GridClientSelectColumn HeaderText="Select" UniqueName="Select" Display="false"></telerik:GridClientSelectColumn>
                                                        <telerik:GridButtonColumn CommandName="Delete" HeaderText="Delete?" Text="Delete" Display="false" UniqueName="DeleteCommandColumn" ButtonType="ImageButton" ConfirmText="Are you sure you want to delete ?">
                                                        </telerik:GridButtonColumn>
                                                    </Columns>
                                                </MasterTableView>
                                                <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="false" AllowColumnsReorder="True">
                                                    <Selecting AllowRowSelect="True"></Selecting>
                                                    <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="False"></Resizing>
                                                </ClientSettings>
                                                <GroupingSettings ShowUnGroupButton="true" RetainGroupFootersVisibility="true" />
                                            </telerik:RadGrid>

Any help appreciated.
Thanks,
Lok..
Lokesh
Top achievements
Rank 1
 answered on 24 Jul 2012
3 answers
168 views
Hi All 


I have a drop down with check box. user can select the more then one value select in check box and this value can save in the session variable after that redirect to the next page when user come back again in this page all selected check box value    those are saved in the session can set the all the check box value  checked in that drop down.

for example user can select 2 value then session["selectedvalue"]="1,2";
then how to set this selected value set in the check box of that combo box. 




thanks 

Sushobhit Raman
Sushobhit
Top achievements
Rank 2
 answered on 24 Jul 2012
2 answers
99 views
I have an ASP.Net page that has about 8 tabs that are created from a RadTabStrip control.

On the 1st tab I have a RadToolBar with one button that when clicked opens a modal popup.

On the 5th tab I have an ASP Button that opens a modal popup that contains an ASP FileUpload control.

After I select my file to upload and I click the OK button on that modal popup, it uploads the file and then closes the modal popup.

The problem I'm having is after the modal popup closes and I click on the 1st tab again, the default skin of the RadToolBar buttons are completely gone and it only shows the button text and icon image.

Any ideas why this is happening?

Two images are attached of what it should and shouldn't look like.
Brett
Top achievements
Rank 1
 answered on 24 Jul 2012
1 answer
120 views
I am using telerik.web.ui v2011.3.1305.35. When you set the checked property for a radCombobox to "true", each item you check creates a concatenated, comma separated list in the display box. This uses the item text of the combo box. How can you do the same thing except display the item "value" in a comma separated list? BTW, this is way cool and made life a lot easier coding wise.
Nencho
Telerik team
 answered on 24 Jul 2012
3 answers
233 views
So I have noticed some minor rendering issues with the RadGrid's we have been using in our current project, and was hoping I could get some help.

1. Currently when dragging columns to do grouping if the text inside a header has not wrapped but others have there is large white space around the "dragging" window. Please see the two attachments smalldrag and fulldrag. Even with the one that has had text wrapped inside of it some white space appears. Is there a way to eliminate this white space whenever dragging any column header?

2. Currently when the grid first initializes it will have horizontal scrolling and content will NOT be clipped/hidden in any of the table cells. This is how we want the grids to behave. However when we do the grouping operation columns become fixed, content in the cells gets heavily cropped, and the horizontal scrollbar goes away (very bad). Please see the two attachments pregroup and postgroup.

Thank you in advance for any assistance.
Galin
Telerik team
 answered on 24 Jul 2012
10 answers
731 views
Hello ,

I have an issue when I change a cell value from java script.

My case is:

I have a Radgrid and a user can select a row.
When the user selects the row, I get the row key and allow him to add a new action, by opening a new Radwindow.
When the window closes, I return the id of the action added.

On closeEvent, I call a javascript function where the value returned goes to a cell at the initial grid (this cell has no value from DB).
The code I use to change the value is the following:

function refreshDataActions(oWnd, args) {
              
var arg = args.get_argument();
               
if (arg) {
                  
if (arg.actionId) {
                      
var HiddenField_contract_value = document.getElementById("HiddenField_contract").value;
                       
var grid = $find("<%=contractsGrid.ClientID %>");
                       
var MasterTable = grid.get_masterTableView();
                       
var rows = MasterTable.get_dataItems();
                      
for (var i = 0; i < rows.length; i++) {
                          
var row = rows[i];
                           
var activeCell = MasterTable.getCellByColumnUniqueName(row, "actionRESULT");
                           
var contractRow = row.getDataKeyValue("CONTR_ID");
                          
if (contractRow == HiddenField_contract_value) {
                               activeCell.innerHTML = arg.actionId;
                           }
                        }
                          $find(
"<%= RadAjaxManager1.ClientID %>").ajaxRequest("actionAdded");
                   }
                }
            }

Everything works until now. I can see the new value at the grid.

When the returned value is not null, I perform an Ajax request, and the I check the value at the cell if changed.
My problem is, that when I loop through the items of the grid, I get a "&nbsp" value.
The code I use to loop through the items is the following
 
For Each item In contractsGrid.Items           
      If item("actionRESULT").text <> "&nbsp" Then               
            counterActions = counterActions + 1          
      End If       
Next

Is there something I am missing here?

I would really appreciate your help!

Thank you in advance,
Peny

Peny
Top achievements
Rank 1
 answered on 24 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?