Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
148 views
I'm using Edit Form to insert/edit items. The problem I'm running into is when I try to edit a row, it's using the same form and some of the controls are not set to what data item for that grid item actually has. When in the life cycle can I set selected values for my RadComboBoxes and RadNumericTextBoxes, any code examples?
Antonio Stoilkov
Telerik team
 answered on 16 Mar 2012
1 answer
142 views
Hi

I have a Page A where on button click, I display another page B using radwindow dialog. When button save is clicked on page B, some data is  processing, Page B is closed and then page is redirected to Page A.
In this scenario, i refresh page A with radajaxmanager sometimes it takes considerable amount of time and user may not know if the processing is going on.

I wan to display a loading panel on Page A once the Dialog of page B is closed, I am using DefaultLoadingPanelID in my radajaxmanager but the loading panel is not displaying. I dont know why :(

Maria Ilieva
Telerik team
 answered on 16 Mar 2012
1 answer
77 views
Hi,

I have a treelist control loaded dynamically inside RadDock. When the dock is expanded the controls are loaded but the styles are not rendered. I also checked the site and found the EnableAjaxSkinRendering property of RadDock and set tat to true.
Even tat didn't work. This problem exists only in Internet Explorer. Please refer the image attached below.

Thanks,
Karthik
Tsvetina
Telerik team
 answered on 16 Mar 2012
1 answer
3.0K+ views

Hello,

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx
with reference with above link...
i need to use grid with inline edit mode.
My column will be date,report type , description.

After clicking on edit it will convert as dattimepicker, dropdownlist, textbox.

my dropdown will be bind with datatable.

After clik of edit button it will covert in to update and cancel button. i dnt want that. after cllick of edit image it wiill alow data to be edit. and save changes button will be @ botton..

Can you please give me code for above...

Thanks,
Mugdha

 

Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Mar 2012
3 answers
482 views
I wanna add a new record, and edit the records on grid, with button outside the grid. How could i do that?
Thats my asp code
<telerik:RadGrid ID="RadGrid2" runat="server" AllowMultiRowSelection="true" Width="300px"OnNeedDataSource="RadGrid2_NeedDataSource">
                <MasterTableView AutoGenerateColumns="False" DataKeyNames="codigo" EditMode="InPlace">
                    <Columns>
                        <telerik:GridTemplateColumn>
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="CheckBox1" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="Código" DataField="codigo" UniqueName="codigo"
                            ReadOnly="True" Display="true" ColumnEditorID="GridTextBoxColumnEditor1" />
                        <telerik:GridBoundColumn HeaderText="Descrição" DataField="descricao" UniqueName="descricao"
                            ColumnEditorID="GridTextBoxColumnEditor1" />
                        <telerik:GridEditCommandColumn ButtonType="ImageButton">
                        </telerik:GridEditCommandColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    <ClientEvents OnRowDblClick="RowDblClick" />
                </ClientSettings>
            </telerik:RadGrid>
            <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="180px" />
        <asp:Button ID="btnDeletar" runat="server" Text="Deletar Items" OnClick="btnDeletar_Click" />
        <asp:Button ID="btnInserir" runat="server" Text="Inserir Items" OnClick="btnInserir_Click" />
        <asp:Button ID="btnEditar" runat="server" Text="Editar Items" OnClick="btnEditar_Click" />
        <telerik:RadWindowManager ID="Window" runat="server" EnableShadow="true" />
and thats my c# code
protected void RadGrid2_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    // Atribui dados a grid.
    RadGrid2.DataSource = this.GridSource;
    this.GridSource.PrimaryKey = new DataColumn[] { this.GridSource.Columns["codigo"] };
}
/// <summary>
/// Obtem a source do grid.
/// </summary>
private DataTable GridSource
{
    get
    {
        object obj = ViewState["GRID"];
        if ((!(obj == null)))
        {
            return ((DataTable)(obj));
        }
        DataTable myDataTable = new DataTable();
 
        myDataTable = Preenche();
        ViewState["GRID"] = myDataTable;
 
        return myDataTable;
    }
}
/// <summary>
/// Obtem data table com dados para grid.
/// </summary>
/// <returns>Retorna datatable</returns>
public DataTable Preenche()
{
    C001 c001 = new C001();
    DataTable dt = new DataTable();
 
    dt = c001.ObterDados();
    return dt;
}
Shinu
Top achievements
Rank 2
 answered on 16 Mar 2012
0 answers
106 views
Hi
I have a modal popup on .ascx control & I wish to place radtreeview control on this modal popup.I have done all the coding & datasource property of radtreeview gets populated correctly but When I call DATABIND() method of this control I am not able to see the radtreeview control on modal popup.
Please suggest.
kdyeqb
Top achievements
Rank 1
 asked on 16 Mar 2012
3 answers
2.6K+ views

Hi,

I have a RadGrid that contains two GridButtonColumns of HeaderButtonType LinkButton.  I would like to control the behavior to dynamically hide one column and show the other and vice versa.

In addition, in one of the circumstances there is an additional GridBoundColumn that I would like to hide.

How do I do this?  Also, can I do it in the ItemDataBound method or does it need to be done in a PreRender method?

In the Grid below, I want to show the RequestorName and RequestorPd columns and hide the InstitutionName column in one case and in the other I want to show the InstitutionName column and hide the RequestorName and RequestorPd columns.

