Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
168 views
I have made my own rightclick menu for selecting which headers has to be shown and which doesn't. I have done this by code above:

<telerik:RadContextMenu ID="RadGrid1ContextMenu" runat="server" 
    OnClientItemClicked="RadGrid1ContextMenu_ClientItemClicked"> 
    <Targets> 
        <telerik:ContextMenuControlTarget ControlID="RadGrid1" /> 
    </Targets> 
    <Items> 
        <telerik:RadMenuItem Text="Status" Value="Status" 
            ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" 
            SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" Selected="true" /> 
        <telerik:RadMenuItem Text="Username" Value="UserName" 
            ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" 
            SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" Selected="true" /> 
        <telerik:RadMenuItem Text="Firstname" Value="FirstName"
            ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" 
            SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" /> 
        <telerik:RadMenuItem Text="Lastname" Value="LastName" 
            ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" 
            SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" /> 
    </Items> 
</telerik:RadContextMenu> 

I get my menu as expected but my problem is then that it not is possible to select more than one item. When I select an item, all other items are getting deselected.

I'm aware that the exist an EnableHeaderContextMenu for the grid, but I'm not interested in the sorting and grouping functionality in this menu (sorting should only be done by click at the header), and I want to execute some serverside code, when select and deselecting columns - and not letting the grid do the column-hiding.

Best regards,
Kenneth


Ahrensberg
Top achievements
Rank 1
 answered on 24 Nov 2009
1 answer
104 views
I am trying to install the Q3 2009 package for ASP AJAX Controls and everything seems to install fine.  I can even view the 'welcome page' at http://localhost:3445/radcontrols_aspnetajax/Controls/Examples/Default/Default.CS.aspx (which I think can be found at: c:\Program Files\Telerik\RadControls for ASPNET AJAX Q1 2009\Live Demos) but get an error when clicking on about half of the example demos:

Here are the demos that break:
Ajax - first look
ComboBox - first look
RadGrid - SuperbPerformance, Hierarchy with Templates, Client-side Data Binding (works but with no data)

The error that I do get is this:
A network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or was not accessible.

On thing to note is that I am inside a virtual that does not have a connection to the internet.  I do have SQL Server 2005 installed but after checking the web.config found in the Live Demos directory, I cant seem to locate a database of Telerik.mdf or event Northwind.mdf.  Also, I dont have a server called SQLEXPRESS but I do have localhost.  I changed the web.config from .\SQLEXPRESS to .\localhost, but same error.

J
J
Top achievements
Rank 1
 answered on 24 Nov 2009
0 answers
129 views

Hi,

I am Using RADScheduler, I would like tocustomize the in-line edit and create window. How to close the Edit or Create window in server side event (RadScheduler1_AppointmentCommand)

Thanks

Sabarish

sabarishbabu
Top achievements
Rank 1
 asked on 24 Nov 2009
2 answers
196 views
Dear Experts,

I have a issue with performing custom filtering using RadDatePicker on RadGrid.

I have a datetime column on the grid and I am using template column to assign the values on the grid.

The RadDatePicker control works perfect on one date column which contains DateTimeValues values on all the rows.

But it is not working on a column where there are very few values and also contains DBNULL values. Thanks in advance.

Here is the code
-------------------------------------

<FilterTemplate>
                                            <telerik:RadDatePicker ID="PickupDatePicker" runat="server" Width="90px" ClientEvents-OnDateSelected="PickupDateSelected"
                                                DbSelectedDate='<%# SetPickupDate(Container) %>' />
                                            <telerik:RadScriptBlock ID="RadScriptPickupDate" runat="server">

                                                <script type="text/javascript">
                                                    function PickupDateSelected(sender, args) {
                                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                        var date = FormatPickupSelectedDate(sender);                                                       
                                                        tableView.filter("Pickup_Dt", date, "EqualTo");
                                                    }
                                                    function FormatPickupSelectedDate(picker) {
                                                        var date = picker.get_selectedDate();
                                                        var dateInput = picker.get_dateInput();
                                                        var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
                                                        return formattedDate;
                                                    }
                                                </script>

                                            </telerik:RadScriptBlock>
                                        </FilterTemplate>
-------------------------------------
protected DateTime? SetPickupDate(Telerik.Web.UI.GridItem item)
    {
        if (item.OwnerTableView.GetColumn("Pickup_Dt").CurrentFilterValue == string.Empty)
        {
            return new DateTime?();
        }
        else
        {
            return DateTime.Parse(item.OwnerTableView.GetColumn("Pickup_Dt").CurrentFilterValue);
        }
    }   

 protected void uxRGrid_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridFilteringItem)
            {
             Telerik.Web.UI.RadDatePicker dtpickerPickupDate = (Telerik.Web.UI.RadDatePicker)(e.Item as Telerik.Web.UI.GridFilteringItem)["Pickup_Dt"].Controls[1];
                dtpickerPickupDate.Culture = Thread.CurrentThread.CurrentUICulture; 
            }
}
-------------------------------------

Deva Kumar
Top achievements
Rank 1
 answered on 24 Nov 2009
3 answers
311 views
Hi,
I'm getting "Specified cast is not valid" when clicking "Add new".
When clicking on "Edit" on an existing row works fine.

