Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
Hello,

I am currently evaluating the RadRibbon control.
I put a RadDateTimePicker onto a RibbonBar using RibbonBarTemplateItem like this:

...
<telerik:RibbonBarTab runat="server" ID="tab1" Text="Date">
    <telerik:RibbonBarGroup runat="server" ID="group1" Text="Date" >
        <Items>
            <telerik:RibbonBarTemplateItem>                                                       
                <telerik:RadDateTimePicker runat="server" ID="dtpDateFrom" />
            </telerik:RibbonBarTemplateItem>                       
        </Items>                                      
    </telerik:RibbonBarGroup>
</telerik:RibbonBarTab>    
...

The DateTimePicker control gets rendered, but I can't click the textbox or the buttons for choosing the date or the time.

When I put the RadDateTimePicker outside the Ribbon it works fine.

Do you have any advice?

Thank you,
Raik

EDIT: This seems to be a problem with Firefox (I am using FF 17.0.1). It works in IE 7.
Bozhidar
Telerik team
 answered on 13 Dec 2012
1 answer
32 views
HI,
I have a radgrid, which has editmode as InPlace.
In the Insertcommand, i am getting the values as :
<InsertItemTemplate>
                       <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text="">
                       </telerik:RadTextBox>
                   </InsertItemTemplate>

DataTable purchaseOrder = this.PurchaseOrderData;
                                  
GridDataInsertItem item = (GridDataInsertItem)e.Item;
                               
RadTextBox txtProductNumber = (RadTextBox)item.FindControl("RadtxtPrdNumber");
string strProductNumbervalue = txtProductNumber.Text;

when i insert the first row, i am getting the value in "strProductNumbervalue". However when i insert the second row, the "strProductNumbervalue" is coming as empty.
How to fix this?
Thanks
Radoslav
Telerik team
 answered on 13 Dec 2012
1 answer
111 views
Hi,
In the radgrid, i am using editmode = inplace.
sample aspx for edititemtemplate is:
<EditItemTemplate>
                      <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text='<%# Eval("ProductNumber") %>'>
                      </telerik:RadTextBox>
                  </EditItemTemplate>

In the updateCommand code i have the below:
GridEditableItem editedItem = (GridEditableItem)e.Item;
                string value = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ProductNumber"].ToString();
                          
                  
                DataTable ordersTable = this.OrderGridData;
  
                //Locate the changed row in the DataSource 
  
                string filter = "ProductNumber = '" + value + "'";
                  
                DataRow[] changedRows = ordersTable.Select(filter);
        Hashtable newValues = new Hashtable();
                //The GridTableView will fill the values from all editable columns in the hash 
                // in the below code newvalues is coming as empty 
                e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
  
                DataRow changedRow = changedRows[0];
                changedRow.BeginEdit();

The bolded line has newvalues as empty. i have changed few columns. How to retrieve the updated items?
Thanks
Antonio Stoilkov
Telerik team
 answered on 13 Dec 2012
1 answer
77 views
Hi,

I have a RadGrid with PagerStyle Position="TopAndBottom". I need to change the page size options displayed in the rendered drop down lists, but I am unable to change the options in the seconds (Bottom) drop down list.

Here's my code (but it only affects the first drop down list):

function setUpPager(radGrid) {
    var comboBox = $telerik.findControl(radGrid.get_element(), "PageSizeComboBox");

    var comboItem100 = new Telerik.Web.UI.RadComboBoxItem();
    comboItem100.set_text("10000");
    comboItem100.set_value(100);
    comboItem100.get_attributes().setAttribute("ownerTableViewId", radGrid.get_masterTableView().get_id());

    comboBox.trackChanges();
    comboBox.get_items().add(comboItem100);
    comboBox.commitChanges();
}

Anyone knows how to make the code affect also the second drop down? I am using version 2011.2.
Antonio Stoilkov
Telerik team
 answered on 13 Dec 2012
