Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
103 views
Hi,

I am using a rad grid in a web form. My requirement is show customize text in columns. 

suppose this is the real value binds to grid
"Aua7o0qnW-8n1nrHtR_1I0wg4kHD59"

I  want to show only first 10 characters and 3 dots
"Aua7o0qnW-..."

I have tried with dataFormatString. But couldn't get result that I wanted.

Thanks
Kostadin
Telerik team
 answered on 28 Mar 2013
1 answer
155 views
Hi Friends,

I am having some trouble in radeditor addExternalHandler for safari browser. It seems that the following attached code works fine in IE, but it fails to do so in safari. Help would be much appreciated. Thanks.
<script type="text/javascript">
    function CharactersLimit(editor) {          
 
        var element = document.all ? editor.get_document().body : editor.get_document();
        $telerik.addExternalHandler(element, "blur", function (e) {
            alert('blur');
        });
 
    }
</script>
 
 
    <telerik:RadScriptManager runat="server">
    </telerik:RadScriptManager>
    <telerik:RadEditor ID="Editor1" runat="server" OnClientLoad="CharactersLimit">
    </telerik:RadEditor>


Rumen
Telerik team
 answered on 28 Mar 2013
1 answer
55 views
I am displaying a table in radgrid.The table has 10 columns.when i insert data into table i gave only 5 values.Other values is performing aithmetic opertions.I want to display edit page(.aspx) when i double click the row in radgrid.where should i write the code to perform aithmetic operations.
Shinu
Top achievements
Rank 2
 answered on 28 Mar 2013
8 answers
1.6K+ views
I'm trying to capture the ItemDataBound event to conditionally alter the contents of a GridTemplateColumn. The problem is the code example I found assumes you are altering a standard GridBoundColumn. I actually have two databound fields in my GridTemplateColumn and I don't see a way to update their values. 

Here is my code:
        protected void RadGridSummary_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item.ItemType == GridItemType.AlternatingItem | e.Item.ItemType == GridItemType.Item)
            {
               
                GridDataItem gridItem = (GridDataItem)e.Item;
                if (String.IsNullOrEmpty(gridItem["ReferrerName"].Text) == true)           
                {
                    gridItem["ReferrerName"].Text = "(None)";
                
            }
        }

I can only reference the name of the GridTemplateField "Referrer" and I don't know how to access the 2 data bound columns using the object model. Here is my ASPX code:

<telerik:GridTemplateColumn UniqueName="Referrer"                     SortExpression="ReferrerName" HeaderText="Referrer / Keyword">
                    <HeaderStyle Width="150px"></HeaderStyle>
                    <ItemStyle Height="35px"></ItemStyle>
                    <ItemTemplate>
                        <span class="gridItemText">
                            <%# DataBinder.Eval(Container.DataItem, "ReferrerName") %>
                        </span>
                        <br />
                        <span class="gridItemTextAlt">
                            <%# DataBinder.Eval(Container.DataItem, "Keyword") %>
                        </span>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>

I want be able to capture the event of the ReffererName field being handled so I can alter its value. I saw another example that showed updating a checkbox in another field by using it's control collection, but I did not see how this could be applied to the GridTemplateColumn. Here is the original article I found which shows how to update a regular field:
http://www.telerik.com/help/aspnet/grid/radgrid-telerik.webcontrols.radgrid-itemdatabound_ev.html


Any help would be greatly appreciated!

Thanks,
Levi
Mahdy
Top achievements
Rank 1
 answered on 28 Mar 2013
1 answer
58 views

Dear sir ,
Radlist view edit template example on Telerik database on customerphotos table shows the following fields

Name:
Title:
City:
Country:
Phone:


my question is how do I add the address field( in design time) to be shown and edited ,updated or even inserted in the Radlistview templates

note that I show and update the photo too

============================
what i did is reconfiguring the sqldatasource and added the field address from customerphotos
then i added in design time in edititemtemplate a binded textbox to that field but when i press update after writing in the address field and selecting an image ,I got the following error

