Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
97 views
My company has a project that runs on a 2.0 .net framework app pool.  This project consumes a 2009.3.1208.35 versioned Telerik DLL.  Telerik.Web.UI.  I am trying to track back and find the documentation for this version of Telerik.  Can your group help me to locate the documentation for this code library?

Thanks!!!
Allan
Allan
Top achievements
Rank 1
 asked on 06 Jan 2012
2 answers
119 views
Hi,

I was showing an expand/collapse all button in the grid using the code smaple in:
 http://www.telerik.com/community/code-library/aspnet-ajax/grid/custom-expand-collapse-column-with-expandall-collapseall-image-button-in-the-header.aspx

However, I am unable to remove the default expand collapse column. I used the solution given in the thread but that does not work for me. It changes the alignment of my grid when it is expanded.
Can you tell me how to hide the default column.
MBEN
Top achievements
Rank 2
Veteran
 answered on 06 Jan 2012
2 answers
76 views
Hello
as I can put the format "year - month - day hour:minute:second" in datatimepicker?.

thank you very much beforehand
mauricio
Top achievements
Rank 1
 answered on 06 Jan 2012
4 answers
265 views
Hello, 

I have a column 

 <telerik:GridButtonColumn CommandName="SELECT" Text="SELECT" 
                        UniqueName="Select" >
 </telerik:GridButtonColumn>

in a radgrid, and I have the radgrid property 

onitemcommand="ItemCommand"

But when the button is clicked the event does not fire. Any ideas? I am on a deadline fast coming and this has stopped me in my tracks

All I could find in my searches is that I need to enable viewstate, but that has had no effect. 
Michael
Top achievements
Rank 1
 answered on 06 Jan 2012
3 answers
203 views
I'm dealing with quite large datasets here, and my application seems to throw an IO timeout exception if i set ignorepaging to true and there's too much data.

So what i've done is created a hiddenfield for my total record count and i want to limit the number of records exported to 500, in the hope this will avert said exception, see below:,

If hd_rowcount.Value > 499 Then   
   Me.rg_properties.PageSize = 500
   Me.rg_properties.ExportSettings.IgnorePaging = False
End If

However this doesn't work. I'm assuming because the pagesize has already been set to 20, thus only 20 records are being exported.

Is there a way i can achieve the above results or are there any other suggestions you'd recommend?
Alan T
Top achievements
Rank 1
 answered on 06 Jan 2012
4 answers
244 views
I have, I believe, followed the examples correctly, but every time I try to Export to PDF  the entire table opens in the current window.

rgUsers.ExportSettings.ExportOnlyData = true;
rgUsers.ExportSettings.IgnorePaging = true;
rgUsers.ExportSettings.OpenInNewWindow = true;
rgUsers.MasterTableView.ExportToPdf();

I expect to get all the data and I do, If I change the "IgnorePaging" to false I just get the first page, as I would expect. But changing the value of OpenInNewWindow has no observable effect.

I am obviously missing something very simple, but I just can 't see it. Any ideas?
Martin
Top achievements
Rank 1
 answered on 06 Jan 2012
2 answers
83 views
Am having truoble with my autogenerated edit form after posting back the if an EntityDataSourceValidationException is thrown.  I am overriding the Entity DataSource Inserting Event and using automatic inserts on the grid. 

The first time the exception is thrown the drop downs in my edit form retain their values and I am able to insert the values after correcting the errors on the form.

However, if I try to insert again without correcting the validation errors, after postback the values in the drop down lists are lost and the edit form is then unusable.

Hoping to hear if this the right way to do this, or if I need to just allow the grid to auto insert withough overriding the Entity Data Source Inserting Event.

I am providing the grid code, entity data source and the code for the inserting event.