1 answer
107 views
HI,
Is it possible to add the Footer text for the gridcalculated column programmatically ( c# )?

If yes, how to achieve it?

Thanks
Shinu
Top achievements
Rank 2
 answered on 13 Dec 2012
1 answer
79 views
Hi 

i'm trying to export a grid with 2 detail tables to excel, when i do the export in the excel documents appears 2 columns in color gray in front the text.  I dont understand where my problem because when i do this export from word and pdf works fine

Thanks in advance

There is my Code Behind :

grdcostcategory.ExportSettings.ExportOnlyData = False
            grdcostcategory.ExportSettings.IgnorePaging = False
            grdcostcategory.ExportSettings.OpenInNewWindow = True
            grdcostcategory.MasterTableView.HierarchyDefaultExpanded = False
 
            grdcostcategory.MasterTableView.UseAllDataFields = True
 
            grdcostcategory.ExportSettings.FileName = TL_CF_Configuration.Constants.ExportCostCategory.ToString
            grdcostcategory.MasterTableView.GetColumn("BtnEditImage").Visible = False
            grdcostcategory.MasterTableView.GetColumn("BtnNewClientLocationImage").Visible = False
 
            grdcostcategory.ExportSettings.HideStructureColumns = True
            grdcostcategory.GridLines = GridLines.Both

Shinu
Top achievements
Rank 2
 answered on 13 Dec 2012
3 answers
76 views
Throughout my ASP.Net app I've successfully used the standard DropDownListBox control.  However, I now have a special circumstance in which I need to multiple columns of information rather than the standard single column.  So I'm using the RadComboBox for the first time.  However, reading through the documentation I'm somewhat confused about how to correctly populate it.

Here's my scenario:

I have a DataTable with 3 fields:
  1. Master_Idx
  2. Description
  3. LevelIdx

In the RadComboBox I wish to display two columns:

  1. Description
  2. A special calculated field which stems from LevelIdx

So in the layout page I've defined the RadComboBox like this:

<telerik:RadComboBox ID="radListBox" runat="server" OnSelectedIndexChanged="radListBox_SelectedIndexChanged">
   <ItemTemplate>
      <table>
         <tr>
            <td><%# DataBinder.Eval(Container.DataItem, "Description") %></td>
            <td><%# GetPass_ContractLevel(Convert.ToInt32(Container.DataItem, "LevelIdx"))) %></td>
         </tr>
      </table>
   </ItemTemplate>                        
</telerik:RadComboBox>

In my server-side code I'm populating the RadComboBox like this:

            radList.DataSource = dataTable;
            radList.DataTextField = "Description";
            radList.DataValueField = "Master_Idx";
            radList.DataBind();

            for (int i = 0; i < radList.Items.Count; i++)
            {
              radList.Items[i].DataBind();
            }

The problem is that the LevelIdx value being passed to the server-side method "GetPass_ContractLevel" is always zero.  However, I've successfully implemented "helper" methods like this before which are called from the layout code.  It doesn't seem to be working in this case though.

What am I doing wrong?

Robert

Robert
Top achievements
Rank 1
 answered on 13 Dec 2012
6 answers
378 views
Hello.

Im using a radgrid, and i need to make several changes, first i need to eliminate "refresh" button from CommandItemSettings coul you help me out?

The second change i need to do is set visible false property to a colum in hierarchy, so far im capable to set the property visible for the master table, but i cannot find how to make it on detail table, i am trying to make it visible or invisible programatically.

thanks for your help.
Shinu
Top achievements
Rank 2
 answered on 13 Dec 2012
6 answers
344 views
Hello,

I have rad grid of 50000 records with paging (page size 10).
Now I am selecting row from client side but it not get selected .
Page is remained on first page only

Suppose, I have selected row no. 49999 from client side then page index should be 5000, but page index  remains  0.

Please give me solution it is urgent.

following somthing I have tried

var
pageindex = 0;

var grid = $find("<%=rgdImportExport.ClientID %>");

var masterTable = grid.get_masterTableView();

 var p = masterTable._data.PageSize * masterTable._data.PageCount;

// for (var i = 0; i < p; i++) {

// if (i == id) {

// pageindex = i / masterTable.get_pageSize()

// break;

// }

 

/ /}