<telerik:RadGrid ID="RadGridPrescriber" runat="server" 
    AutoGenerateColumns="false" AllowSorting="True" AllowPaging="false" Skin="Simple" ClientSettings-Resizing-AllowColumnResize="true"
    ItemStyle-Wrap="false" Width="95%" HeaderStyle-Wrap="false" PageSize="25"
    OnNeedDataSource="RadGridPrescriber_NeedDataSource" OnItemDataBound="RadGridPrescriber_ItemDataBound" OnItemCommand="RadGridPrescriber_ItemCommand">
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true"  />
    </ClientSettings>
    <ExportSettings ExportOnlyData="false" IgnorePaging="true" OpenInNewWindow="true" />
    <MasterTableView TableLayout="Fixed" AllowMultiColumnSorting="true" DataKeyNames="RequestorSln" ShowFooter="false" PagerStyle-AlwaysVisible="false" CommandItemDisplay="Top" >
        <NoRecordsTemplate>
            <asp:Label ID="lblMsg" runat="server" Text="No Records found"></asp:Label>
        </NoRecordsTemplate>
        <CommandItemSettings ShowExportToPdfButton="true" ShowExportToCsvButton="true" ShowExportToExcelButton="true" ShowRefreshButton="false" ShowAddNewRecordButton="false" />
        <Columns>
            <telerik:GridButtonColumn HeaderText="Name" HeaderButtonType="LinkButton" UniqueName="RequestorName" CommandName="GetByRequestorSLN" DataTextField="RequestorName" ItemStyle-HorizontalAlign="Left" />
            <telerik:GridButtonColumn HeaderText="Name" HeaderButtonType="LinkButton" UniqueName="InstitutionName" CommandName="GetByRequestorSLN" DataTextField="InstitutionName" ItemStyle-HorizontalAlign="Left" />
            <telerik:GridBoundColumn HeaderText="PD" HeaderButtonType="TextButton" DataField="RequestorPd" ItemStyle-HorizontalAlign="Left" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>




Thanks,

Shinu
Top achievements
Rank 2
 answered on 16 Mar 2012
0 answers
60 views
To every poor soul trying to make Ajaxify Timer sample from page http://demos.telerik.com/aspnet-ajax/ajax/examples/common/ajaxifytimer/defaultcs.aspx to work in Master page scenario:

You have to set
ClientIDMode="AutoID"

(as described in similar this and more specific this thread).

Cheers,
Jacek
Jacek
Top achievements
Rank 1
 asked on 16 Mar 2012
5 answers
414 views
I have been looking at the Drag-and-drop feature in List View specifically the example shown on http://demos.telerik.com/aspnet-ajax/listview/examples/itemdragdrop/defaultcs.aspx. I want to know if it is possible to drag and drop items inside the listview. 

kind of like http://www.webreference.com/programming/javascript/mk/column2/
I am using .net 3.5. ASP.NET Help!
Alex
Top achievements
Rank 2
 answered on 15 Mar 2012
2 answers
85 views
Hi all,

I'm facing the problem while using the RadComboBox. I've used the example from Telerik Demo to populate RadComboBox with data on demant in a new empty project. And when the control calls for the WCF service for data the RadComboBoxContext parameter is empty.
Can you please advice me what I'm doing wrong?

ASPX code:
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>   
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
      <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
 
        <telerik:RadComboBox runat="server" ID="RadComboBox1" Height="100px"
            EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
            EmptyMessage="Type here ...">
            <WebServiceSettings Path="~/ComboBoxWcfService.svc" Method="LoadData" />
        </telerik:RadComboBox>
    </div>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server">
</asp:LinqDataSource>
</asp:Content>


WCF code:
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class ComboBoxWcfService {
    public void DoWork()
    {
    }
    [OperationContract]
    public RadComboBoxData LoadData(RadComboBoxContext context)
    {
        //The RadComboBoxData object contains all required information for load on demand:
        // - the items
        // - are there more items in case of paging
        // - status message to be displayed (which is optional)
 
        AdventureWorksDataContext northwind = new AdventureWorksDataContext();
 
 
         
        RadComboBoxData result = new RadComboBoxData();
 
        //Get all items from the Customers table. This query will not be executed untill the ToArray method is called.
        var allCustomers = from customer in northwind.Customers
                           orderby customer.ContactName
                           select new RadComboBoxItemData
                           {
                               Text = customer.ContactName
                           };
 
 
        //In case the user typed something - filter the result set
        string text = context.Text;
        if (!String.IsNullOrEmpty(text))
        {
            allCustomers = allCustomers.Where(item => item.Text.StartsWith(text));
        }
        //Perform the paging
        // - first skip the amount of items already populated
        // - take the next 10 items
        int numberOfItems = context.NumberOfItems;
        var customers = allCustomers.Skip(numberOfItems).Take(10);
 
        //This will execute the database query and return the data as an array of RadComboBoxItemData objects
        result.Items = customers.ToArray();
 
 
        int endOffset = numberOfItems + customers.Count();
        int totalCount = allCustomers.Count();
 
        //Check if all items are populated (this is the last page)
        if (endOffset == totalCount)
            result.EndOfItems = true;
 
        //Initialize the status message
        result.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>",
                                       endOffset, totalCount);
 
        return result;
    }
}

WebConfig:
<service behaviorConfiguration="metadataAndDebug" name="WebApplication1.ComboBoxWcfService">
  <endpoint address="" behaviorConfiguration="WebBehavior" binding="webHttpBinding"
    contract="WebApplication1.ComboBoxWcfService" />
  <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>



Jevgenij
Top achievements
Rank 1
 answered on 15 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?