<telerik:GridTemplateColumn UniqueName="CheckListChecked" HeaderText="<%$ Resources:resources,Label_Finished %>"> 
<ItemTemplate> 
      <asp:CheckBox ID="checkBoxCheckListChecked" Enabled="false" runat="server" Checked='<%# (Container is GridEditFormInsertItem) ? false : Eval("IsChecked") %>' /> 
</ItemTemplate> 
<EditItemTemplate> 
      <asp:CheckBox ID="checkBoxCheckListChecked" runat="server" Checked='<%# (Container is GridEditFormInsertItem) ? false : Eval("IsChecked") %>' /> 
</EditItemTemplate> 
</telerik:GridTemplateColumn> 

The checkbox in itemtemplate works but not the one in edititemtemplate when creating a new row. Why?

/Mattias
Nikolay Rusev
Telerik team
 answered on 24 Nov 2009
13 answers
831 views

Hi dear telerikers!

I was just playing around with the new Prometheus Controls and would really like to inherit from RadGrid to extend it a little (for example i would rather open up the Editform as a RadWindow instead of using the built in custom editform)

I built a Server Control Library, added a reference to Telerik.Web.UI and also to System.Web.Extensions.

The custom control is defined as follows:

using

System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Softwaretailor.Web.UI.WebControls
{
   public class CustomGrid : Telerik.Web.UI.RadGrid
   {
   }
}

Afterwards I added a Web Application and referenced the Server Control Project.

I modified the web.config file:

<

pages>
 
<controls>
    <
add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <
add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <
add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
    <
add tagPrefix="swt" namespace="Softwaretailor.Web.UI.WebControls" assembly="Softwaretailor.Web.UI"/>
  </
controls>
</
pages>

When I add

<

telerik:RadGrid ID="RadGrid1" runat="server"></telerik:RadGrid>

everything works as expected....

trying to use my custom control like

<

swt:CustomGrid ID="CustomGrid1" runat="server"></swt:CustomGrid>

I get a Visual Studio (2008) warning:

Warning 1 Generation of designer file failed: Unable to create type 'swt:CustomGrid'. Could not load file or assembly 'Telerik.Web.UI, Version=2007.3.1218.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The system cannot find the file specified. D:\My Documents\Visual Studio 2008\Projects\RMA Management\WebPlayground\Default.aspx 18 0 WebPlayground

The project compiles, but neither is the designer-file modified correctly, nor do i get intellisense support in the .aspx file....

I'm literally tearing my hair the last hour... can't figure out what I'm doing wrong...

Any help greatly appreciated!!

Kind regards,
Wolfgang

archimede
Top achievements
Rank 1
 answered on 24 Nov 2009
1 answer
123 views
Hi ,

I Have radgrid, I want to show a webpage when user double clicks a row in that radgrid
the page contains some more details about that record
I have acheived this all
What i now need is, Dynamic change of title bar of that popping up webpage
I need the title bar of the window to be based on the record clicked by user
for example if a user clicks the record which has the main field as anvesh then the title of that page should be anvesh
if the user clicks the record which has main field as princy or ronald it has to be reflected as title of the page
i have used javascript for popping up webpage so i think it would be better if u give me an idea in javascript
i do know how to do it in code behind
so pleasse help me

Thanks
Roland
Top achievements
Rank 1
 answered on 24 Nov 2009
2 answers
130 views
Hi!  I have some troubles finding a solution to disable deleting and editing for SOME appointements.
So far, I've only seen examples for disabling this for ALL of the appointements.
I tried setting "AllowEdit" to false but this doesn't seem to be it.
The javascript code for OnAppointmentEditing doesn't allow me to do server-side logic so that didn't help much.
Thanks in advance!
Emilie Lessard
Top achievements
Rank 1
 answered on 24 Nov 2009
2 answers
180 views

I have a gridview with 3 levels and wants to use CommandItemTemplate in all 3.

I am using the command items depending of the mode the user is entering data (insert/update/delete)

F.eks the "Insert" button
asp:LinkButton ID="btninsert" runat="server" CommandName="PerformInsert" Visible='<%# RadGrid1.MasterTableView.IsItemInserted%>'>

 

 

<img style="border:0px" alt="" src="<%= this.TemplateSourceDirectory %>/Images/Insert.gif" />Insert Message

 

 

</asp:LinkButton>

 

 

 

and the delete button

 

 

<asp:LinkButton ID="LinkButton1" runat="server" Visible='<%#RadGrid1.EditIndexes.Count == 0 && !RadGrid1.MasterTableView.IsItemInserted%>'

 

 

OnClientClick="javascript:return confirm('Delete this Message?')" CommandName="DeleteSelected"><img style="border:0px" alt=""

 

 

src="<%= this.TemplateSourceDirectory %>/Images/Delete.gif" /> Delete Message
</asp:LinkButton>

 

 

 


The problem is the visible code asking if MasterTableView is in insert mode. I need the the possibility to ask if the child is in insert mode.

any suggestion ?

thx Torben
 

Talha
Top achievements
Rank 2
 answered on 24 Nov 2009
1 answer
112 views
Is there a way to get a click event when the users clicks on a resource item?  
Peter
Telerik team
 answered on 24 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?