masterTable.selectItem(id);

masterTable.set_currentPageIndex(3)

Jayesh Goyani
Top achievements
Rank 2
 answered on 13 Dec 2012
4 answers
623 views
Hi, i got this problem. In my grid I can filter on some columns. This is working fine, however when I filter footer of the grid keeps showing the paging despite the fact that the filtering results in less items than configured in the RadGrid (15 items).

For binding the data to the grid I use the Needdatasource-event. In this event I also have some filtering based on previous set session-value.

So filtering does working. But it should not show the paging when I have less than 15 items. Also when paging is shown, it looks like it is still based on the whole dataset. Not the filterd dataset.

When I don't use filtering, paging is working fine.

The filtering set in the needdatasource event is independent from the filtering in the radgrid -filteritems itself.

What am I missing.

Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
       Dim dtTaxatie As DataTable = (New RisicoTaxatieManager()).GetTaxatieOverzicht()
 
       Dim filterExpression As String = String.Empty
       Dim columnIdent As String = String.Empty
       Dim row As RisicoTaxatie.libPatientRow = Nothing
 
       If (Not Page.IsPostBack) Then
           If Not Session("PatientRow") Is Nothing Then
               row = DirectCast(Session("PatientRow"), RisicoTaxatie.libPatientRow)
               If Not String.IsNullOrEmpty(AppConfig.FilterColumn) Then
                   Select Case AppConfig.FilterColumn
                       Case "MITS"
                           filterExpression = IIf(Not row.IsMitsnummerNull(), "(Mitsnummer='" + row.Mitsnummer.ToString().Trim() + "')", String.Empty)
                       Case "BSN"
                           filterExpression = IIf(Not row.IsBSNnummerNull(), "(BSNnummer='" + row.BSNnummer.ToString().Trim() + "')", String.Empty)
                       Case "VIP"
                           filterExpression = IIf(Not row.IsVIPnummerNull(), "(VIPnummer='" + row.VIPnummer.ToString().Trim() + "')", String.Empty)
                   End Select
               End If
 
           End If
       End If
 
       If AppConfig.FilterPatienten And String.IsNullOrEmpty(filterExpression) Then
           Dim dtPatienten As DataView = (New RisicoTaxatieManager()).GetMedewerkerPatienten(MedewerkerId)
           dtPatienten.RowFilter = "Gekoppeld=1"
           Dim filterPatientId As String = String.Empty
           For Each PatientRow As DataRowView In dtPatienten
               filterPatientId += PatientRow("Id").ToString() + ","
           Next
 
           If Not String.IsNullOrEmpty(filterPatientId) Then
               filterExpression = String.Format("PatientId IN ({0})", filterPatientId.Remove(filterPatientId.Length - 1, 1))
           Else
               filterExpression = "PatientId IS NULL"
           End If
 
           RadGrid1.DataSource = dtTaxatie.Select(filterExpression)
       Else
           If String.IsNullOrEmpty(filterExpression) Then
               RadGrid1.DataSource = dtTaxatie.DefaultView
           Else
               RadGrid1.DataSource = dtTaxatie.Select(filterExpression)
           End If
       End If
 
       If Not String.IsNullOrEmpty(filterExpression) And Not row Is Nothing Then
           If Not String.IsNullOrEmpty(AppConfig.FilterColumn) Then
               Select Case AppConfig.FilterColumn
                   Case "MITS"
                       columnIdent = "Mits"
                   Case "BSN"
                       columnIdent = "BSN"
                   Case "VIP"
                       columnIdent = "VIP"
               End Select
           Else
               columnIdent = "Mits"
           End If
 
           Dim column As GridColumn = RadGrid1.MasterTableView.GetColumnSafe(columnIdent)
           If Not column Is Nothing Then
               column.CurrentFilterFunction = GridKnownFunction.EqualTo
               Select Case AppConfig.FilterColumn
                   Case "MITS"
                       column.CurrentFilterValue = row.Mitsnummer.ToString()
                   Case "BSN"
                       column.CurrentFilterValue = row.BSNnummer.ToString()
                   Case "VIP"
                       column.CurrentFilterValue = row.VIPnummer.ToString()
               End Select
           End If
       End If
   End Sub

