Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
158 views
Hi,
Im using the self referencing grid. By default all the rows are in expanded state but i want to collapse all rows and expand only on click.
I want to use Plus/Minus image instead of default button. But the plus/minus image appears only for parent row amd for the rest normal button is shown.

Following is the aspx grid definition

    <telerik:RadPageView ID="RadPageView2" runat="server">  
        <table border="0" visible"false" width="100%">  
 <LNWCon:LNGrid ID="grdOrganization" EnableAJAX="True" ShowHeader="true" runat="server"   
Width"97%" GridLines="None" OnColumnCreated="grdOrganization_ColumnCreated" OnItemCreated="grdOrganization_ItemCreated" 
           OnNeedDataSource"grdOrganization_NeedDataSource" OnItemDataBound = "grdOrganization_ItemDataBound" OnItemCommand="grdOrganization_ItemCommand" Skin="Black" AutoGenerateColumns="False" > 
           <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" NoDetailRecordsText="No Records To Display" EnableNoRecordsTemplate="false" 
               DataKeyNames"FolderId,ParentFolderId" Width="100%" HorizontalAlign="Right" ExpandCollapseColumn-ButtonType="ImageButton" ExpandCollapseColumn-CollapseImageUrl="../Images/minus.png" ExpandCollapseColumn-ExpandImageUrl="../Images/plus.png"  ExpandCollapseColumn-Visible="true"


Any help is appreciated.

Regards,
L.N.K
Martin
Telerik team
 answered on 24 Mar 2010
4 answers
129 views

How could I use the example livedata with WCF client-side databinding?
Something like
aspx file

<!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 id="Head1" runat="server">  
    <title></title>  
    <%--Scripting--%> 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
 
        <script type="text/javascript">  
        //<![CDATA[
        function pageLoad(sender, args)
        {
            setInterval("updateGrid()",1000);
        }
        function updateGrid()
        {
            var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
            tableView.dataBind();
        }
        //]]> 
        </script> 
 
    </telerik:RadCodeBlock> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowPaging="True" 
            AllowSorting="True">  
            <MasterTableView> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="ProductID" HeaderText="ProductID" DataType="System.Int32">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" DataType="System.String">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="UnitPrice" HeaderText="UnitPrice" DataType="System.Decimal" 
                        DataFormatString="{0:C}">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="ReorderLevel" HeaderText="ReorderLevel" DataType="System.Int32">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridCheckBoxColumn DataField="Discontinued" HeaderText="Discontinued" DataType="System.Boolean">  
                    </telerik:GridCheckBoxColumn> 
                    <telerik:GridBoundColumn DataField="Date" HeaderText="Date" DataType="System.Int32">  
                    </telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings> 
                <DataBinding SelectMethod="GetDataAndCount" Location="~/Service.svc" 
                    SortParameterType="Linq" FilterParameterType="Linq">  
                </DataBinding> 
            </ClientSettings> 
        </telerik:RadGrid> 
    </div> 
    </form> 
</body> 
</html> 

And the service.svc

[DataContract]  
public class Product {  
    [DataMember]  
    public int ProductID {  
        get;  
        set;  
    }  
    [DataMember]  
    public string ProductName {  
        get;  
        set;  
    }  
    [DataMember]  
    public decimal? UnitPrice {  
        get;  
        set;  
    }  
    [DataMember]  
    public short? ReorderLevel {  
        get;  
        set;  
    }  
    [DataMember]  
    public bool Discontinued {  
        get;  
        set;  
    }  
    [DataMember]  
    public int Date {  
        get;  
        set;  
    }  
}  
 
public class ResultData {  
    public int Count {  
        get;  
        set;  
    }  
    public List<Product> Data {  
        get;  
        set;  
    }  
}  
 
[ServiceKnownType( typeof( Product ) )]  
[ServiceContract( Namespace = "" )]  
[AspNetCompatibilityRequirements( RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed )]  
public class PosicionService {  
 
