Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
258 views
Hi, I want to call client side function than server side using OnClientClick Functionl on link button inside grid item template but it not work well so provide working examples.

client side function :

 function chkpermissionsEdit() {        
          var add =1;
          if (add == 0) { bootbox.alert("You have no permissions to Update Record"); return false; }
          else { return true; }
      }

  <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Action" HeaderText="Action" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <telerik:RadButton ButtonType="LinkButton" runat="server" ID="btnEdit" 
                                                                                ToolTip="EditRecord"  Text="Edit" CommandName="EditButton" 
                                                                                CommandArgument='<%# Eval("LandlordId") %>' onClientClicked="return chkpermissionsEdit();"   />
                                                                         
                                                                        </ItemTemplate>
                                                                        <HeaderStyle HorizontalAlign="Left" />
                                                                        <ItemStyle HorizontalAlign="Left" />
                                                                    </telerik:GridTemplateColumn>
Princy
Top achievements
Rank 2
 answered on 12 Feb 2014
3 answers
57 views
Hello! I am facing a problem that when I click on the Grid Item to edit, after the post back the page shifts to the top and does not focus on the row which I have clicked for the editing. Please give me the solution and thanx in advance. 
Princy
Top achievements
Rank 2
 answered on 12 Feb 2014
3 answers
59 views
Exception was thrown at line 626, column 23 in http://aspnet-scripts.telerikstatic.com/ajaxz/2013.3.1324/ComboBox/RadComboBoxScripts.js0x800a138f - JavaScript runtime error: Unable to get property 'createRange' of undefined or null reference
Peter Filipov
Telerik team
 answered on 11 Feb 2014
3 answers
121 views
Are there any ready-made examples of how I could bind RadAutoComplete to a SharePoint list via web services? 
Keith
Top achievements
Rank 1
 answered on 11 Feb 2014
2 answers
123 views
Hi All. How Can i get Tile Badge Value using javascript.???
Amigo
Top achievements
Rank 1
 answered on 11 Feb 2014
5 answers
476 views
i Have a radgrid (rad1)  inside a FormTemplate of another RadGrid (rad2).

If i update a row in (rad1) while (rad2) is in editmode, the (rad1) UpdateCommand get only empty values. ,


how i can do it????

UPDATE: i found that this happen because NeedDataSource of (rad1) is beign called before UpdateCommand,
this doesnt happens if the radgrid is not inside of another RadGrid.


