Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
104 views
How to use custom filter in RadGrid, not allowing the grid to make its internal filters after you tell him the DataSource for the data entered is already filtered.

Fernando.
Eyup
Telerik team
 answered on 30 Jul 2012
10 answers
193 views

Adding the ClientEvents OnCommand property to the RadGrid will cause load the grid on the page with some empty rows. When I remove  ClientEvents OnCommand property – all works fine.

I have:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="App_test_test" %>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

 

     <telerik:RadScriptManager ID="scriptManagerBase" runat="server" >

        <Scripts>

        </Scripts>

    </telerik:RadScriptManager>

    <div>

        <telerik:RadGrid ID="gvClaimHistory" runat="server" AutoGenerateColumns="False" GridLines="None" AllowSorting="true" PageSize="20">                   

                    <MasterTableView Width="100%">

                        <Columns>                          

                            <telerik:GridImageColumn DataImageUrlFields="StatusURL" DataImageUrlFormatString="{0}" HeaderText="Status" UniqueName="statusCol" AllowSorting="false" />

                        </Columns> 

                        <NoRecordsTemplate>

                            <div class="important center" style="margin: 5px;">There are no current to display.</div>

                        </NoRecordsTemplate>

                    </MasterTableView>

                    <ClientSettings>                        

 

                        <

 

 

ClientEvents OnCommand="gv_Command" />          


                    </ClientSettings>

                </telerik:RadGrid>

    </div>

    </form>

    <telerik:RadCodeBlock runat="server" ID="codeBlock1">

        <script type="text/javascript">

            function gv_Command(sender, args) {

                alert('test');

            }

        </script>

    </telerik:RadCodeBlock>

</body>

</html>

See attached files with and without ClientEvents OnCommand.

Without works properly, with should work in the same way. Any suggestions how to fix it?



Pavlina
Telerik team
 answered on 30 Jul 2012
6 answers
240 views
Hi -- Is there a way to change the icon for collapsible panel.  By default it shows a caret (^) in right hand corner.  We have users who don't find that intuitive.

Thank you.
Raka.
Raka
Top achievements
Rank 1
 answered on 30 Jul 2012
5 answers
182 views
There is my code :
<%@ Page Language="VB" AutoEventWireup="true" CodeBehind="RadSchedulerWebForm.aspx.vb" Inherits="digiCONTACTSWebApp.RadSchedulerWebForm" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <style>
     #scheduler-container {
        width: 700px;
        float: left;
    }
    #settings-container {
        float: right;
    }
    </style>
     
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
  
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Transparent">
    </telerik:RadSkinManager>
 
    <script type="text/javascript">
 
        var categoryNames = new Array();
       
        function ClientNodeChecked(sender, eventArgs) {
            SchedulerID = eventArgs.get_node().get_value();
            var scheduler = $find('<%=RadScheduler1.ClientID %>');
            scheduler.rebind();
             
        }
         
       /* function OnClientAppointmentsPopulating(sender, eventArgs) {
            eventArgs.get_schedulerInfo().SchedulerID = SchedulerID;
        }*/
 
        function OnClientAppointmentsPopulating(sender, eventArgs) {
            addSelectedCategoriesToArray(categoryNames);
            eventArgs.get_schedulerInfo().CategoryNames = categoryNames.toString();
            categoryNames = new Array(); //clear the array
        }
        function OnClientAppointmentDataBound(sender, eventArgs) {
            var app = eventArgs.get_appointment();
            //debugger;
            var backColor = app.get_attributes().getAttribute("AppointmentCssColor");
             
            if (backColor)
                app.set_cssClass(backColor);
 
          //  app.set_backColor("yellow");
       //     app.set_cssClass("rsCategoryYellow");
        }
 
 
        function addSelectedCategoriesToArray(categoryNamesArray) {
            var $ = $telerik.$;
            var categoryPanelBar = $find('<%=RadPanelBar1.ClientID %>');
            $(':checkbox:checked', categoryPanelBar.get_element()).each(function () {
                categoryNames.push($(this).attr('id'));
            });
        }
 
 
        function rebindScheduler() {
            var scheduler = $find('<%=RadScheduler1.ClientID %>');
            scheduler.rebind();
        }
 
 
    </script>
    <div id="settings-container">
        <telerik:RadPanelBar ID="RadPanelBar1" Runat="server">
        </telerik:RadPanelBar>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:vicidialConnectionString4 %>"
            ProviderName="<%$ ConnectionStrings:vicidialConnectionString4.ProviderName %>"
            SelectCommand="SELECT lead_id, status, `user`, source_id, list_id, phone_number, first_name, last_name, address1, city, postal_code, alt_phone, comments FROM vicidial_list">
        </asp:SqlDataSource>
     </div>
    <div id="scheduler-container">
    <telerik:RadScheduler ID="RadScheduler1" runat="server"
            OnClientAppointmentsPopulating="OnClientAppointmentsPopulating" SelectedView="WeekView"
        Width="1000px" Height="600px" Skin="Transparent" Culture="fr-FR"
            onclientappointmentdatabound="OnClientAppointmentDataBound"
            EnableCustomAttributeEditing="True" StartInsertingInAdvancedForm="True"
            SelectedDate="07/13/2012 08:54:36">
        <AdvancedForm EnableCustomAttributeEditing="True" Modal="True" />
        <Localization AdvancedCalendarCancel="Annuler" AdvancedDay="Jour"
            AdvancedMaskDay="Jour" HeaderDay="Jour" HeaderMonth="Mois"
            HeaderToday="Aujourd'hui" HeaderWeek="Semaine" />
        <WebServiceSettings Path="SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" />
      </telerik:RadScheduler>
     </div>
    </form>
    </body>