<ajci:JMGrid ID="ItemsGrid" runat="server" DataSourceID="edsAssetManager" AutoGenerateColumns="false" Skin="Windows7"
     AllowAutomaticInserts="true" AllowAutomaticDeletes="true" AllowAutomaticUpdates="false" DataKeyNames="id" OnUpdateCommand="GridOnUpdate">
    <ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true"
        FileName="AssetList">
        <Excel Format="Html" FileExtension="xls" />
    </ExportSettings>
    <MasterTableView EditMode="PopUp" AllowFilteringByColumn="true" CommandItemDisplay="Top"
        CommandItemSettings-AddNewRecordText="Add Items" DataKeyNames="id" TableLayout="Fixed">
        <EditFormSettings CaptionFormatString="Add/Edit Item" PopUpSettings-Modal="true" EditFormType="AutoGenerated">
    </EditFormSettings>
 
    <CommandItemTemplate>
        <asp:LinkButton runat="server" ID="lnkAdd" Text="Add Item" CssClass="iconAdd" CommandName="InitInsert" ></asp:LinkButton>
        <asp:LinkButton ID="btnManualRefresh" CssClass="iconRefresh" runat="server" Text="Refresh Data" OnCommand="GridRefresh" />
        <asp:LinkButton ID="ExportToExcelButton2" runat="server" OnClick="ExportData" CommandArgument="Excel" Text="Export To Excel" CssClass="buttonExcel" />
    </CommandItemTemplate>
    <Columns>
        <telerik:GridTemplateColumn AllowFiltering="false" ItemStyle-Width="100px" HeaderStyle-Width="100px" ReadOnly="true">
            <ItemTemplate>
                <div>
                    <asp:LinkButton ID="btnEdit" CommandName="Edit" runat="server"  CssClass="iconEdit" Text=" "></asp:LinkButton>
                    <asp:LinkButton ID="lbDeleteRecord" runat="server" CssClass="iconDelete" Text=" " CommandName="Delete" CommandArgument='<%# Eval("id") %>' OnClientClick="javascript:return confirm('Removing this item will also clear its related history.  Continue?')"></asp:LinkButton>
                    <a href="#" onclick="openRadWindow('<%#DataBinder.Eval(Container.DataItem,"id") %>'); return false;">
                        <img src="../Assets/images/icons/icon-magnifying-glass.png" />
                    </a>
                     
                    <asp:Image ID="imgNote" runat="server" ImageUrl="../Assets/images/icons/icon-notes.png" />
                    <telerik:RadToolTip ID="tooltpNotes" runat="server" TargetControlID="imgNote" RelativeTo="Element"
                        Position="BottomCenter" RenderInPageRoot="true" ManualClose="true">
                        <p></p>
                        <div>
                            <asp:Label id="ttpAssetNote" runat="server" Text='<%# Eval("notes")%>'></asp:Label>
                        </div>
                    </telerik:RadToolTip>
 
                    <asp:Image ID="imgComment" runat="server" ImageUrl="../Assets/images/icons/icon-comment.png" />
                    <telerik:RadToolTip ID="tooltpComment" runat="server" TargetControlID="imgComment" RelativeTo="Element"
                        Position="BottomCenter" RenderInPageRoot="true" ManualClose="true">
                        <p></p>
                        <div>
                            <asp:Label id="ttpAssetComment" runat="server" Text='<%# Eval("comment")%>'></asp:Label>
                        </div>
                    </telerik:RadToolTip>
                    <asp:Image ID="imgQRTag" runat="server" CssClass="iconQR" ImageUrl='<%# AssetManager.Helper.QRImage.GetQRIMageURL(Eval("tag.assetTag").ToString()) %>' />
                    <telerik:RadToolTip ID="tltpQRStatus" runat="server" TargetControlID="imgQRTag"
                    RelativeTo="Element" Position="BottomCenter" RenderInPageRoot="true" EnableShadow="true"
                    ManualClose="true">
                        <div >
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# AssetManager.Helper.QRImage.GetQRIMageURL(Eval("tag.assetTag").ToString()) %>' Target="_blank" Text="Asset QR Code"/>
                        </div>
                        <div id="RenderedQR">
                            <asp:Image ID="qrImage" runat="server" ImageUrl='<%# AssetManager.Helper.QRImage.GetQRIMageURL(Eval("tag.assetTag").ToString()) %>'
                                Title='<%# Eval("tag.assetTag") + ".png" %>' ClientIDMode="Static"/>
                        </div>
                        <div>
                            <asp:Label ID="lblQRAssetID" runat="server" Text='<%# Eval("tag.assetTag") %>'></asp:Label>
                        </div>
                    </telerik:RadToolTip>                    </div>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridDropDownColumn  UniqueName="DDLassetTag" DataSourceID="edsAssetTag" SortExpression="assetTag" ListTextField="assetTag" ListValueField="id" HeaderText="AssetTag" DataField="tagID" EmptyListItemText="Choose an Asset Tag" EmptyListItemValue="" EnableEmptyListItem="true" HeaderStyle-HorizontalAlign="Center" FilterControlWidth="95px" HeaderStyle-Width="135px" ItemStyle-Width="100px"/>
       <telerik:GridBoundColumn DataField="itemName" AllowFiltering="true" AllowSorting="true" HeaderText="Item Name" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" FilterControlWidth="120px" HeaderStyle-Width="160px"></telerik:GridBoundColumn>
        <telerik:GridDropDownColumn UniqueName="DDLManufacturer" DataSourceID="edsManufacturer" SortExpression="mfgName" ListTextField="mfgName" ListValueField="id" HeaderText="Manufacturer" DataField="mfgID" EmptyListItemText="Choose a Manufacturer" EmptyListItemValue="" EnableEmptyListItem="true" FilterControlWidth="65px" HeaderStyle-Width="105px"/>
        <telerik:GridBoundColumn DataField="modelNumber" AllowFiltering="true" AllowSorting="true" HeaderText="Model Number" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" FilterControlWidth="95px" HeaderStyle-Width="135px" ItemStyle-Width="100px"></telerik:GridBoundColumn>
        <telerik:GridTemplateColumn DataField="notes" UniqueName="Notes" HeaderText="Notes"  Display="false" AllowFiltering = "false" FilterControlWidth="120px" HeaderStyle-Width="150px">
        <ItemTemplate>
            <%# Eval("notes") %>
        </ItemTemplate>
            <EditItemTemplate>
                <asp:TextBox ID="txtNotes" Text='<%# Bind( "notes") %>' Columns="30" Rows="5"
                    TextMode="MultiLine" runat="server"></asp:TextBox>
            </EditItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="comment" UniqueName="Comments" HeaderText="Comments" Visible="false" AllowFiltering = "false" FilterControlWidth="65px" HeaderStyle-Width="100px">
        <ItemTemplate>
            <%# Eval("comment") %>
        </ItemTemplate>
            <EditItemTemplate>
                <asp:TextBox ID="txtComments" Text='<%# Bind( "comment") %>' Columns="30" Rows="5"
                    TextMode="MultiLine" runat="server"></asp:TextBox>
            </EditItemTemplate>
        </telerik:GridTemplateColumn>
 
        <telerik:GridBoundColumn DataField="serialNumber" AllowFiltering="true" AllowSorting="true" HeaderText="Serial Number" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" FilterControlWidth="95px" HeaderStyle-Width="135px" ItemStyle-Width="100px"></telerik:GridBoundColumn>
        <telerik:GridDropDownColumn UniqueName="DDLWho" DataSourceID="edsWho" SortExpression="name" ListTextField="name" ListValueField="id" HeaderText="User / Location" DataField="whoID" EnableEmptyListItem="true" EmptyListItemText="" HeaderStyle-HorizontalAlign="Center" FilterControlWidth="95px" HeaderStyle-Width="135px" ItemStyle-Width="100px"/>
        <telerik:GridDropDownColumn UniqueName="DDLStatus" DataSourceID="edsStatus" SortExpression="name" ListTextField="name" ListValueField="id" HeaderText="Status" DataField="statusID" EmptyListItemText="Choose a Status" EmptyListItemValue="" EnableEmptyListItem="true" HeaderStyle-HorizontalAlign="Center" FilterControlWidth="95px" HeaderStyle-Width="135px" ItemStyle-Width="100px"/>
        <telerik:GridCheckBoxColumn DataField="IPv6Compliant" AllowFiltering="false" AllowSorting="true" HeaderText="v6" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"></telerik:GridCheckBoxColumn>
    </Columns>
 
