Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
231 views
hi,

I have a GridButtonColumn type "ImageButton" where the ItemDataBound of the grid, I add an attribute "onclick" to him, in order to click it to open a modal window, only p /playback.
Well, the first by clicking the button, it works perfectly, the window opens correctly. Butwhen you close the window, and click the button again it will not fire the event "OnClick", so I think he loses the attribute adcionado earlier in the "ItemDataBound". Here is thecode used:
* Note: I tried to put the grid inside an UpdatePanel, but also without success. 

function Vizualizar_Baixa(indexRow) {
    alert("btn");
    var row = $find("<%=gridListagem.ClientID%>").get_masterTableView().get_dataItems()[indexRow];
    var id = row.getDataKeyValue("DFid_titulo_pagar");
    window.radopen("Vizualizar_Baixa.aspx?Pesquisar=" + id, "Vizualizar_Baixa");
}

<telerik:RadWindowManager id="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
    ReloadOnShow="true" runat="server" Skin="Outlook" EnableShadow="true" >
    <Windows>
        <telerik:RadWindow ID="Vizualizar_Baixa" runat="server" Behaviors="Pin,Close" Modal="true"
            Title="Consulta de Cadastros" Height="448px" Width="502px" />
    </Windows>
</telerik:RadWindowManager>
 