</html>
I want to know if it was possible to add a button in the editing of my appointment.
I save and cancel button and I would like to add a third button.
are what is possible? and if so how?
Thank you in advance.
Peter
Telerik team
 answered on 30 Jul 2012
6 answers
319 views
Hi, i want to show the contextmenu when i doubleclick on an Appointment, is it possible?
TT
Top achievements
Rank 1
 answered on 30 Jul 2012
2 answers
72 views
Team,

I am in evaluation phase to go or no go with Telerik controls. I need your help and quick response for below.

Currently we have an Windows Application and using many custom grids. Now we are doing Web version for the same and started evaluating the Telerik grid (ASP.NET AJAX) will fit to our web version or not but I was stuck with a scenario, 

Scenario as follows:
My DB result set comes with string hierarchy attached image (db_resultset.gif) and also attached (windows UI.gif) for the same which gives you better clarity.

Is telerik grid supports to accept string hierarchy to build the grid?  
If yes, Could please provide a sample for it and give some URL to refer.
If not,  By extending the telerik grid functionality can we achieve this? or do we need to change the data structure and which data structure telerik grid will support to build the hierarchy?

I am waiting for your reply.  Please help.

Thanks,
Anjan




















Andrey
Telerik team
 answered on 30 Jul 2012
1 answer
272 views
Hello,

I want to make a simple grid on my website, allowing the users to input some data in the grid, but I find the demos are a little bit complicate, is there some samples that can fulfill:

- Creating a grid of several columns with known headings (and its data format)
- No need to connect to the database   (No data binding, 0 rows when page load)
- Allow users to add/remove/edit rows
- Can get the input data for calculation when some button is clicked

I know it is a very simple problem, but I cannot find some demos without data binding.



------------------------------------------ Update ------------------------------------------

My current code:
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
    <telerik:RadGrid ID="RadGrid1" runat="server"
        AllowPaging="true" AllowSorting="true" OnDeleteCommand="RadGrid1_DeleteCommand"
        OnInsertCommand="RadGrid1_InsertCommand" AllowFilteringByColumn="false" OnUpdateCommand="RadGrid1_UpdateCommand"
        OnUnload="RadGrid1_Unload">
        <MasterTableView CommandItemDisplay="Top" AutoGenerateColumns="false" DataKeyNames="Field1"
            InsertItemPageIndexAction="ShowItemOnCurrentPage">
             
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                <telerik:GridButtonColumn ConfirmText="Delete this object?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="100px"
                    ConfirmDialogWidth="220px" />
                <telerik:GridBoundColumn DataField="Field1" HeaderText="Field One" UniqueName="Field1" DataType="System.String" />
                <telerik:GridBoundColumn DataField="Field2" HeaderText="Field Two" UniqueName="Field2" DataType="System.Double" />
                <telerik:GridBoundColumn DataField="Field3" HeaderText="Field Three" UniqueName="Field3" DataType="System.String" />
                <telerik:GridBoundColumn DataField="Field4" HeaderText="Field Four" UniqueName="Field4" DataType="System.DateTime" />
            </Columns>                   
        </MasterTableView>
    <ClientSettings>
        <DataBinding Location="WebService.asmx"
            SelectMethod="GetDataAndCount" />
    </ClientSettings>
    </telerik:RadGrid>
</telerik:RadAjaxPanel>


protected void Page_Load(object sender, EventArgs e)
{
     // ...
         
        if (!Page.IsPostBack)
        {
            RadGrid1.DataSource = new Object[0];
        }
}
 
    protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
    {
            // Something
    }
 
    protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
    {
            // Something
    }
 
    protected void RadGrid1_DeleteCommand(object sender, GridCommandEventArgs e)
    {
            // Something
    }
 
    protected void RadGrid1_Unload(object sender, EventArgs e)
    {
            // Something
    }

It can show a empty grid when page load, but when I press the "add new record" button, it do not go into the event.

Regards,
Kev
Daniel
Telerik team
 answered on 30 Jul 2012
4 answers
126 views
Is posibility printing treview with skin (commas) http://demos.telerik.com/aspnet-ajax/treeview/examples/accessibility/defaultcs.aspx ?
Print is always without commas.
DLL version 2011.3.1115.35
Plamen
Telerik team
 answered on 30 Jul 2012
1 answer
99 views
I'm using RadGrid, but I'm customizing all your controls (such as paging, sorting, filtering), to make your lower load on the database, paging and sorting are already working perfectly, and I am implementing the filter, the more I realize that for there is no filter that allows a property to tell the grid that it requires no filter because the filter has been done on the data source, in my case in the dao layer.
My filter layer Dao already working as it should have over the need for custom filters in order to command characters in the filter, for example: "!ca" would equal the filter RadGrid DoesNotContain doing custom filter "ca" . More as I do this type of filter in the filter Dao is perfectly done deal because this character, the more it seems to me the Grid does its internal filter DataSource again I sent you, so does a filter! "ca" where column in datasouce already filtered so as not to bring these characters, showing no line in my filter. There is need because the company's legacy system already use such commands in the filter.


I think my problem can be solved easily if there is a way to not allow the Grid to do your internal filter after I give you back the data is already filtered.


I look forward to an answer.


Thank you for your attention.


Fernando.
Maria Ilieva
Telerik team
 answered on 30 Jul 2012
3 answers
109 views
I've followed the KB article to create a stand alone image manager which allows my users to select an existing image, or upload a new one. Now I need to restrict the images being uploaded to a specific height and width. I've found a couple threads on how to accomplish that with an image manager inside a radEditor. But I can't seem to translate the steps to work for a stand alone Image manager. Any help would be greatly appreciated!
Rumen
Telerik team
 answered on 30 Jul 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?