Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
199 views
Hi,

I have implement Radscheduler using WebService/Wcf.

But as per requirement I want also implement RadScheduler using Model,View,Controller.
If this is possible please update me.

Regards,
Kuldeep
Plamen
Telerik team
 answered on 30 May 2013
3 answers
160 views

Hi,

 

I have a radgrid  (radGrd) with two column Name(Type:string) and Value(Type:Object). And I am binding List of Attribute class to my radgrid

 

Private class Attribute

{

 public string Name{ get; set; }

        public Object Value{ get; set; }

}

 

The Value object mentioned above can be of type string or Integer. In my case both filtering and sorting is working successfuly with Name column. However, it is fails in case of Value. Can you please tell me what is missing in my case which is causing this issue? Here is the code snippet of the Radgrid for your reference.

<telerik:radgrid id="radGrd" allowmultirowedit="false" cellpadding="0" cellspacing="0"
    runat="server" allowsorting="true" allowfilteringbycolumn="true" allowpaging="true"
    onneeddatasource="radGrd_NeedDataSource" onitemcommand="radGrd_ItemCommand" onitemcreated="radGrd_ItemCreated"
    onupdatecommand="radGrd_UpdateCommand" ondeletecommand="radGrd_DeleteCommand"
    enableheadercontextmenu="true" groupingenabled="false" enableheadercontextfiltermenu="true"
    enablelinqexpressions="false" onitemdatabound="radGrd_ItemDataBound">
<MasterTableView AutoGenerateColumns="False" EditMode="InPlace" CommandItemDisplay="Bottom"
PageSize="10" TableLayout="Fixed" CommandItemSettings-ShowAddNewRecordButton="false"
CommandItemSettings-ShowRefreshButton="false" HeaderStyle-HorizontalAlign="Center"
HeaderStyle-Font-Bold="true" AllowFilteringByColumn="True" EnableHeaderContextMenu="true"
IsFilterItemExpanded="false">
<NoRecordsTemplate>
No records available</NoRecordsTemplate>
<PagerStyle HorizontalAlign="Right" Position="TopAndBottom" VerticalAlign="Middle"
Mode="NextPrevAndNumeric" AlwaysVisible="true" PageButtonCount="5"></PagerStyle>
<Columns>
<telerik:GridBoundColumn DataField="Name" UniqueName="Name" HeaderText="Name" AllowFiltering="false" ItemStyle-HorizontalAlign="Left" ReadOnly="true" DataType="System.String" HeaderStyle-Width="90px"> </telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Value" DataField="Value"
UniqueName="Value" ItemStyle-Width="40px" AutoPostBackOnFilter="true"
HeaderStyle-Width="100px" ItemStyle-HorizontalAlign="Left" DataType="System.String">
<ItemTemplate>
<asp:Label ID="lblAttVal" runat="server" Text='<%# Bind("Value") %>'
Width="10px"></asp:Label>
</ItemTemplate>
<HeaderTemplate>
        <table>
            <tr>
                <td>
                    <asp:LinkButton ID="Sort1" runat="server" CommandArgument="Value" CommandName="Sort"
                        Text="Value"></asp:LinkButton>
                </td>
                <td>
                    <img src="Images/fillter_icon.png" style="margin-top: 5px; margin-left: 5px; cursor: pointer"
                        onclick='ShowColumnHeaderMenu(event,"Value")' alt="" />
                </td>
            </tr>
        </table>
    </HeaderTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtValue" runat="server" Text='<%# Bind("Value") %>'
Width="82px"></asp:TextBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="True" ScrollHeight="300px" UseStaticHeaders="true"></Scrolling>
</ClientSettings>
</telerik:radgrid>



Thanks,
Preeti

Princy
Top achievements
Rank 2
 answered on 30 May 2013
1 answer
53 views
I am trying to use the most recent version of the Calendar & Date Picker controls (Q1 2013) with the skins being loaded from a custom external assembly.  However, the generated stylesheet doesn't include the calendar-specific styling.

I have followed the steps outlined on the How to load skins from external assemblies page, and it's working for the other controls that I'm using.

