Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
185 views
hi

I have a menu as a usercontrol which has 26 items value from A to Z,

I placed this userControl on a page and I want it to act as filter.

For example, when i click item A the grid would populate with all the records that starts with A.

Now the thing is how do i call the click event of the menu items on a page? Thanks
Shinu
Top achievements
Rank 2
 answered on 04 Feb 2009
2 answers
140 views

It seems like I keep running into problems when I Ajaxify controls.

Does someone have some concrete examples and how-to's on how to use Ajaxify controls correctly?

The current problem I am having is that I have the following

 
                <telerik:AjaxSetting AjaxControlID="gvMessageList">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="gvMessageList" LoadingPanelID="ajaxLoadingPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                  
                <telerik:AjaxSetting AjaxControlID="ddlProperty" EventName="OnSelectedIndexChanged">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="gvMessageList" LoadingPanelID="ajaxLoadingPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
 
                <telerik:AjaxSetting AjaxControlID="btnSearch">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="gvMessageList" LoadingPanelID="ajaxLoadingPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                  
                <telerik:AjaxSetting AjaxControlID="messagePanel">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="lblPropertySmsText" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 

To me it should be straight forward: gvMessageList is a RadGrid and it should be updated when 
    - it does something itself (pages, sort, etc)
    - when the drop down list is changed 
    - when a search button is clicked

For some reason AFTER I use the drop down list to make a selection problems occur.  If I click the search button (or expand the grid) the SelectedIndexChanged event for the drop down list fires AS WELL AS the event for the button.

Can someone explain what I am missing on how to Ajaxify correctly?

Thanks.
KlimUser
Top achievements
Rank 2
 answered on 03 Feb 2009
8 answers
213 views
Using tables and javascript this would not be a problem but i am afraid that doing it my way will mess up the sorting so I figured i would ask the correct way to do it in radgrid.

I have a table that looks like this
ID         Name                Active Date       Active    
1          Chris                 12/11/2007          Y

What i want to do is make Y (which is a graphic) a link. Where you click on it you get the ajax working symbol > the ajax fires which goes to the database and updates the active value to N and then the Y in the table changes to an N and next time you click it would change from N to Y.

I had this working great in another project using tables and mootools for the ajax but since i have moved to radgrid i was wondering if someone could point me in the direction of the correct Rad way to do this.

Thanks for your help
chris
Top achievements
Rank 1
 answered on 03 Feb 2009
6 answers
444 views
hi,
I  am using a rad grid and for editing the data i am using editform editing of template type.
I actually want to bind the dropdown in template form to a datasource after edit is clicked in edit column of datagrid



<Columns>
                    <telerik:GridBoundColumn SortExpression="ShortName" HeaderText="ShortName" DataField="ShortName" HeaderButtonType="TextButton" UniqueName="ShortName"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn  SortExpression="CategoryId" HeaderText="Id" DataField="CategoryId" HeaderButtonType="TextButton" Visible="False" Display="False" UniqueName="CategoryId"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Description" HeaderText="Description" DataField="Description" HeaderButtonType="TextButton" UniqueName="Description"></telerik:GridBoundColumn>
                    <telerik:GridEditCommandColumn UniqueName="EditCol">
                    </telerik:GridEditCommandColumn>
                </Columns>
               
                <EditFormSettings EditFormType="Template">
                    <EditColumn UniqueName="EditCol">
                   
                    </EditColumn>
                    <FormTemplate>
                        <table id="Table1">
                        <tr>
                            <td>
                                Short Name
                            </td>
                            <td>
                                <asp:DropDownList ID="DD1" runat="server"> </asp:DropDownList>
                            </td>
                       
                        </tr>
Justin
Top achievements
Rank 1
 answered on 03 Feb 2009
2 answers
98 views
I have a RadGrid with AllowRowSelect="true", AllowMultiRowSelection="true", and a GridClientSelectColumn.

When I select items using the checkbox, multi-row selection works great. But when I select items by clicking on them, it undoes all of my previous selections!  This would be really inconvenient for the user because if they miss the checkbox by just 1px all of their selecting work will be gone.  And if the user has scrolled on the page to make the final selection, they won't even know that everything else has been un-selected.

Is there a setting I can change so that clicking a row adds to the selection instead of resetting to select just that item? Or alternatively, could I disable the "select on row click" functionality and force them to use the checkbox?

