Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
251 views
I have GridEditCommandColumn with an image in it that I want to be invisible until I mouseover anywhere in its row.

I've been messing with cssclass and with the OnRowMouseOver client event but I've not been able to work it out.

Does anyone have the magic incantation I can use...

Thanks, Steve
Marin
Telerik team
 answered on 21 Jun 2012
1 answer
119 views
Hi,

I am generating radcombobox items using load on demand. When I type something, it is filtering. It works fine.
But before I type i.e. when I just click on it, it shows the entire items. i don't this to happen.

Thanks,
Alan Thomas
Princy
Top achievements
Rank 2
 answered on 21 Jun 2012
1 answer
158 views
I have a hierarchical RadListView:
<telerik:RadListView ID="RadListView1" runat="server" DataSourceID="SqlDataSource0"...>
......
 <ItemTemplate>

<%

 

# Session["CatalogID"] = Eval("SerialsID").ToString()%>

 

 

 

<telerik:RadListView ID="RadListView2" runat="server" DataSourceID="SqlDataSource1"...>
.....
<ItemTemplate>
<%# Session["ProductID"] = Eval("ProductID").ToString()%>

 

 

<asp:Button runat="server" ID="btnRebind_Production" Text="" OnClientClick="somefunction"/>

 

 

 

 

<telerik:RadListView ID="RadListView3" runat="server" DataSourceID="SqlDataSource2"...>
....
<ItemTemplate>
<div>

<asp:Button runat="server" ID="btnRebind_Detail" Text="" OnClientClick="somefunction()/>

 

 

 

 

 

<asp:ImageButton runat="server" ID="img1" AlternateText="" CausesValidation="false" ImageUrl='<%# Eval("ImageURL") %>' Width="180px" Height="180px" />
<div>
</
ItemTemplate>

 

 

 

</telerik:RadListView>
</ItemTemplate>
</telerik:RadListView>
</ItemTemplate>
</telerik:RadListView>
When I click btnRebind_Detail, I only want to rebind RadListView 3. The problem was that when I call

$find(

 

"<%= RadListView1.ClientID %>").rebind(), the data sets for RadListView2 and 3 are wrong.  I tried to wrap the RadListView3 with UpdatePanel and call _doPostBack("UpdatePanel1", ' '), but the dataset for RadListView 3 is wrong, it populated the ListView3 with another Catalog's details.  Is there a way to only rebind certain child RadListView in Client-Side?

Tsvetina
Telerik team
 answered on 21 Jun 2012
3 answers
117 views
How do I get a Nested User Control to use client-side validation?

Here's the validator:
<telerik:RadTextBox ID="txtAuditor" runat="server">
</telerik:RadTextBox>
<asp:RequiredFieldValidator runat="server" ID="rfvAuditor" ControlToValidate="txtAuditor"
    ErrorMessage="Auditor is required" Display="Dynamic" ForeColor="Red" ValidationGroup="Audit">*</asp:RequiredFieldValidator>


My user control has "btnUpdate" is inside the User Control:
<telerik:RadButton ID="btnUpdate" Text="Update" runat="server" CommandName="Update" ValidationGroup="Audit">

The user control includes the Validator in the RadAjaxManagerProxy:

<telerik:RadAjaxManagerProxy runat="server" ID="RadAjaxManagerProxy">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnUpdate">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="btnUpdate" />                        
                <telerik:AjaxUpdatedControl ControlID="rfvAuditor" />        
            </UpdatedControls>
        </telerik:AjaxSetting>              
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>


The Grid in the parent control uses the User Control:
<EditFormSettings UserControlName="~/Controls/ComplianceFormAuditControl.ascx" EditFormType="WebUserControl">
                                                       <EditColumn UniqueName="EditCommandColumn1">
                                                       </EditColumn>
                                                   </EditFormSettings>

The Audit validation summary is available on the page:
<asp:ValidationSummary runat="server" ID="vsAudit" ForeColor="Red" ValidationGroup="Audit" />


The Rad Ajax Manager on the parent page is configured:
<telerik:AjaxSetting AjaxControlID="grdAudit">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grdAudit" />
                <telerik:AjaxUpdatedControl ControlID="vsAudit" />
            </UpdatedControls>
        </telerik:AjaxSetting>