Parameter '@Photo' exceeds the size limit for the sql_variant datatype.

Andrey
Telerik team
 answered on 28 Mar 2013
0 answers
139 views
Hi all

There are tow questions regards this requirement:

1- I am trying to open a user control in edit form mod , in user controls i have used footable  (reference Link themergency.com/footable/) with asp gridview. footable functionality not working with in user control, if I simply open  that control at another page other than in line edit form user control in radgrid footable workng correctly , is there any conflict between telerik and other jquery plugins ...?

2 - I want to make Telerik radgrid as behave as footable  (refrence Link http://themergency.com/footable-demo/demo.htm) please help if possible


Thanks
Saquib
Top achievements
Rank 1
 asked on 28 Mar 2013
1 answer
122 views
The text for the radButton is overlapping the radio button.  Any suggestions?
Princy
Top achievements
Rank 2
 answered on 28 Mar 2013
1 answer
85 views
In RadTreeList inside the tree list
<telerik:TreeListTemplateColumn HeaderText="Cur. Cumulative Claim " HeaderStyle-Width="100px"
                             DataField="EntQnty" UniqueName="EnterQuantity">
                             <ItemTemplate>
                                 <telerik:RadNumericTextBox MaxLength="5" ID="EntQntyId" Width="80px" runat="server"
                                     Text='<%# Bind("EntQnty") %>' onkeydown="return (event.keyCode!=13);" AutoPostBack="true"
                                     FocusedStyle-BackColor="Yellow" AutoCompleteType="Disabled" OnTextChanged="EntQntyId_TextChanged">
                                 </telerik:RadNumericTextBox>
                                 <asp:HiddenField ID="HdnEqnty" runat="server" Value='<%# Bind("PrevCert") %>' />
                                 <asp:HiddenField ID="HdnQuantity" runat="server" Value='<%# Bind("Quantity") %>' />
                             </ItemTemplate>
                         </telerik:TreeListTemplateColumn>
If i enter the radnumerictext box i fire textchanged event that's fire but focus got out . how i set the focus in same text box.
See the attachment .

Thanks Advance,
Mohamed.
Princy
Top achievements
Rank 2
 answered on 28 Mar 2013
1 answer
61 views
I am working on an asp.net web application that uses the 2008 Telerik asp.net ajax library. If I buy the new telerik asp.net ajax library, do I have to update existing code? 
Princy
Top achievements
Rank 2
 answered on 28 Mar 2013
0 answers
102 views
I use 3 control's to update a hierarchy radgrid view
control 1 changed the select column ,like this,
dropdownlist  a,  item 1    :      select   workhour  as p1  from table1
dropdownlist  a , item 2    :       select  workhour*salary as p1  from table1

control 2 and 3  do not  change the  select column
all of the 3 control are in  ajaxmanager , like this....
all of the 3 control autopostback is true ,  and called  RadGrid1.MasterTableView.Rebind()  method;
~~~~~~~~~~~~~
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="rbl1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                            <telerik:AjaxUpdatedControl ControlID="rbl1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="cbl1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                            <telerik:AjaxUpdatedControl ControlID="cbl1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>


~~~~~

the problem is :  if I don't  use  aggregate column to sum  the column,   it works  fine,

if I use aggregate column  to sum the column ,  when I change control 1 ,  It will report an error   at   Rebind() method.

protected void RadGrid1_Rebind(object sender, EventArgs e)
        {
            RadGrid1.MasterTableView.Rebind();
        }

when I change control 2 , 3 , it works fine too....


I cannot find the way .......

(Hope someone can understand what I'm saying)

update:

I found the reason ,
dropdownlist a, item 1 : select workhour as p1 from table1 ,   workhour is   decimal  type
dropdownlist a , item 2 : select cast(workhour*salary as int)  as p1 from table1,  workhour*salary   is  int  type.....


I use Numericrow ,and format it to {0:G0}
it works fine
Fei
Top achievements
Rank 1
 asked on 28 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?