<telerik:RadGrid ID="gridListagem" runat="server" AllowPaging="True" PageSize="5"
    AutoGenerateColumns="False" CellSpacing="0" GridLines="None"
    AllowMultiRowSelection="True" Skin="Outlook"
    OnNeedDataSource="gridListagem_NeedDataSource"
    Width="950px">
    <ClientSettings EnableRowHoverStyle="true" >
        <Selecting AllowRowSelect="True" CellSelectionMode="None"/>
    </ClientSettings>
    <MasterTableView TableLayout="Auto" ClientDataKeyNames="DFid_titulo_pagar" >
        <CommandItemSettings ExportToPdfText="Export to PDF" />
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
            Visible="True">
            <HeaderStyle Width="20px" />
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
            Visible="True">
            <HeaderStyle Width="20px" />
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFid_titulo_pagar"
                FilterControlAltText="Filter DFid_titulo_pagar column"
                HeaderText="DFid_titulo_pagar" UniqueName="DFid_titulo_pagar"
                Display="False">
            </telerik:GridBoundColumn>
            <telerik:GridClientSelectColumn UniqueName="DFcheck">
                <ItemStyle Width="25px" />
            </telerik:GridClientSelectColumn>
            <telerik:GridButtonColumn UniqueName="btnGrid" HeaderText="Baixa"
               ButtonType="ImageButton" ImageUrl="~/Icones/Grid.gif"
               HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle Width="25px" HorizontalAlign="Center" />
            </telerik:GridButtonColumn>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFstatus"
                FilterControlAltText="Filter DFstatus column" HeaderText="Status"
                UniqueName="DFstatus" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn UniqueName="TempCol" HeaderText="Status">
                <ItemTemplate>
                    <asp:Image ID="imgColumn" ImageUrl="" runat="server" />
                </ItemTemplate>
                <ItemStyle Width="25px" />
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFnumero_titulo"
                FilterControlAltText="Filter DFnumero_titulo column" HeaderText="N° Título"
                UniqueName="DFnumero_titulo">
                <ItemStyle Width="80px" />
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn AllowFiltering="False" DataField="DFdata_emissao"
                FilterControlAltText="Filter DFdata_emissao column" HeaderText="Emissão"
                UniqueName="DFdata_emissao" DataFormatString="{0:dd/MM/yyyy}">
                <ItemStyle Width="50px" />
            </telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn AllowFiltering="False"
                DataField="DFdata_vencimento"
                FilterControlAltText="Filter DFdata_vencimento column" HeaderText="Vencimento"
                UniqueName="DFdata_vencimento" DataFormatString="{0:dd/MM/yyyy}">
                <ItemStyle Width="50px" />
            </telerik:GridDateTimeColumn>
            <telerik:GridNumericColumn AllowFiltering="False" AllowRounding="True"
                DataField="DFvalor" DecimalDigits="2"
                FilterControlAltText="Filter DFvalor column" HeaderText="Valor"
                UniqueName="DFvalor">
                <ItemStyle Width="100px" HorizontalAlign="Right" />
                <HeaderStyle HorizontalAlign="Right" />
            </telerik:GridNumericColumn>
            <telerik:GridNumericColumn AllowFiltering="False" AllowRounding="True"
                DataField="DFvalor_restante" DecimalDigits="2"
                FilterControlAltText="Filter DFvalor_restante column"
                HeaderText="Vlr. Restante" UniqueName="DFvalor_restante">
                <ItemStyle Width="100px" HorizontalAlign="Right" />
                <HeaderStyle HorizontalAlign="Right" />
            </telerik:GridNumericColumn>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFcod_fornecedor"
                FilterControlAltText="Filter DFcod_fornecedor column"
                HeaderText="DFcod_fornecedor" UniqueName="DFcod_fornecedor" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFfornecedor"
                FilterControlAltText="Filter DFfornecedor column" HeaderText="Fornecedor"
                UniqueName="DFfornecedor">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False"
                DataField="DFcod_tipo_documento"
                FilterControlAltText="Filter DFcod_tipo_documento column"
                HeaderText="DFcod_tipo_documento" UniqueName="DFcod_tipo_documento"
                Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFtipo_documento"
                FilterControlAltText="Filter DFtipo_documento column"
                HeaderText="DFtipo_documento" UniqueName="DFtipo_documento" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFcnpj_cpf"
                FilterControlAltText="Filter DFcnpj_cpf column" HeaderText="DFcnpj_cpf"
                UniqueName="DFcnpj_cpf" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False"
                DataField="DFid_plano_conta_fornecedor"
                FilterControlAltText="Filter DFid_plano_conta_fornecedor column"
                HeaderText="DFid_plano_conta_fornecedor"
                UniqueName="DFid_plano_conta_fornecedor" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False"
                DataField="DFcod_plano_conta_fornecedor"
                FilterControlAltText="Filter DFcod_plano_conta_fornecedor column"
                HeaderText="DFcod_plano_conta_fornecedor"
                UniqueName="DFcod_plano_conta_fornecedor" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False"
                DataField="DFplano_conta_fornecedor"
                FilterControlAltText="Filter DFplano_conta_fornecedor column"
                HeaderText="DFplano_conta_fornecedor" UniqueName="DFplano_conta_fornecedor"
                Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFcod_plano_conta"
                FilterControlAltText="Filter DFcod_plano_conta column"
                HeaderText="DFcod_plano_conta" UniqueName="DFcod_plano_conta" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFplano_conta"
                FilterControlAltText="Filter DFplano_conta column" HeaderText="DFplano_conta"
                UniqueName="DFplano_conta" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False"
                FilterControlAltText="Filter DFhistorico column" HeaderText="DFhistorico"
                UniqueName="DFhistorico" Visible="False" DataField="DFhistorico">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFcontato"
                FilterControlAltText="Filter DFcontato column" HeaderText="DFcontato"
                UniqueName="DFcontato" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="False" DataField="DFtelefone"
                FilterControlAltText="Filter DFtelefone column" HeaderText="DFtelefone"
                UniqueName="DFtelefone" Visible="False">
            </telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

Private Sub gridListagem_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles gridListagem.ItemCreated
    If TypeOf e.Item Is GridDataItem Then
        Dim dataItem As GridDataItem = DirectCast(e.Item, GridDataItem)
        Dim Button As System.Web.UI.WebControls.ImageButton = TryCast(dataItem("btnGrid").Controls(0), System.Web.UI.WebControls.ImageButton)
        Button.Attributes.Add("OnClick", "return Vizualizar_Baixa('" & dataItem.ItemIndex & "');")
        If dataItem("DFstatus").Text = "A" Then
            Dim imgColumn As Image = CType(dataItem("TempCol").FindControl("imgColumn"), Image)
            imgColumn.ImageUrl = "~/Icones/ok3_32_32.png"
        End If
    End If