Doesn't seem to work. I have tried to manually call validation without success:
protected void grdAudit_InsertCommand(object sender, GridCommandEventArgs e)
        {
            Page.Validate("Audit");
            InsertUpdateAudits(e, ComplianceFormAuditEntity.Status.New);
        }


Any ideas?
Peter
Top achievements
Rank 1
 answered on 21 Jun 2012
5 answers
1.2K+ views
hi all,
i'm new to telerik. would appreciate if someone could help me here.
How can i access the value(exmple an ID) in column during the edit mode?
i need to use that ID to do another action. can somebody show me how i can get the value ?
here some of my my code(i will put more codes if its not enough)
aspx:
<MasterTableView CommandItemDisplay="TopAndBottom" DataSourceID="SqlDataSource1"
           DataKeyNames="ID">
           <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
           <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
           </RowIndicatorColumn>
           <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
           </ExpandCollapseColumn>
           <Columns>
               <telerik:GridEditCommandColumn>
               </telerik:GridEditCommandColumn>
               <telerik:GridBoundColumn UniqueName="ID" HeaderText="ID" DataField="ID" DataType="System.Int64"
                   FilterControlAltText="Filter ID column" ReadOnly="True" SortExpression="ID">
               </telerik:GridBoundColumn>
                     ...
                       ...
how can i access the value of ID in code behind?

thanks,
Shinu
Top achievements
Rank 2
 answered on 21 Jun 2012
1 answer
125 views
Hi,

For example sake:  Lets take Orders table or Customers table or any table.

What i believe is in most of the cases, the grid is not used to display data from Orders table directly.  Its always a view table eg. vOrders
Where vOrders connects to various other tables and data is displayed in grid.   this means that any feature of automatic insert/update will not be of useful,  also a grid might just display few columns that are needed , but while editing or inserting it needs all columns that are present in Orders table and not of vOrders. which means during edit/insert  I need to query main orders table (single row by querying a particular OrderID)

Is there a live example to demonstrate this.

The only way I could see is using "Custom Control.ascx", but the related examples are a bit confusing , because it just passes current reocord to customcontrol as "dataitem"  and then after insert/update the main aspx page queries control for individual values and proceeds with action.   so there is very much tight dependency on aspx and ascx.   (makeing it difficult to reuse .ascx  elsewhere)

I wish to learn what approach other developers have taken or recommend me.  It would be nice if telerik team gives some good suggestion/knowledge .


Regards

Andrey
Telerik team
 answered on 21 Jun 2012
3 answers
191 views
Hi,
I would like to implement sorting and grouping at client side, no post backs. So, intention is to get all the data in one go and then let user group/sort at client side. Please let me know if I can use RadGrid's client side events for this.

Thanks,
SV

Shinu
Top achievements
Rank 2
 answered on 21 Jun 2012
1 answer
378 views
Hi,

I have a RadGrid and I fill my data on it. First time i can filter my column but second time it gives "Cannot call method '_showFilterMenu' of null " message when i click filter button. My codes is follow..

and i attached my screenshot result..
 

using
 System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Getron.AAM.EntityManagement;
using System.Data;
using Telerik.Web.UI;
using Getron.Core.BussinesRuleEngine;
using Getron.Core.Base.Web;
using System.Text;
 
public partial class Sections_TaskManagement_Controls_SelectRows : EntityProtectedUserControl
{
 
    private void Page_Load(object sender, System.EventArgs e)
    {
         
            if (Request.QueryString["ControlIntCode"] != null && Getron.Core.Tools.DataTableFieldOperation.ToInt64(Request.QueryString["ControlIntCode"].ToString(), 0) > 0)
            {
                RequestTemplateControl templateControl = new RequestTemplateControl(Getron.Core.Tools.DataTableFieldOperation.ToInt64(Request.QueryString["ControlIntCode"].ToString(), 0));
                 
                SqlDataSource1.ConnectionString = templateControl.DbSession.Connection.ConnectionString;
                SqlDataSource1.SelectCommand = templateControl.Query;
 
 
                this.RadGrid1.MasterTableView.Columns.Clear();
 
                GridClientSelectColumn selectCol = new GridClientSelectColumn();
 
                this.RadGrid1.MasterTableView.Columns.Add(selectCol);
             
        }
 
    }
 
}