I have created a test page with just a single RadScriptManager, RadStyleSheetManager and RadDatePicker.

The custom external assembly contains the necessary definitions for the CustomSkin skin.

The web.config file contains an appSetting with key Telerik.Web.SkinsAssembly and value pointing to the correct custom assembly.

There are no other css files in the project.

Is there some additional configuration required to get the custom skins working for the RadDatePicker?
Galin
Telerik team
 answered on 30 May 2013
3 answers
153 views
Hi
  I am using RAD combo box.  And i have set allowCustomeText =true , and i have made the combo to look like textbox.
On focus of the control the entire text get selected.
  Can you tell me is there any setting to set the cursor to the last position of the combo.

Thanks
Siva Kumar
Jeff
Top achievements
Rank 1
 answered on 30 May 2013
5 answers
100 views
I'm getting an error "Object doesn't support property or method 'get_masterTableView'" when I try to access the mentioned method on the client side. The grid definition mark-up is below. My Javascript file in a separate file. I bind the grid in the OnNeedDataSource event handler and the grid data is displayed fine. Do I need to have a reference to any  Telerik javascript libraries in the page?


<telerik:RadGrid ID="TerritoriesRadGrid" runat="server" AutoGenerateColumns="false"
            AllowPaging="true" OnNeedDataSource="TerritoriesRadGrid_NeedDataSource" OnItemCommand="TerritoriesRadGrid_ItemCommand">
            <GroupingSettings CaseSensitive="False" />
            <ExportSettings HideStructureColumns="true" FileName="Territories" Excel-Format="Biff"
                OpenInNewWindow="false" Excel-FileExtension="xls" IgnorePaging="true" ExportOnlyData="false" />
            <MasterTableView EditMode="PopUp" AllowFilteringByColumn="true" AllowSorting="true"
                CommandItemDisplay="Top">
                
                <CommandItemSettings ShowExportToExcelButton="true" ExportToExcelText="Export to Excel"
                    ShowAddNewRecordButton="false" />
                <Columns>
                     <telerik:GridBoundColumn DataField="TerritoryDisplay" HeaderText="Territory" HeaderStyle-Width="5em">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SalesPersonRacfId" HeaderText="Sales Person RACF ID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SalesPersonFullName" HeaderText="Sales Person Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SalesPersonPositionName" HeaderText="Sales Person Job Title">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SalesPersonOrgUnitLevel1" HeaderText="Sales Person Org Unit Level 1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SalesPersonOrgUnitLevel2" HeaderText="Sales Person Org Unit Level 2">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SalesPersonOrgUnitLevel3" HeaderText="Sales Person Org Unit Level 3">
                     </telerik:GridBoundColumn>
                   /Columns>
            </MasterTableView>
        </telerik:RadGrid>

Thanks, 
Alex

Viktor Tachev
Telerik team
 answered on 30 May 2013
3 answers
418 views
Hi,
I have a problem with

 

$find("<%= RadGrid1.ClientID %>") returning null on callback, when I want to refresh RadGrid control.

Onclick registration for ImageButton inside DetailTables (inside RadGrid)
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
 
            if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "Detail")
            {
                GridDataItem item = (GridDataItem)e.Item;
                 
                ImageButton deleteBtn = (ImageButton)item["ArrowColumn2"].Controls[1];
                string onclick = deleteBtn.Attributes["OnClick"];
                deleteBtn.Attributes.Clear();
                deleteBtn.Attributes.Add("OnClick", "ConfirmDelete(this," + item["ExamID"].Text + ", 'DeleteExam','" + item["Name"].Text.ToString() + "'); return false;");
 
            }
 
        }

 
ConfirmDelete:

function ConfirmDelete(sender, rowindex, arg, arg2) {
            postbackdugme = sender;
            CallServer(arg + '*' + rowindex);
            return false;
        }

Callback registration:

ClientScriptManager cm = Page.ClientScript;
           cbReference = cm.GetCallbackEventReference(this, "arg",
               "ReceiveServerData", "", "errorData", true);
           String callbackScript = "function CallServer(arg, context) { __theFormPostData = ''; __theFormPostCollection = new Array(); WebForm_InitCallback(); " +
               cbReference + "; }";
           cm.RegisterClientScriptBlock(this.GetType(),
               "CallServer", callbackScript, true);