    [OperationContract]  
    public ResultData GetDataAndCount( int startRowIndex, int maximumRows, string sortExpression, string filterExpression ) {  
        ResultData result = new ResultData();  
        List<Product> lista = new List<Product>();  
        for ( int i = 0; i < 50; i++ ) {  
            Product producto = new Product();  
            producto.ProductID = 1;  
            producto.ProductName = "Name";  
            producto.UnitPrice = 200;  
            producto.ReorderLevel = 1;  
            producto.Discontinued = false;  
            producto.Date = DateTime.Now.Minute;  
            lista.Add( producto );  
        }  
        result.Data = lista;  
        result.Count = 50;  
        return result;  
    }  

 

I want to use declarative client-side data-binding of RadGrid for ASP.NET AJAX to WCF Web Service but a need to refresh data each 20 seconds and i need to use pagging and sorting functionality.
Thanks

Rosen
Telerik team
 answered on 24 Mar 2010
1 answer
105 views
Hi, I am using GridDropDownColumn in a grid, and getting this error when I click Add:
DataBinding: 'Telerik.Web.UI.GridInsertionObject' does not contain a property with the name 'BenefitCategoryId'.

//my declarative source code
<telerik:GridDropDownColumn DataField="BenefitCategoryId" ListTextField="Description" ListValueField="Id" DataSourceID="CategorySource" HeaderText="Kategory Beskrivelse">
</telerik:GridDropDownColumn>

//DataSoruce soruce code
<mrc:BusinessObjectDataSource runat="server" ID="CategorySource" BusinessObjectName="BenefitCategory"
        BusinessObjectAssembly="BusinessObjects" BusinessObjectNamespace="Company.BusinessObjects">
        <SelectParameters>
            <asp:ControlParameter ControlID="CorporationDropDownList" PropertyName="SelectedValue"
                Name="CorporationId" Type="String" />
        </SelectParameters>
         <InsertParameters>
            <asp:ControlParameter ControlID="CorporationDropDownList" PropertyName="SelectedValue"
                Name="CorporationId" Type="String" />
        </InsertParameters>
    </mrc:BusinessObjectDataSource>

I read below articles, is this problem is solved?
http://www.telerik.com/community/forums/aspnet-ajax/grid/error-on-insert.aspx

How can I solve this problem?

Thanks,
Thaya
Martin
Telerik team
 answered on 24 Mar 2010
1 answer
150 views

Hey everyone,

I'm wondering if anybody has a sample of some jQuery that would set the FocusedDate property for a RadDateInput based on the selection of a date in another RadDateInput.  Currently, I have this working with a postback, but am trying to learn and use jQuery more and more.

The below RadDatePickers are what I would want to do this with.  Currently (with the postback) I am setting the MinDate and the FocusedDate of RadDatePicker2 to the value of RadDatePicker1's selected date when the selection changes. 


<
telerik:RadDatePicker ID="RadDatePicker1" runat="server"   
                       Calendar-FirstDayOfWeek="Monday" > 
</telerik:RadDatePicker> 
                                              
<telerik:RadDatePicker ID="RadDatePicker2" runat="server"   
                       Calendar-FirstDayOfWeek="Monday" > 
</telerik:RadDatePicker> 

Thanks everyone,
Greg

robertw102
Top achievements
Rank 1
 answered on 24 Mar 2010
2 answers
134 views
Hi
I have a radgrid w/ a column whose width say is 50 characters allowed to be displayed out of 1000 characters.

I have to display the column in the expandable row on-row-click which displays all the 1000 characters for a column in that row.

This is similar to editable rows like form but should be only used for displaying the content. Please note, there is no data update.

Would be appreciable to know.

Thanks in advance.
SR
Subbarao
Top achievements
Rank 1
 answered on 24 Mar 2010
4 answers
104 views
Hi,
There is a RadComboBox that has items longer than the width of the combo. After selecting such an item, the beginning of this item should be displayed in the combo. And it is so under most of browsers: FF, Opera, Chrome, Safari and IE7. But under IE8 the ending of the selected item is displayed. I can manually shift it to the beginning (using "Home" key) but it is not a solution, of course.
Is there any way to make IE8 behaving in the same way as other browsers?
I'm using Q3 2009 version of RadControls. Normally I use the "Simple" skin but it behaves in the same way when using the "Default" skin - so it seems that it is not an skin issue.

Regards
Tomasz
James Van Buren
Top achievements
Rank 2
 answered on 24 Mar 2010
2 answers
119 views
I am defining a Grid Template Column using a label when in display and using a dropdown during edit and "add new". I am doing this exactly as given in example here. There is an important flaw in this example. When editiing, the example selects the Country in the drop down that matches the record that was previously saved, not the Country of the item being edited. Can anyone help me using this example to determine how to pull the Country of the item you are editing and in turn select the appropriate drop down.
Greg Barretta
Top achievements
Rank 1
 answered on 24 Mar 2010
2 answers
134 views
Hi,

I'm trying to do something similar to this example: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/popupeditform/defaultcs.aspx

But I can't find the property SelectedValue in the dropdownlist to bind it with the value, like this:

<asp:DropDownList ID="DropDownList1" runat="server" SelectedValue='<%# Bind("TitleOfCourtesy") %> 
There is another way to do this?

Regards,


Andrés Salinas
Top achievements
Rank 1
 answered on 24 Mar 2010
1 answer
107 views
Hi,

I'm using the WAVE toolbar for firefox to detect accessibility issues with my asp.net pages.

One common issue I've found with RADInputs (textboxes, datepickers etc) is that WAVE highlights the following error:

"A form <input>, <select> or <textarea> does not have a corresponding label (Note:labels are not required for image, submit, reset, button or hidden for element types)."

...now I have a <label for="myctl"> associated with each of my RAD inputs, so I am assuming that the WAVE error is related to the hidden fields that comprise the internals of the RAD input? Indeed, if i remove my <label for=""> elements, I get one more WAVE error per RAD input, so this seems to confirm my thinking.

So is there a simple way to make the hidden fields accessible too, so they don't show up as errors?

Thanks in advance,
Gordopolis

Dimo
Telerik team
 answered on 24 Mar 2010
1 answer
112 views
Hi
,i have two problem.

first ;

i put a button within a grid's line like this
<MasterTableView TableLayout="Fixed" ClientDataKeyNames="Myid">

<ItemTemplate>

<asp:button ID="mybut" runat="server" Text="Mytext" OnClientClick="Myfunc()" />

</ItemTemplate>

</MasterTableView>
...


and put a javascript named Myfunc in my asp code.

all they ok.
but i want to retrieve the myid value of the record that belongs to the row that user clicked the button within Myfunc() script with client javascript

the second problem is

i open a Window with radopen in my script named Myfunc like this

radopen ("MySecondPage.Aspx", "Mywin")

on firefox it opens the window when user clicked the button wihin the row
and after closing the modal window it stays on the record which user clicked.

but on ie it goes to the top of the page.

i searched the forum all the answers are make the grid scrollable but i  dont want to do it scrollable.
isn't there another way ?.. and is there a bug or problem in telerik rad components ?..

best regards






fer
Top achievements
Rank 1
 answered on 24 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?