<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SelectRows.ascx.cs" Inherits="Sections_TaskManagement_Controls_SelectRows" %>
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Hay" />
     
 
        <script type="text/javascript">
        function GetRadWindow()
        {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
 
        function returnToParent() {
            //create the argument that will be returned to the parent page
            var oArg = new Object();
 
            //get the city's name
            oArg.cityName = "deneme";
 
            //get the selected date from RadDatePicker
             
            //oArg.selDate = datePicker.get_selectedDate().toLocaleDateString();
 
            //get a reference to the current RadWindow
            var oWnd = GetRadWindow();
 
 
 
 
            //Close the RadWindow and send the argument to the parent page
            if (oArg.selDate && oArg.cityName) {
                oWnd.close(oArg);
            }
            
        }
    </script>
 
     
        <telerik:RadGrid AutoGenerateColumns="true" ID="RadGrid1" DataSourceID="SqlDataSource1" EnableTheming="true"
        Width="760px" AllowFilteringByColumn="True" AllowSorting="True" PageSize="15"
        ShowFooter="True" AllowPaging="True" runat="server" GridLines="None" EnableLinqExpressions="false">
        <PagerStyle Mode="NextPrevAndNumeric" />
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView  AllowFilteringByColumn="True"
            ShowFooter="True" TableLayout="Auto"></MasterTableView>
            <ClientSettings>
            <Selecting AllowRowSelect="true" />
             
            </ClientSettings>
             
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1"
        ProviderName="System.Data.SqlClient"  runat="server">
    </asp:SqlDataSource>
    <hr />
    <button title="Submit" id="close" onclick="returnToParent(); return false;">Seçilenleri Onayla</button>




Andrey
Telerik team
 answered on 21 Jun 2012
8 answers
411 views
Hi,

I am using the RADCombo. As per the requirement I have to format(Red color in my example) some items in the combobox
based on some conditions.Formatting is done absolutely fine, but I face problem when the formatted item is selected.

If a non-formatted item is selected then no issues, BUT if the user selects the formatted item, the formatting is
not displayed but it simply shows the item without any format e.g. without any color in this case.

I attach the simple code snipptes for your refence. please do the needful.


protected
 void Page_Load(object sender, EventArgs e)  
        {  
            if (!IsPostBack)  
            {  
                LoadData();  
            }  
        }  
 
 
        private void LoadData()  
        {  
            // Add 1st Item  
            Telerik.Web.UI.RadComboBoxItem aItem;  
            aItem = new Telerik.Web.UI.RadComboBoxItem("Item2-invalid""1");  
            aItem.Attributes.Add("style""background-color: ORANGERED"); //Make the back color Red  
            aItem.ToolTip = "Invalid";  
            ddl1.Items.Add(aItem);  
 
            // Add 2nd Item  
            aItem = new Telerik.Web.UI.RadComboBoxItem("Item1""2");  
            ddl1.Items.Add(aItem);  
 
            // Add 3rd Item  
            aItem = new Telerik.Web.UI.RadComboBoxItem("Item3""3");  
            ddl1.Items.Add(aItem);  
 
            // Add 4thItem  
            ddl1.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select""0"));  
        } 





 

 <form id="form1" runat="server">  
    <div> 
    <VStars:ScriptManager ID="mgr1" runat="server"></VStars:ScriptManager> 
        <VStars:ComboBox ID="ddl1" runat="server">  
        </VStars:ComboBox> 
    </div> 
    </form> 

 

 

 

 

 

 

 

 


Thanks
Sushil Jinder
Princy
Top achievements
Rank 2
 answered on 21 Jun 2012
0 answers
113 views
HI,
I have a radgrid, a search button and tetxbox to enter my search term in and a table in db with like 50,000 records.
I ajaxified my grid which means that during paging I get to see this whirly on the screen and it all looks good. My question is that what happens for the first time when I enter the key and hit the search button. Right now my grid does not appear and there is no indication on the grid as if it is waiting for the data...any comments or ideas...? ANy help would be appreciated..

Thanks.
Sadi
Top achievements
Rank 1
 asked on 20 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?