Thanks in advance. Here's my code:

            <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" AllowFilteringByColumn="false" 
                AutoGenerateColumns="False" AllowMultiRowSelection="True" DataSourceID="DrugDataSource">  
                <ClientSettings> 
                    <Selecting AllowRowSelect="true" /> 
                </ClientSettings> 
                <MasterTableView AllowNaturalSort="false" DataKeyNames="DrugID" GridLines="None">  
                    <Columns> 
                        <telerik:GridClientSelectColumn> 
                        </telerik:GridClientSelectColumn> 
                        <telerik:GridTemplateColumn DataField="BrandName" HeaderText="Brand Name" UniqueName="BrandName" 
                            AutoPostBackOnFilter="true" AllowFiltering="true" SortExpression="BrandName">  
                            <HeaderStyle Width="35%" /> 
                            <ItemTemplate> 
                                <%# Eval("BrandName") %></ItemTemplate>  
                            <EditItemTemplate> 
                                <span class="mandatory">*</span> 
                                <asp:TextBox ID="txtBrandName" runat="server" Text='<%# Bind("BrandName") %>'></asp:TextBox> 
                                <asp:RequiredFieldValidator ID="ReqBrandName" runat="server" ControlToValidate="txtBrandName" 
                                    ErrorMessage="<div>Please enter a brand name.</div>" CssClass="errorstatus" Display="Dynamic"></asp:RequiredFieldValidator> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn DataField="ScientificName" HeaderText="Generic Name" 
                            AutoPostBackOnFilter="true" AllowFiltering="true" UniqueName="ScientificName" 
                            SortExpression="ScientificName">  
                            <HeaderStyle Width="35%" /> 
                            <ItemTemplate> 
                                <%# Eval("ScientificName") %></ItemTemplate>  
                            <EditItemTemplate> 
                                <span class="mandatory">*</span> 
                                <asp:TextBox ID="txtScientificName" runat="server" Text='<%# Bind("ScientificName") %>'></asp:TextBox> 
                                <asp:RequiredFieldValidator ID="ReqScientificName" runat="server" ControlToValidate="txtScientificName" 
                                    ErrorMessage="<div>Please enter a scientific name.</div>" CssClass="errorstatus" 
                                    Display="Dynamic"></asp:RequiredFieldValidator> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                    </Columns> 
                    <RowIndicatorColumn Visible="False">  
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                </MasterTableView> 
            </telerik:RadGrid> 
towpse
Top achievements
Rank 2
 answered on 03 Feb 2009
9 answers
585 views
Hi

My editor is inside a div that has the style display: none at start, and after clicking a header, the editor is displayed. When i now use the full-screen mode, some of the other elements (like the <hr> ) are still visible. How come, and how can i fix that.

Here is the code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test_test" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
    Namespace="System.Web.UI" TagPrefix="asp" %> 
 
 
<!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>Ziki CMS</title> 
    <style type="text/css" > 
.ddp_1   
{  
    background-color: #FFFFEE;  
    width: 100%;  
    margin-top: 5px;  
    margin-bottom: 5px;  
    border: solid 1px #DDDDDD;  
}  
 
.ddp_1_menu_2  
{  
    cursor: pointer;   
    width: 800px;     
    float: left;  
    padding: 3px;  
}  
 
.ddp_1_container_1  
{  
    display: none;  
    height: 300px;  
}  
 
.div_clear  
{  
    clear: both;  
}  
    </style> 
 
    <script language="Javascript" type="text/javascript">  
    // JScript File  
function ShowDropDown(myWindow)  
{  
  var sDisplay;  
  sDisplay = document.getElementById(myWindow).style.display;  
  if (sDisplay == "block")  
  {  
    document.getElementById(myWindow).style.display = "none";  
  }  
  else  
  {  
    document.getElementById(myWindow).style.display = "block";  
  }    
}  
    </script> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager> 
                            <div class="ddp_1">  
                                <div class="ddp_1_menu_2" onclick="ShowDropDown('div_language');">  
                                    Click me  
                                </div>    
                                <div class="div_clear"></div> 
                                <div id="div_language" class="ddp_1_container_1">  
                                    <telerik:RadEditor ID="RadEditor1" runat="server" Height="150px" ToolsFile="~/xml/BasicTools.xml">  
                                        <Content> 
                                        </Content> 
                                    </telerik:RadEditor>    
                                </div> 
                            </div> 
          <hr class="hr2" /> 
    </form> 