Page (aspx)
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TaxatieOverzicht.aspx.vb"
    Inherits="EFPRisicoTaxatie.TaxatieOverzicht" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title>Overzicht taxaties</title>
    <meta http-equiv="x-ua-compatible" content="IE=8" />
    <link rel="stylesheet" href="Css/RisicoTaxatie.css" type="text/css" />
    <script language="javascript" type="text/javascript">
        // <!CDATA[
        function RowSelected(sender, args) {
            try {
                var oWnd = GetRadWindow();
                if (oWnd && (args.getDataKeyValue("ID") != '')) {
                    oWnd.close(args.getDataKeyValue("ID"))
                }
            } catch (err) { }
        }
        // ]]>
    </script>
</head>
<body style="background-color: #f0f0f0;">
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/js/RisicoTaxatie.js"></asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
    <div style="background-color: #f0f0f0; padding: 0px; margin: 0px;">
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
            AutoGenerateColumns="False" AllowSorting="True" GridLines="None" Style="z-index: 100;
            left: 0px; position: absolute; top: 0px;" PageSize="15" Width="850px" Height="454px"
            EnableLinqExpressions="False">
            <GroupingSettings CaseSensitive="false" />
            <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID">
                <Columns>
                    <telerik:GridBoundColumn DataField="Mitsnummer" HeaderText="Nummer" UniqueName="Mits"
                        AutoPostBackOnFilter="true" Visible="false">
                        <ItemStyle Width="75px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="BSNNummer" HeaderText="Nummer" UniqueName="BSN"
                        AutoPostBackOnFilter="true" Visible="false">
                        <ItemStyle Width="75px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="VIPNummer" HeaderText="Nummer" UniqueName="VIP"
                        AutoPostBackOnFilter="true" Visible="false">
                        <ItemStyle Width="75px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Referentie" HeaderText="Naam" UniqueName="Referentie"
                        AutoPostBackOnFilter="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="TaxatieIdent" HeaderText="Taxatie" UniqueName="Taxatie"
                        AutoPostBackOnFilter="true">
                        <ItemStyle Width="90px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Datum" HeaderText="Tax.datum" DataFormatString="{0:dd-MM-yyyy}"
                        AllowFiltering="False" UniqueName="TaxatieDatum">
                        <ItemStyle Width="85px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="TypeIdent" HeaderText="Type" AllowFiltering="True"
                        UniqueName="Type">
                        <ItemStyle Width="60px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Kader" AllowFiltering="False" UniqueName="Kader">
                        <ItemTemplate>
                            <asp:Label ID="lblKader" runat="server"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="120px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="situatie" AllowFiltering="False" UniqueName="Situatie">
                        <ItemTemplate>
                            <asp:Label ID="lblsituatie" runat="server"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="120px" />
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <PagerStyle Wrap="False" Mode="NumericPages" PagerTextFormat="{4} Pagina {0} van {1}, rij {2} tot {3} van {5}" />
            <ClientSettings EnablePostBackOnRowClick="False">
                <Selecting AllowRowSelect="True" />
                <ClientEvents OnRowDblClick="RowSelected" />
            </ClientSettings>
        </telerik:RadGrid>
    </div>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    </form>
</body>
</html>


 
Bill
Top achievements
Rank 1
 answered on 13 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?