</MasterTableView>
</ajci:JMGrid>
<asp:EntityDataSource runat="server" ID="edsAssetManager" EntitySetName="assets" ConnectionString="name=AssetTagManager"
    DefaultContainerName="AssetTagManager" EnableInsert="true" EnableDelete="true" Include="tag" OnInserting="MyEdsInserting" OnUpdating="MyEdsInserting"
    EnableUpdate="true" />
protected void MyEdsInserting(object sender, EntityDataSourceChangingEventArgs e)
{
     
    List<string> _error = new List<string>();
    AssetManager.FormException FormException = new AssetManager.FormException();
    AssetManagerDevModel.asset x = ((AssetManagerDevModel.asset)e.Entity);
    if (e.Exception is EntityDataSourceValidationException && e.Exception is System.Web.DynamicData.IDynamicValidatorException)
    {
        foreach (KeyValuePair<string, Exception> innerException in ((System.Web.DynamicData.IDynamicValidatorException)e.Exception).InnerExceptions)
        {
            _error.Add(innerException.Key + " is Blank");
        }
    }
    else
    {
        if (x.itemName == null)
            _error.Add("Name cannot be blank");
        if (x.tagID == null || x.tagID ==0)
            _error.Add("You must select a tag from the list");
        if (x.statusID  == 0)
            _error.Add("You must select an available status");
    }
 
    if (_error.Count > 0)
    {
        e.Cancel = true;
        e.ExceptionHandled = true;
        throw new Helper.DataInvalidException(_error);
    }
 
    else
    {
        x.modifyBy = HttpContext.Current.User.Identity.Name.Split('\\')[1];
        x.modifyDate = DateTime.Now;
    }
}