End Sub

Leandro
Top achievements
Rank 1
 answered on 23 Mar 2012
1 answer
97 views
I have a RadComboBox which is populated from a WebService. The items returned from this service are checked to see if an item is a seperator, if so, the IsSeperator flag is set to true for that item. Things are fine till here.


I have Checkboxes = true and EnableCheckAllItems = true set on the RadComboBox. Problem is, if I select the "CheckAll" item, it selects even the seperator (I am hiding the checkbox for the seperator through JavaScript). This should not happen, since these are just seperators and not the items.


I am able to disable the checkboxes and its functionality for the seperators in javascript, but what I want is "All Items Selected" text to be shown and no seperators checked.


Is there a workaround for this problem ? Or, Am I missing something here ?

Thanks,
Anup
Kalina
Telerik team
 answered on 23 Mar 2012
1 answer
87 views
Hello,

I am having issues with the combo box similar to the thread below.  When the combobox is on the first page of the wizard, the combobox  works just fine.  When its not on the first page, its like the combobox is in a disabled state.  I cant even reference it through javascript.  Please note that is only causing me problems in SharePoint 2010.  In a regular web site project it works fine.  How can I fix this?

Thanks,

http://www.telerik.com/community/forums/aspnet/combobox/radcombobox-and-wizard.aspx


UPDATE: looks like this may be related too:

http://www.telerik.com/community/forums/aspnet-ajax/button/radbutton-in-wizard.aspx
Kalina
Telerik team
 answered on 23 Mar 2012
2 answers
178 views
Ok, the issue is like, I want to bind list view on client side. I have found solutions on forum and demos but i am getting error on set_dataSource(data); like set_dataSource is undefined, morover, i cannot also find <DataBinding> tag within client setting as it is shown in demos. I am using 2011.2.915.40 version of telerik.

Below is my aspx Code:

<telerik:RadListView ID="lstViewNotes" runat="server" OnItemCommand="lstViewNotes_ItemCommand">
<EmptyDataTemplate>
<table id="Table1" style="">
<tr>
<td>
<%=GetGlobalResourceObject("General","EmptyData") %>
</td>
</tr>
</table>
</EmptyDataTemplate>
<ItemTemplate>
                 <table>
<tr>
<td colspan="3">
<div style="width: 100%">
<asp:HiddenField ID="hfNoteId" runat="server" Value='<%#Eval("NotesId") %>' />
<asp:LinkButton ID="lblCreate" runat="server" Text='<%#Eval("UserName") %>' CssClass="label_n_t"
CommandName="Select" /><asp:LinkButton ID="NameLabel" runat="server" Text='<%# Eval("CreateDate") %>'
CssClass="label_n_t" CommandName="Select" /></div>
<div style="width: 100%">
<asp:LinkButton ID="lblNotesDesc" runat="server" Text='<%# Eval("MemoDesc") %>' CssClass="label_n_c"
CommandName="Select" /><br />
<br />
</div>
</td>
</tr>
                  </table>
</ItemTemplate>
</telerik:RadListView>


Below is my JS Code:    
var listView = $find('<%= lstMemo.ClientID%>');
listView.set_dataSource(result.lstMemo);
listView.dataBind();
Tsvetina
Telerik team
 answered on 23 Mar 2012
1 answer
50 views
Hi,
I have tried to paste "<A href="[=Link3]" target=_self>Read</A><BR>" to telerik editor in firexfox on Mac machine from notepad. When i paste this in telerik editor it converts it to "<A href="%5B=Link3%5D" target=_self>Read</A><BR>" . Please note the highlighted part of the text. Please help me on this.