Callback Receive function

function ReceiveServerData(arg, context) {
 
            if (arg.substr(0, 5) == 'Error') {
                radalert("<h3 style='color: #ff0000;'><strong>" + arg + " </strong> </h3>", null, null, "Result");
            }
 
            radalert("<h3 style='color: #ff0000;'><strong>" + arg + " </strong> </h3>", null, null, "closeRadWindow");
 
            var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
            masterTable.rebind();
 
            var detailTablesArray = $find("<%= RadGrid1.ClientID %>").get_detailTables();
            detailTablesArray[0].rebind();
 
        }

RadGrid

<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" GridLines="None" AllowAutomaticDeletes="True"
    AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True"
    DataSourceID="SqlDataSource1" AllowSorting="True" Skin="Office2010Blue"
    Height="100%" Width="100%" OnItemInserted="RadGrid1_ItemInserted" OnItemCommand="RadGrid1_ItemCommand"
    OnItemDataBound="RadGrid1_ItemDataBound">
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="CertificationID" DataSourceID="SqlDataSource1"
        CommandItemDisplay="TopAndBottom" EditMode="EditForms">
        <CommandItemSettings ExportToPdfText="Export to PDF" />
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="LinkButton">
            </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn DataField="CertificationID" DataType="System.Int32" FilterControlAltText="Filter CertificationID column"
                HeaderText="CertificationID" ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CertificationNameShort" FilterControlAltText="Filter CertificationNameShort column"
                HeaderText="CertificationNameShort" SortExpression="CertificationNameShort" UniqueName="CertificationNameShort">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CertificationNameLong" FilterControlAltText="Filter CertificationNameLong column"
                HeaderText="CertificationNameLong" SortExpression="CertificationNameLong" UniqueName="CertificationNameLong">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ExamsInCertification" DataType="System.Int32"
                FilterControlAltText="Filter ExamsInCertification column" HeaderText="ExamsInCertification"
                SortExpression="ExamsInCertification" UniqueName="ExamsInCertification" ReadOnly="true">
            </telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
        <DetailTables>
            <telerik:GridTableView Name="Detail" DataKeyNames="ExamID" AllowSorting="false" DataSourceID="SqlDataSource2"
                Width="100%" PageSize="10" RetrieveAllDataFields="false" runat="server"
                CommandItemDisplay="Top" EditMode="PopUp" NoDetailRecordsText="No records to display."
                AutoGenerateColumns="false" AllowAutomaticUpdates="True" AllowAutomaticDeletes="false"
                AllowAutomaticInserts="true"
                CommandItemSettings-AddNewRecordText="New exam">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="CertificationID" MasterKeyField="CertificationID" />
                </ParentTableRelation>
                <AlternatingItemStyle />
                <NoRecordsTemplate>
                    <asp:Label ID="Label1" runat="server" Text="No records."></asp:Label>
                </NoRecordsTemplate>
                <EditFormSettings ColumnNumber="1" CaptionDataField="Exam" InsertCaption="New exam"
                    CaptionFormatString="Edit properties of exam {0}">
                    <FormTableItemStyle Width="100%" Height="29px" />
                    <FormTableStyle GridLines="None" CellPadding="2" CellSpacing="0" />
