Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
200 views
Hi,
 I have an object with hierarchy displayed below, and I need to bind to this using declarative binding in the ASPX page.

RootObject
   I_ StreetNames (collection)
          I_StreetID
  I_StreetName

Now I need to bind the DataTextField to StreetName and DataValueField to StreetID

Due to our architecture constraint I need to use object data source only. I would like to do a declarative binding.

I had tried the following options
ID="cboStreetName" DataSource='<%# Eval("StreetNames") %>' DataTextField="StreetName" DataValueField="StreetID" with the error
 Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control

DataSource='<%# DataBinder.Eval(Container,"StreetNames") %>' DataTextField="StreetName" DataValueField="StreetID"> with error
ASP.xxx_aspx' does not contain a property with the name 'StreetNames'

I am new to ASP.NET as well as Telerik Combobox.
I am working in ASP.NET 2.0 in Win XP enviroment.

Thanks in Advance
Murthy Meka


Developer
Top achievements
Rank 1
 answered on 08 Oct 2010
7 answers
174 views
Hi,
I am working with Telerik Ajax components of the framework 4.0.
In the web application I have a Master.Page in which I put a script manager in order to manage all ajax controls in  the different pages. in one of the pages in the application I implements a grid with paging and virtual scrolling as shown in the example:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/virtualscrollpaging/defaultcs.aspx
the implementation of virtual scrolling error appears:
Microsoft JScript runtime error: Sys.InvalidOperationException: A Control IS Already With The associated element.
Someone there an idea??
Pavlina
Telerik team
 answered on 08 Oct 2010
2 answers
287 views
Hi all, still have no answer, thus I repost my problem with a more clear title

I have a problem with filtering by GridMaskedColumn.
This is my code:
<telerik:GridMaskedColumn DataField="Customer.PhoneNumbers" DataType="System.String"
                Mask="(###) ###-####" HeaderText="Phone Number" SortExpression="Customer.PhoneNumbers"
                UniqueName="CustomerPhone">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="15%" />
                <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="15%" />
            </telerik:GridMaskedColumn>
The problem is:
- If I enter first three numbers in the filter field - it is filtered fine (see the screenshot ok.jpg)
- but if I enter more then three numbers or whole phone number - the filter does not work at all (see the screenshot fail1.jpg and fail2.jpg)

Any suggestions, please.
Oleksandr
Top achievements
Rank 1
 answered on 08 Oct 2010
1 answer
93 views
  Hello,
in RadControls for ASP.NET AJAX Q3 2008 I use this code to localize grid in Edit mode:
<EditFormSettings>
   <EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton" CancelText="Отмена" InsertText="Вставить" UpdateText="Обновить" >
   </EditColumn>
</EditFormSettings>