Thanks,
Abhinandan Bansal
Rumen
Telerik team
 answered on 23 Mar 2012
5 answers
117 views
I have a minor but annoying display issue I don't know how to resolve.  Whenever I enable RadGrid scrolling (Scrolling-AllowScroll="true"), an unsightly hole opens up above the scroll bar on the right side of the grid (see attached).  I've tried various ways of filling this hole using css, but have found nothing that really works.

I know I can't be the only one who finds this a deficiency in an otherwise great product.

Does anyone have any ideas on how to resolve this issue?
Galin
Telerik team
 answered on 23 Mar 2012
4 answers
196 views
Hi,
Code Example:
<telerik:RadMenu ID="RadMenu1" runat="server">  
    <Items> 
        <telerik:RadMenuItem Text="RadMenuItem1">  
            <Items> 
                <telerik:RadMenuItem> 
                    <ItemTemplate> 
                        <telerik:RadComboBox ID="RadComboBox1" runat="server" Style="z-index: 8001;">  
                            <Items> 
                                <telerik:RadComboBoxItem Text="RadComboBoxItem1" /> 
                                <telerik:RadComboBoxItem Text="RadComboBoxItem2" /> 
                                <telerik:RadComboBoxItem Text="RadComboBoxItem3" /> 
                            </Items> 
                        </telerik:RadComboBox> 
                    </ItemTemplate> 
                </telerik:RadMenuItem> 
            </Items> 
        </telerik:RadMenuItem> 
    </Items> 
</telerik:RadMenu> 

The problem occurs when putting RadComboBox inside ItemTemplate of RadMenuItem.
 
When user activates the menu item and then activates the dropdown, the selection pane shows, as the user attempts to select from the list of the dropdown the menu retrieves leaving just the selection pane open.

The fix would be in my opinion to make sure menu dropdown does not retreat when mouse is still over any of the child elements.

Thanks,
Kris
Regeesh Joseph
Top achievements
Rank 1
 answered on 23 Mar 2012
1 answer
94 views
Hi,

    I have implemented the scroll into view specific timeslot to view the time slots pertaining to the current time as shown in the below KB link.
    
   http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-scroll-into-view-a-specific-time-slot-on-initial-page-load.aspx

 But if the scheduler has horizontal scroll then the row headers are getting hidden and to make them view we need to scroll to the right end.

    Please let me know how I can resolve this. I am using Telerik.Web.UI dll version 2010.2.713.35

Thanks
Lokesh 
Plamen
Telerik team
 answered on 23 Mar 2012
1 answer
180 views
Dear Sir,

http://demos.telerik.com/aspnet-ajax/scheduler/examples/customization/defaultcs.aspx 

I am referring above link.

I am trying to design advanced Appointment Form for creating new appointment and editing appointment.
But I am not getting from where appointment form is open modally. And where is this appointment form in sample code?

Can we open Appointment form on single click instead of double click?

Thanks
Rupesh
Ivana
Telerik team
 answered on 23 Mar 2012
3 answers
604 views
Hi,

I am having an issue that I hope you can help me out with.  Perhaps I am using item template and edit item template wrong.  I have a grid that contains an <itemtemplate> and an <edititemtemplate>.  I was under the assumption that when my grid loads up in view mode, it would display what's in the <itemtemplate>.  Then when I go to edit mode, it would display the items in <edititemtemplate>.  However I am seeing that it's using <itemtemplate> in both cases.  Is this how it's supposed to work?  My grid code is below:  (keep in mind some custom controls are in the grid and i can tell that it's using <itemtemplate> in view and edit mode because of the LabelText "item temp column".