</body> 
</html> 
      
 
Joshua
Top achievements
Rank 1
 answered on 03 Feb 2009
2 answers
144 views
I have a RadWindow appear and load another page in my project when I click a button. However, when the RadWindow loads on top of an ActiveX control I have embedded in the main page, the border is behind the ActiveX control while the contents remain in the foreground. Now, I am unable to drag, resize, close, etc. the RadWindow. I've noticed that a lot of the RadControls work this way. Undocked RadDocks disappear behind ActiveX controls when you drag them over them. The DropDown list (if big enough to extend to the ActiveX control) will also disappear behind it.

Is this a known issue? Is there a fix or a workaround? Because the ActiveX control is critical to our project. And I currently see no way around this problem.

Thank you.
Andrew
Top achievements
Rank 1
 answered on 03 Feb 2009
4 answers
139 views
Please guide me in implementing the DateTimePicker as shown in the below sample/figure.
http://www.telerik.com/products/aspnet-ajax/calendar.aspx#integrated-datepicker-and-timepicker-controls

Andre Vovan
Top achievements
Rank 1
 answered on 03 Feb 2009
2 answers
158 views
Hey all.
I'm trying to convert a page to do data binding all on the client-side.
I'm starting with a simple method call from javascript in the aspx file.

    <script language="javascript" type="text/javascript">
        function pageLoad() {
            load();
        }
    </script>

In my javascript file I'm using

Sys.Application.add_load(function() {
 _tableView = $find('MyGridId').get_masterTableView();
}

In which case the grid is null or not an object. Sys.Application.load is raised after all scripts have been loaded and the objects in the application have been created and initialized so I would expect the grid to be there.

What am I missing?

Here's my grid. Thanks.
                <telerik:RadGrid runat="server" ID="MyGridId" Skin="Office2007" AutoGenerateColumns="false" AllowMultiRowSelection="true" 
                    Width="600" > 
                    <MasterTableView  runat="server" ClientDataKeyNames="Id, PointId" HeaderStyle-HorizontalAlign="Center" TableLayout="Fixed"  > 
                        <NoRecordsTemplate> 
                            <asp:Localize ID="Localize2" runat="server" Text="<%$ Resources:Resource, NO_ALARMS_CONFIGURED %>" /></NoRecordsTemplate
                        <Columns> 
                            <telerik:GridBoundColumn UniqueName="Display" DataField="Display" HeaderText="<%$ Resources:Resource, DISPLAY%>" /> 
                            <telerik:GridTemplateColumn  UniqueName="DisplayOnBoard" HeaderText="<%$ Resources:Resource, DISPLAY_ON_BOARD %>"
                                <ItemTemplate> 
                                    <asp:Label ID="Label1" runat="server"><%# (bool)Eval("DisplayOnBoard") ? "Yes" : "No"%></asp:Label> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn UniqueName="NotifyWhenOn" DataField="NotifyWhenOn" HeaderText="<%$ Resources:Resource, NOTIFY_ON_ACTIVE %>"
                                <ItemTemplate> 
                                    <asp:Label ID="Label2" runat="server"><%# (bool)Eval("NotifyWhenOn") ? "Yes" : "No"%></asp:Label> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn UniqueName="NotifyWhenOff" DataField="NotifyWhenOff" HeaderText="<%$ Resources:Resource, NOTIFY_ON_RETURN %>"
                                <ItemTemplate> 
                                    <asp:Label ID="Label3" runat="server"><%# (bool)Eval("NotifyWhenOff") ? "Yes" : "No"%></asp:Label> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                        </Columns> 
                    </MasterTableView> 
                    <ClientSettings> 
                        <Scrolling UseStaticHeaders="true"  AllowScroll="true" ScrollHeight="175" FrozenColumnsCount="4" /> 
                        <Selecting AllowRowSelect="true" /> 
                        <ClientEvents OnRowSelected="RowSelected" /? 
                    </ClientSettings> 
                </telerik:RadGrid> 






towpse
Top achievements
Rank 2
 answered on 03 Feb 2009
1 answer
77 views
Hi,

I have a RadGrid and I want to fire the AjaxManager.ajaxRequest event whenever a row is dropped. However, it doesn't seem to fire. If anyone can help then it would be much appreciated.

Thanks,

Antony
Antony
Top achievements
Rank 1
 answered on 03 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?