<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AutoGenerateColumns="False" 
        Skin="WebBlue" OnInsertCommand="RadGrid1_InsertCommand" OnItemDataBound="RadGrid1_ItemDataBound">  
        <MasterTableView CommandItemDisplay="Top" EditMode="PopUp" CommandItemSettings-AddNewRecordText="Agregar Estándar" 
            CommandItemSettings-RefreshText="">  
            <RowIndicatorColumn>  
                <HeaderStyle Width="20px"></HeaderStyle>  
            </RowIndicatorColumn>  
            <ExpandCollapseColumn>  
                <HeaderStyle Width="20px"></HeaderStyle>  
            </ExpandCollapseColumn>  
            <Columns>  
                <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Display="false" />  
                <telerik:GridBoundColumn DataField="Ciudad" UniqueName="Ciudad" HeaderText="Ciudad" />  
                <telerik:GridBoundColumn DataField="Aeropuerto" UniqueName="Aeropuerto" HeaderText="Aeropuerto" />  
                <telerik:GridBoundColumn DataField="Proceso" UniqueName="Proceso" HeaderText="Proceso" />  
            </Columns>  
            <EditFormSettings EditFormType="Template" PopUpSettings-Modal="true" PopUpSettings-Width="500px" 
                CaptionFormatString="Insertar nueva propiedad">  
                <FormTemplate>  
                    <center>  
                        <table style="text-align: left">  
                            <tr>  
                                <td>  
                                    <br />  
                                </td>  
                            </tr>  
                            <tr>  
                                <td>  
                                    <asp:Literal ID="Literal4" runat="server" Text="Aerolinea" />  
                                </td>  
                                <td>  
                                    <telerik:RadComboBox ID="RadComboBoxAeronave" runat="server" DataTextField="Aeronave" 
                                        DataValueField="ID" Skin="WebBlue" DataSourceID="ObjectDataSourceAeronave" OnClientSelectedIndexChanged="LoadValores" />  
                                </td>  
                            </tr>  
                            <tr>  
                                <td>  
                                    <asp:Literal ID="Literal3" runat="server" Text="Modelo Avión" />  
                                </td>  
                                <td>  
                                    <telerik:RadComboBox ID="RadComboBoxTipoAvion" runat="server" Skin="WebBlue" DataTextField="DE_NAVE" 
                                        DataValueField="ID_NAVE" OnItemsRequested="RadComboBoxTipoAvion_ItemsRequested" 
                                        OnClientItemsRequested="ItemsLoaded" EmptyMessage="Seleccione Aerolinea..." />  
                                </td>  
                            </tr>  
                            <tr>  
                                <td>  
                                    <asp:Literal ID="Literal2" runat="server" Text="Aeropuerto" />  
                                </td>  
                                <td>  
                                    <telerik:RadComboBox ID="RadComboBoxAeropuerto" runat="server" DataTextField="Aeropuerto" 
                                        DataValueField="ID" Skin="WebBlue" DataSourceID="ObjectDataSourceAeropuerto" />  
                                </td>  
                            </tr>  
                            <tr>  
                                <td>  
                                    <asp:Literal ID="Literal1" runat="server" Text="Proceso" />  
                                </td>  
                                <td>  
                                    <telerik:RadComboBox ID="RadComboBoxProcesos" runat="server" DataSourceID="EntityDataSourceProcesos" 
                                        DataTextField="DE_PROC" DataValueField="ID_PROC" Skin="WebBlue" />  
                                </td>  
                            </tr>  
                            <tr>  
                                <td>  
                                    &nbsp;  
                                </td>  
                                <td>  
                                    <asp:CheckBox Text="Activo" ID="CheckBox1" runat="server" Checked="true" />  
                                </td>  
                            </tr>  
                            <tr>  
                                <td>  
                                    <br />  
                                </td>  
                            </tr>  
                            <tr>  
                                <td colspan="2">  
                                    <telerik:RadGrid ID="RadGridStandards" AutoGenerateColumns="false" Skin="WebBlue" 
                                        OnNeedDataSource="RadGridStandards_NeedDataSource" GridLines="None" runat="server" 
                                        AllowMultiRowSelection="True" AllowMultiRowEdit="True"   
                                        OnUpdateCommand="RadGridStandards_UpdateCommand" OnItemDataBound="RadGridStandards_ItemDataBound" 
                                        AllowAutomaticUpdates="false">  
                                        <MasterTableView CommandItemDisplay="Top" AutoGenerateColumns="false" EditFormSettings-EditFormType="AutoGenerated" 
                                            EditMode="InPlace" DataKeyNames="ID">  
                                            <CommandItemTemplate>  
                                                <div style="padding: 5px 5px;">  
                                                    <asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# RadGridStandards.EditIndexes.Count == 0 %>'>Editar</asp:LinkButton>&nbsp;&nbsp;  
                                                    <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# RadGridStandards.EditIndexes.Count > 0 %>'>Actualizar</asp:LinkButton>&nbsp;&nbsp;  
                                                    <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# RadGridStandards.EditIndexes.Count > 0 || RadGridStandards.MasterTableView.IsItemInserted %>'>Cancelar</asp:LinkButton>  
                                                </div>  
                                            </CommandItemTemplate>  
                                            <Columns>  
                                                <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Display="false" ReadOnly="true" />  
                                                <telerik:GridBoundColumn DataField="TipoActividad" UniqueName="TipoActividad" HeaderText="Tipo" 
                                                    ReadOnly="true" />  
                                                <telerik:GridBoundColumn DataField="Actividad" UniqueName="Actividad" HeaderText="Actividad" 
                                                    ReadOnly="true" />  
                                                <telerik:GridTemplateColumn UniqueName="Drop" HeaderText="Base" DataField="Drop">  
                                                    <ItemTemplate>  
                                                        <asp:Literal ID="Literal1" runat="server" Text='<%#Eval("Drop") %>' />  
                                                    </ItemTemplate>  
                                                    <EditItemTemplate>  
                                                        <telerik:RadComboBox ID="RadComboBox1" runat="server" Skin="WebBlue" DataSourceID="EntityDataSourceProcesosActividad" 
                                                            DataValueField="ID_ACTI" DataTextField="DE_ACTI" Width="50px" SelectedValue='<%#Bind("Drop") %>' />  
                                                    </EditItemTemplate>  
                                                </telerik:GridTemplateColumn>  
                                                <telerik:GridTemplateColumn UniqueName="Numeric" HeaderText="Tiempos" DataField="Numeric">  
                                                    <ItemTemplate>  
                                                        <asp:Literal ID="Literal2" runat="server" Text='<%#Eval("Numeric") %>' />  
                                                    </ItemTemplate>  
                                                    <EditItemTemplate>  
                                                        <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" Skin="WebBlue" 
                                                            Type="Number" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" 
                                                            NumberFormat-DecimalDigits="0" IncrementSettings-InterceptMouseWheel="true" Width="50px" 
                                                            DbValue='<%# Bind("Numeric") %>' />  
                                                    </EditItemTemplate>  
                                                </telerik:GridTemplateColumn>  
                                                <telerik:GridTemplateColumn UniqueName="Check" HeaderText="Activo" DataField="Check">  
                                                    <ItemTemplate>  
                                                        <asp:Literal ID="Literal3" runat="server" Text='<%#Eval("Check") %>' />  
                                                    </ItemTemplate>  
                                                    <EditItemTemplate>  
                                                        <asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("Check") %>' />  
                                                    </EditItemTemplate>  
                                                </telerik:GridTemplateColumn>  
                                            </Columns>  
                                        </MasterTableView>  
                                        <ClientSettings>  
                                            <Selecting AllowRowSelect="True" EnableDragToSelectRows="True" />  
                                        </ClientSettings>  
                                    </telerik:RadGrid>  
                                </td>  
                            </tr>  
                            <tr>  
                                <td>  
                                    <br />  
                                </td>  
                            </tr>  
                            <tr>  
                                <td colspan="2" align="right">  
                                    <asp:LinkButton ID="LinkButton1" runat="server" Text="Aceptar" CommandName="PerformInsert" /><asp:Literal  
                                        ID="LiteralSpace" runat="server" Text="  " /><asp:LinkButton ID="LinkButton2" runat="server" 
                                            Text="Cancelar" CommandName="Cancel" CausesValidation="False" />  
                                </td>  
                            </tr>  
                            <tr>  
                                <td>  
                                    <br />  
                                </td>  
                            </tr>  
                        </table>  
                    </center>  
                </FormTemplate>  
                <PopUpSettings Modal="True"></PopUpSettings>  
            </EditFormSettings>  
        </MasterTableView>  
    </telerik:RadGrid> 
