Thursday, 31 May 2012

Telerik Webinar Week will be held June 18-22, 2012.

The Q2 2012 Webinar Week is quickly approaching (as is our upcoming major release)! As always, we are organizing this week-long event packed with hour-long webinar sessions to walk you through all the awesome things we’ve been working on during the past four months. If you’re eager to be among the first to learn how the Q2 bits can enhance your productivity,

Book your seat for Webinar Week now>>
Webinar Week will be held June 18-22, 2012. And you know the drill, one lucky attendee at each webinar will win more than $2,000 worth of software. This time around though, as a token of our appreciation for being our customers, we have decided to also grant each Webinar Week attendee with a discount code valid towards a next Telerik purchase, upgrade or renewal!
Our evangelists have prepared amazing things to show you, so be there!

Saturday, 19 May 2012

How to access the control from itemtemplate in Radgrid on client side

You get control from itemtemplate in Radgrid by below methods.

// Method1
var ChkSelect =  $(row.get_element()).find("input[id*='ChkSelect']").get(0);
// Method2
var ChkSelect = $telerik.findControl(row.get_element(), "ChkSelect");
// Method3
var ChkSelect = row.findControl("ChkSelect"); 
For how to access row from radgrid check this link.

Wednesday, 18 April 2012

how to wrap text in radgrid's column or label without space

CSS Class :-

.breakWord120
{
   max-width: 120px !important;
   word-break: break-all !important;
   word-wrap: break-word !important;
   vertical-align: top;
   line-height: 15px;
}

How to use in RadGrid.
<telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name" ItemStyle-CssClass="breakWord120"></telerik:GridBoundColumn>
How To Use In Label.
<asp:Label ID="Label1" runat="server" CssClass="breakWord120"></asp:Label>
By above example you can able to break the RadGrid's column or any Label if their text width exceed the 120px.
Note : It worked on both cases is space is available (in text/content) or not.

Saturday, 31 March 2012

how to use RadConfirm as simple confirm

JS CODE:

<script type="text/javascript">
    window.blockConfirm = function (text, mozEvent, oWidth, oHeight, callerObj, oTitle) {
        var ev = mozEvent ? mozEvent : window.event;
        ev.cancelBubble = true;
        ev.returnValue = false;
        if (ev.stopPropagation) ev.stopPropagation();
        if (ev.preventDefault) ev.preventDefault
        var callerObj = ev.srcElement ? ev.srcElement : ev.target;
        if (callerObj) {
            var callBackFn = function (arg) {
                if (arg) {
                    callerObj["onclick"] = "";
                    if (callerObj.tagName == "A") {
                        try {
                            eval(callerObj.href)
                        }
                        catch (e) { }
                    }
                    else if (callerObj.click) {
                        callerObj.click();
                    }
                }
            }
            radconfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle);
        }
        return false;
    }
</script>

HOW TO USE:

<asp:Button ID="btnDelete" OnClientClick="return blockConfirm('<br/>Are you sure you want to delete this record?<br/>&nbsp;', event, 340, 150, '', 'Delete confirm')" Text="Delete" runat="server" />



Friday, 30 March 2012

using linq access radgrid's item or row


List<GridDataItem> Items = (from item in radAvailableNetworks.MasterTableView.Items.Cast<GridDataItem>()
where ((CheckBox)item.FindControl("chkSelect")) != null
&& ((CheckBox)item.FindControl("chkSelect")).Checked
select item).ToList();