<wasp:WLPGrid
    ID="GroupGrid"
    EditMode="InPlace"
    runat="server"
    GridLines="None"
    AutoGenerateColumns="False"
    Width="100%"
    AutoInsertOnAdd="false"
    AllowMultiRowEdit="true"
    skin=""
    >
 
    <ClientSettings>
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
 
    <MasterTableView CommandItemDisplay="Top" DataKeyNames="Key" Width="100%">
        <CommandItemTemplate></CommandItemTemplate>
        <Columns>
            <wasp:GridTemplateControl UniqueName="HeaderColumns">
                <ItemTemplate>
                    <table width="100%">
                      <tr>
                        <td colspan="2">
                            <wasp:CheckBoxControl ID="IsGroupSelected" LabelText="Selected" runat="server" ResourceName="IsGroupSelected" Value='<%# Bind("IsGroupSelected") %>' ReadOnly="true" />
                        </td>
                      </tr>
                      <tr>
                        <td>
                            <wasp:TextBoxControl ID="EnglishDesc" LabelText="item temp column" runat="server" ResourceName="EnglishDesc" Value='<%# Bind("EnglishDesc") %>' ReadOnly="true" />
                        </td>
                        <td>
                            <wasp:TextBoxControl ID="FrenchDesc" LabelText="French Desc:" runat="server" ResourceName="FrenchDesc" Value='<%# Bind("FrenchDesc") %>' ReadOnly="true" />
                        </td>
                      </tr>
                      <tr>
                        <td>
                            <wasp:ComboBoxControl ID="DatabaseSecurityRoleId" LabelText="Database Role" runat="server" Type="DatabaseSecurityRoleId" ondatabinding="PopulateCombo" ResourceName="DatabaseSecurityRoleId" Value='<%# Bind("DatabaseSecurityRoleId") %>' ReadOnly="true"></wasp:ComboBoxControl>
                        </td>
                        <td>
                            <wasp:ComboBoxControl ID="GuiSecurityRoleId" LabelText="GUI Role" runat="server" Type="GuiSecurityRoleId" ondatabinding="PopulateCombo" ResourceName="GuiSecurityRoleId" Value='<%# Bind("GuiSecurityRoleId") %>' ReadOnly="true"></wasp:ComboBoxControl>
                        </td>
                      </tr>
                    </table>
                    <hr />
                </ItemTemplate>
                <EditItemTemplate>
                    <table width="100%">
                      <tr>
                        <td>
                            <wasp:CheckBoxControl ID="IsGroupSelected" LabelText="Selected" runat="server" ResourceName="IsGroupSelected" Value='<%# Bind("IsGroupSelected") %>' ReadOnly="false" />
                        </td>
                      </tr>
                      <tr>
                        <td>
                            <wasp:TextBoxControl ID="EnglishDesc" LabelText="edit item column" runat="server" ResourceName="EnglishDesc" Value='<%# Bind("EnglishDesc") %>' ReadOnly="true" />
                        </td>
                        <td>
                            <wasp:TextBoxControl ID="FrenchDesc" LabelText="French Desc:" runat="server" ResourceName="FrenchDesc" Value='<%# Bind("FrenchDesc") %>' ReadOnly="true" />
                        </td>
                      </tr>
                      <tr>
                        <td>
                            <wasp:ComboBoxControl ID="DatabaseSecurityRoleId" LabelText="Database Role" runat="server" Type="DatabaseSecurityRoleId" ondatabinding="PopulateCombo" ResourceName="DatabaseSecurityRoleId" Value='<%# Bind("DatabaseSecurityRoleId") %>' ReadOnly="true"></wasp:ComboBoxControl>
                        </td>
                        <td>
                            <wasp:ComboBoxControl ID="GuiSecurityRoleId" LabelText="GUI Role" runat="server" Type="GuiSecurityRoleId" ondatabinding="PopulateCombo" ResourceName="GuiSecurityRoleId" Value='<%# Bind("GuiSecurityRoleId") %>' ReadOnly="true"></wasp:ComboBoxControl>
                        </td>
                      </tr>
                    </table>
                    <hr />
                </EditItemTemplate>
            </wasp:GridTemplateControl>
        </Columns>
    </MasterTableView>
Tsvetina
Telerik team
 answered on 23 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?