Pavlina
Telerik team
 answered on 11 Feb 2014
3 answers
115 views
Hello Team,

I have used telerik rad editor in my application.

In my application there are image library, audio library, video library.

I have bound this library with rad editor image manager, video manager, media manager.
(for e.g: used code for bind my library
 rtfEditor.ImageManager.ContentProviderTypeName = typeof(Telerik.ContentProvider.TelerikDBContentOfPhotoManager).AssemblyQualifiedName;
 rtfEditor.MediaManager.ContentProviderTypeName = typeof(Telerik.ContentProvider.TelerikDBContentOfMediaManager).AssemblyQualifiedName;
rtfEditor.FlashManager.ContentProviderTypeName = typeof(Telerik.ContentProvider.TelerikDBContentOfFlashManager).AssemblyQualifiedName;
)

Above all functionality working fine.

Now Problem is that in my database there are folder name or image gallery name or video gallery name is saved but when these folders is bind inside image manager / video manager / medai manager. it is not html decode to display folder or gallery name.

For Example my folder name is <April's obra> inside database I have saved with HTML Encode and its "&lt;April&#39;s Obra&gt;"
but I need to display "April's obra" in folder name.

for other controls like rad grid its automatically HTML decoded.

I have attached here screen shot for it.







Vessy
Telerik team
 answered on 11 Feb 2014
1 answer
92 views
Hi Telerik

I am using a couple lines of css to get the vertical scroll on the left side instead of the right. Putting the css in works as expected but the horizontal scroll now positioned on the right instead of the left most position.


    <style type="text/css">
        .MyRadGrid {
            direction: rtl;           
        }
 
            .MyRadGrid table {
                direction: ltr;
            }          
         
    </style>
 
 
 
<telerik:RadGrid runat="server" ID="RadGridMembers" CssClass="MyRadGrid" AutoGenerateColumns="false" Width="970px" Height="560px" AllowSorting="true" >
                <ClientSettings Scrolling-UseStaticHeaders="true" Scrolling-AllowScroll="true"  />
                <MasterTableView runat="server" AllowFilteringByColumn="true" EditMode="EditForms" DataKeyNames="FamilyId, MemberId" TableLayout="Fixed" Width="100%">
 
...
...
 
                </MasterTableView>
            </telerik:RadGrid>

The bold css for the rtl moved the vertical scroll but also adjust the hor scroll to the right. Is there a way i can move that hor scroll back to the left? Any css needed?

Thanks!


Maria Ilieva
Telerik team
 answered on 11 Feb 2014
10 answers
538 views
hi my dear friends:

How Can I Show Just Date In A BoundColumn (Date Format In SQL Server 2008 Not DateTime) In Rad ComboBox?

we do not have any DataFormatString For A Bound Column here Like In RadGrid....
Ken
Top achievements
Rank 1
 answered on 11 Feb 2014
4 answers
155 views
Hi,

I'm simply looking to return the text from a listview where I have an id for the key field and a name field which is what is displayed.  I thought this would be relatively simple but keep failing. 

Also I can't seem to find a way to get the first item selected by default when the page loads.

I thought for sue I could find something like this in the forums but came up empty.

Thanks
Eyup
Telerik team
 answered on 11 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?