Thanks!

Jeremy
Top achievements
Rank 1
 answered on 06 Jan 2012
3 answers
144 views
We have a RadListview which is binding to a DataSource control and have item, edit and insert templates.
The datasource control takes care of selecting the object when the page loads and does the data bind.  The datasource control (actually a CslaDataSource control) binds to our business layer objects which are enumerable, and we just show one "record" in the listview.
Really we are making use of the templating to show display, edit and insert modes for our record/object.

We also tend to have our own user controls also in the templates and pass the business object down to them so they can bind to their respective controls.

All works well.

Except we have one slight issue.  When inserting a new record and attempting a save, the datasource control xxx_Update method gets fired and if the business object throws an error (typically as some business rule is broken and it cannot be saved yet), the RowsAffected is zero and we set a PageHasErrors flag.

The page posts back and in our Page_PreRender event we try and switch the listview back into Insert mode as we want to keep it there in that template as the save failed.  Unfortunately this doesn't quite work as we end up with the display item template shown first and then the insert template below.

It almost looks like it has created 2 records in the listview.

Any ideas?
Andrey
Telerik team
 answered on 06 Jan 2012
1 answer
108 views
Hi,

I want to get record into radgrid when radcombobox client selected index changed. i want full code for ASMX page. please let me know how to bind the grid whlie radcomobox selected index changed using selected value.

Thanks,
Dhamu.
Richard
Top achievements
Rank 1
 answered on 06 Jan 2012
1 answer
106 views
I made the following Javascript function which successfully makes the DatePicker  readonly (including no select from the calendar) without the grey fuzzy appearance. (I think it might be possible to do this with CSS, not sure, but we are in IE, where that doesn't work.) I don't know if this is the best approach, but it works fine. I think it's a common need, and I couldn't find it documented anywhere, so I'm posting it here in case others can use it. Function also supports making editable again.

function SetDatePickerReadOnly(picker, readOnly) {
    picker.set_enabled(!readOnly);  // disable the overall control if readOnly is true (or the converse)
    var input = picker.get_dateInput();  //retrieves the inner DateInput portion of the DatePicker
    input.enable(); // enable the input box only, leaving the calendar disabled (or the converse)
    input._textBoxElement.readOnly = readOnly;  //the inner reference to the input object; changes appearance to "ReadOnly" style and not editable
    // (or the converse)
}

Usage:
var dobPicker = $find("<%= DateOfBirthDatePicker.ClientID %>");
SetDatePickerReadOnly(dobPicker, true);


Maria Ilieva
Telerik team
 answered on 06 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?