As I knew, in RadControls for ASP.NET AJAX Q2 2010 I can use *.resx files to localize Grid, but I don`t find any fields in RadGrid.Main.resx witch can help me to localize my Grid in Edit mode.

Thanks for any help,

Andrey.
Tsvetina
Telerik team
 answered on 08 Oct 2010
1 answer
114 views
Hi,
   I am working with RadGrid, usercontrol and Radpanelbar.
1. Actually I have A radGrid 'xyz1' which has usercontrol "ucl1" as it's edit form.
 2. In this Usercontrol "ucl1"  I have RadPanelBar "abc1" and some other web controls.
3. In RadPanelBar "abc1" I have another Usercontrol "ucl2" which contain RadGrid "xyz2" in it.

Now I want to pass 2 parameters from the Radgrid 'xyz1' to the Radgrid "xyz2" on click of edit. On Click of Edit I have to pass the parameters to RadGrid "xyz2" which loads data based on those 2 parameters. Please Help me with this issue. I am unable to load data into that RadGrid "xyz2". Can you Provide me with an example that does this similar process......


Thanks & Regards,
Nithu
Maria Ilieva
Telerik team
 answered on 08 Oct 2010
1 answer
87 views
I would like to display a pie chart with a tooltip for each seriesitem that display a grid. How can I accomplish this? I have seen numerous examples but none that I can get to work for this.

Any help would be greatly appreciated.

Thanks!
Fiko
Telerik team
 answered on 08 Oct 2010
2 answers
206 views
Hi,

I want to create a combobox filter control instead of a textbox in RadFilter. I followed the steps described on this link:

http://www.telerik.com/community/forums/aspnet-ajax/filter/error-when-building-custom-radfilterdatafieldeditor.aspx

However the example on this link does not involve updating a a radgrid but only displaying result filter. Please help me fill in the codes (???) below so I can filter my Radgrid based on the expression produced by the ApplyExpression event:

protected void RadFilter1_ApplyExpressions(object sender, RadFilterApplyExpressionsEventArgs e)
        {
            RadFilterSqlQueryProvider provider = new RadFilterSqlQueryProvider();
            provider.ProcessGroup(e.ExpressionRoot);
            RadGrid1.DataSource = ???
        }


Thanks a lot.
Pavlina
Telerik team
 answered on 08 Oct 2010
1 answer
75 views
Hello,

I was looking for a good tutorial or walktrough documentation with a real or similar example of a business application.
I've found several examples of Telerik ASP.Net controls and separate several examples of OpenAccess but not a real case of an application integrating both product and that could help me like a beginner in this area.

I'm speaking about to create a good design application (data tier, business tier, etc.)

Anybody know a good walktrough for this?
Thank you very much in advanced
Jose
Sebastian
Telerik team
 answered on 08 Oct 2010
3 answers
1.1K+ views
I am new to Rad controls there is a simple problem i am facing.

My scenario

I have to generate columns dynamically on the basis of the data coming from db.
in that in every column header there has to have a check box.


I have done that , but the thing is that there is a button outside rad grdi in which i have to find the check box
and depending upon its checked status i have to perform some business logic.

how to find the check box(located  in header) on the button click some code snippets will be helpful.
Pavlina
Telerik team
 answered on 08 Oct 2010
1 answer
152 views
I have a Column thats a DateTime Column. I want to filter by the Day of the week. Of course if i keep the column as a DateTime column i get an error about 'Thu' not being a valid datetime format.

I tried making it a regular DataBound column with a DataFormat string but still no luck. My filtering is being done via JS

Heres the code located in my User Control

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AvailableClasses.ascx.vb"
    Inherits="UserControls_AvailableClasses" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<table>
    <tr>
        <th align="right">
            City:
        </th>
        <td align="left">
            <telerik:RadComboBox ID="ddlLocationCities" Width="100%" Skin="Web20" AllowCustomText="true"
                EmptyMessage="--Select A City--" MarkFirstMatch="true" Filter="StartsWith" runat="server"
                Sort="Ascending" OnClientSelectedIndexChanged="LocationCityIndexChanged">
                <Items>
                    <telerik:RadComboBoxItem Text="All" />
                </Items>
            </telerik:RadComboBox>
            <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
 
                <script type="text/javascript">
                    function LocationCityIndexChanged(sender, args) {
                        var grid = $find("<%= ClassGrid.ClientID %>");
                        var tableView = grid.get_masterTableView();
                        tableView.filter("Location_DisplayCity", args.get_item().get_value(), "EqualTo");
                    }
                </script>
 
            </telerik:RadScriptBlock>
        </td>
    </tr>
    <tr>
        <th align="right">
            Time:
        </th>
        <td align="left">
            <telerik:RadComboBox ID="ddlClassTime" Width="100%" Skin="Web20" AllowCustomText="true"
                EmptyMessage="--Select A Time--" MarkFirstMatch="true" Filter="StartsWith" runat="server"
                Sort="Ascending" OnClientSelectedIndexChanged="ClassTimeIndexChanged">
                <Items>
                    <telerik:RadComboBoxItem Text="All" />
                </Items>
            </telerik:RadComboBox>
            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
 
                <script type="text/javascript">
                    function ClassTimeIndexChanged(sender, args) {
                        var grid = $find("<%= ClassGrid.ClientID %>");
                        var tableView = grid.get_masterTableView();
                        tableView.filter("Class_Start_Time", args.get_item().get_value(), "EqualTo");
                    }
                </script>
 
            </telerik:RadScriptBlock>
        </td>
    </tr>
    <tr>
        <th align="right" style="white-space:nowrap;">
            Day of Week:
        </th>
        <td align="left">
            <telerik:RadComboBox ID="ddlDayOfWeek" Width="100%" Skin="Web20" AllowCustomText="true"
                EmptyMessage="--Select A Day--" MarkFirstMatch="true" Filter="StartsWith"
                runat="server" Sort="Ascending" OnClientSelectedIndexChanged="DayofWeekIndexChanged">
                <Items>
                    <telerik:RadComboBoxItem Text="All" />
                    <telerik:RadComboBoxItem Text="Sunday" Value="SUN" />
                    <telerik:RadComboBoxItem Text="Monday" Value="MON" />
                    <telerik:RadComboBoxItem Text="Tuesday" Value="TUE" />
                    <telerik:RadComboBoxItem Text="Wednesday" Value="WED" />
                    <telerik:RadComboBoxItem Text="Thursday" Value="Thu" />
                    <telerik:RadComboBoxItem Text="Friday" Value="Fri" />
                    <telerik:RadComboBoxItem Text="Saturday" Value="Sat" />
                </Items>
            </telerik:RadComboBox>
            <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
 
                <script type="text/javascript">
                    function DayofWeekIndexChanged(sender, args) {
                        var grid = $find("<%= ClassGrid.ClientID %>");
                        var tableView = grid.get_masterTableView();
                        tableView.filter("tmp", args.get_item().get_value(), "Contains");
                    }
                </script>
 
            </telerik:RadScriptBlock>
        </td>
    </tr>
</table>
<telerik:RadGrid ID="ClassGrid" runat="server" AllowMultiRowSelection="false" AutoGenerateColumns="False"
    OnNeedDataSource="ClassGrid_NeedDataSource" OnDataBound="ClassGrid_DataBound"
    Skin="WebBlue" GridLines="Both" ShowGroupPanel="false" ShowHeader="true" OnItemDataBound="ClassGrid_ItemDataBound"
    AllowPaging="true" PageSize="10" AllowFilteringByColumn="true">
    <ExportSettings FileName="AvailableClassListExport" ExportOnlyData="true" OpenInNewWindow="True"
        HideStructureColumns="true">
    </ExportSettings>
    <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" PagerStyle-AlwaysVisible="true">
        <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="false"
            ShowExportToCsvButton="false" ShowExportToWordButton="false" ShowExportToPdfButton="false" />
        <RowIndicatorColumn Visible="True">
        </RowIndicatorColumn>
        <Columns>
            <telerik:GridBoundColumn DataField="Class_ID" Display="false" HeaderText="ID">
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn UniqueName="Class_Date" DataField="Class_Date" Display="true"
                HeaderText="Date" AllowFiltering="true" PickerType="DatePicker" DataType="System.DateTime"
                DataFormatString="{0:ddd}">
            </telerik:GridDateTimeColumn>
            <telerik:GridBoundColumn UniqueName="tmp" DataField="Class_Date" Display="false"
                HeaderText="Date" AllowFiltering="true" DataFormatString="{0:ddd, MMM dd, yyyy}">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Class_Start_Time" Display="false" HeaderText="Start Time"
                AllowFiltering="true">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Class_End_Time" Display="false" HeaderText="End Time"
                AllowFiltering="true">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Location_Name" Display="false" HeaderText="Location">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Street_Address" Display="false" HeaderText="Address">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="City" Display="false" HeaderText="_City">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="FK_State_Code" Display="false" HeaderText="State">
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn DataField="Zip" Display="false" HeaderText="Zip">
            </telerik:GridDateTimeColumn>
            <telerik:GridBoundColumn DataField="Class_Status" Display="false" HeaderText="Status">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="isSpanish" Display="false" HeaderText="Spanish"
                AllowFiltering="true">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Location_DisplayCity" Display="false" HeaderText="City"
                AllowFiltering="true">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Class">
                <ItemTemplate>
                    <div style="float:left;padding: 0px 15px 0px 0px;font-weight:bold;">
                        <%#Eval("Class_Date", "{0:ddd, MMM dd, yyyy}")%>
                        <br />
                        <%#Container.DataItem("Class_Start_Time")%>
                        -
                        <%# Container.DataItem("Class_End_Time") %>
                        <br /><br /><br /><br /><br />
                    </div>
                    <div>
                        <span><b>
                            <%# Container.DataItem("Location_Name") %></b>
                            <%#IIf(Container.DataItem("isSpanish") = "Y", " (Spanish)", " (English)")%>
                            <br />
                            <%# Container.DataItem("Street_Address") %>
                            <br />
                            <%# Container.DataItem("City") %>,
                            <%# Container.DataItem("FK_State_Code") %>
                            <%# Container.DataItem("Zip") %>
                            <br />
                            <b>Cross Streets:</b>
                            <%# container.DataItem("Cross_Streets") %>
                            <br />
                            <!-- Map -->
                            <%#"<a href=""http://www.mapquest.com/maps?city=" + Container.DataItem("City") + "&state=" + Container.DataItem("FK_State_Code") + "&address=" + Container.DataItem("Street_Address") + "&zipcode=" + Container.DataItem("Zip") + "&country=US&CID=lfmaplink"" target=""_Blank"">Map</a>"%>
                            <!-- Seperator -->
                            |
                            <!-- Directions -->
                            <%#"<a href=""http://www.mapquest.com/maps?2c=" + Container.DataItem("City") + "&2s=" + Container.DataItem("FK_State_Code") + "&2a=" + Container.DataItem("Street_Address") + "&2z=" + Container.DataItem("Zip") + "&2y=US&Form=directions&CID=lfddlink"" target=""_Blank"">Directions</a>"%>
                            <br />
                            <br />
                        </span>
                    </div>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
        <Selecting AllowRowSelect="True"></Selecting>
        <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True"
            ResizeGridOnColumnResize="False"></Resizing>
    </ClientSettings>
    <GroupingSettings ShowUnGroupButton="true" />
    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
</telerik:RadGrid>
Martin
Telerik team
 answered on 08 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?