<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
 
                    <FormStyle Width="100%" BackColor="#eef2ea" />
                    <FormTemplate>
                        <telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# Bind("Exam") %>' Font-Names="Verdana"
                            Font-Size="Small" Width="100%">
                        </telerik:RadTextBox>
                        <asp:Button runat="server" Text="test" />
                        <telerik:RadTextBox ID="radTxtCssValue" runat="server" Text='<%# Bind("Name") %>'
                            Font-Names="Verdana" Font-Size="Small" Width="100%">
                        </telerik:RadTextBox>
                        <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />
                    </FormTemplate>
                </EditFormSettings>
                <CommandItemSettings AddNewRecordText="New exam" ExportToPdfText="Export to PDF" />
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="LinkButton" ItemStyle-Width="50px" UniqueName="EditCommandColumn">
                        <ItemStyle Width="50px" />
                    </telerik:GridEditCommandColumn>
                    <%-- <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Delete2"
                            UniqueName="DeleteColumn">
                        </telerik:GridButtonColumn>--%>
                    <telerik:GridBoundColumn DataField="CertificationID" FilterControlAltText="Filter exam number column"
                        HeaderText="Certification ID" UniqueName="CertificationID" ReadOnly="true" Visible="false" />
                    <telerik:GridBoundColumn DataField="ExamID" FilterControlAltText="Filter exam number column"
                        HeaderText="Exam ID" UniqueName="ExamID" ReadOnly="true" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Exam" DataType="System.String" FilterControlAltText="Filter exam number column"
                        HeaderText="Exam number" UniqueName="Exam">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column"
                        HeaderText="Exam name" UniqueName="Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn UniqueName="ArrowColumn">
                        <ItemTemplate>
                            <asp:ImageButton BorderStyle="Solid" ID="ImageButton1" AlternateText="Delete4" runat="server"
                                CommandName="Delete4" ImageUrl="~/_layouts/Images/Delete.GIF" OnClientClick="showmodal(this);" />
                        </ItemTemplate>
                        <HeaderStyle Width="30px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="ArrowColumn2">
                        <ItemTemplate>
                            <asp:ImageButton BorderStyle="Solid" ID="ImageButton2" AlternateText="Delete4" runat="server"
                                CommandName="Delete4" ImageUrl="~/_layouts/Images/Delete.GIF" />
                        </ItemTemplate>
                        <HeaderStyle Width="30px" />
                    </telerik:GridTemplateColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
    </MasterTableView>
    <SelectedItemStyle BackColor="#66CCFF" />
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
</telerik:RadGrid>

Callback works fine: in code behind record are deleted and

ReceiveServerData is executed but it breaks on var mastertable = $find(%= RadGrid1.ClientID %>").get_masterTableView(); - cannot find RadGrid1 control, it is null

Help?

 

 

 

 

 

 

 









 

 

Viktor Tachev
Telerik team
 answered on 30 May 2013
5 answers
93 views
Hi,

We are using Rad Grid Controls for Asp.Net AJAX 2008 Q2. We want to Rebind our Rad Grid at client side using $find() method. But $find() method is not recognised by application and showing error.

$find() method working well for latest version of Rad controls but not for the Asp.Net AJAX 2008 Q2.

So please let us know the alternate way to Rebind grid at client side for Asp.Net AJAX 2008 Q2 version.

Thanks.
Duane Roelands
Top achievements
Rank 1
 answered on 29 May 2013
1 answer
112 views
My application works fine on our QA server in all browsers, but does not work on our Production server in IE10.  I am using the latest Telerik DLLs.  Here is a link: http://appointments.herbalmagic.ca.  The login button shows in other versions of IE and Firefox but not IE10.  Please help!  Thank you.
msigman
Top achievements
Rank 2
 answered on 29 May 2013
1 answer
86 views
I'm trying to show y-axis title in html as I want to show a character as apex or subscript.
The following code does not work.
  <YAxis     >
                 
                 <Appearance Color="134, 134, 134" MajorTick-Color="196, 196, 196" MinorTick-Color="196, 196, 196">
                     <LabelAppearance Visible="true"  >
                         
                     </LabelAppearance>
                     <MajorGridLines Color="196, 196, 196" />
                     <MinorGridLines Color="196, 196, 196" Width="0" />
                     <TextAppearance TextProperties-Color="89, 89, 89"  >
                         
                     </TextAppearance>
                 </Appearance>
                 <AxisLabel TextBlock-Visible="true" Visible="true" TextBlock-Text="kWh/<sup>m2</sup>">
                     <TextBlock  >
                         <Appearance TextProperties-Color="220, 158, 119"  TextProperties-Font="18px">
                         </Appearance>
                     </TextBlock>
                 </AxisLabel>
             </YAxis>

I suppose that html is not supported in axislabel textblock-text property. Does exist any workaround?
Best regards!
Petar Kirov
Telerik team
 answered on 29 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?