Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
190 views

Hi,

Is it possible to update the value of all rows in a column.
Say, my grid is as displayed below

Name                                        A                                            B

Test1                                    valueA1                                    valueB1
Test2                                    valueA2                                    valueB2
Test3                                    valueA3                                    valueB3
                    Bulk Update      Textbox1  UpdateButton1           Textbox2 UpdateButton2

Here Columns A and B will be having textboxes. Now when i enter the value in the bulkupdate Textbox1 and click on UpdateButton1, all the textboxes in columnA should be updated with the value in the Textbox1.

Thanks

VS
Top achievements
Rank 1
 answered on 21 Apr 2009
2 answers
110 views
Hi

I have implemented the RadEditor with the spellchecker successfully into my webpage as described in the help … all works ok.

The problem is I don’t want all the buttons in the toolbar so I add a tools section (see below).

<Tools>
   <telerik:EditorToolGroup>
      <telerik:EditorTool Name="FontName" />
      <telerik:EditorTool Name="FontSize" />
      <telerik:EditorTool Name="ForeColor" />
      <telerik:EditorTool Name="Bold" />                
      <telerik:EditorTool Name="SpellCheck" />
   </telerik:EditorToolGroup>
</Tools>

When I do that I only get the buttons I want but the SpellCheck no longer works. I get a ‘The command SpellCheck is not implemented yet’ error. The icon is also missing for the spell check button.

What else do I need to do to get the spell check to work again?

Johan
Top achievements
Rank 1
 answered on 21 Apr 2009
2 answers
138 views
Hi

Is it possible to attach a ToolTip to a row in the RadGrid?

I know this question has been asked around here before but I did not seem to find any answer.
Jeppe
Top achievements
Rank 1
 answered on 21 Apr 2009
5 answers
200 views
I've got a RadGrid that uses an object collection as it's datasource.  Each object/row has it's own collection of objects.  When I display the grid I just display the first item in the sub-collection.  So, for example, I have a grid of people.  Each row is a person.  Each person has a collection of addresses.  In the "Address" column I have a Label, which I use to put the first address in the collection of addresses (using the OnItemCreated event).  How do I specify the SortExpression so that I can sort this grid on the address displayed? 

Here's my OnItemCreated method:
protected void RadGrid_ItemCreated(object sender, GridItemEventArgs e)     
{     
    Person p = (Person) e.Item.DataItem;     
    if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)     
    {     
        Label lblAddress = (Label) e.Item.Cells[4].FindControl("lblAddress");     
        if (p.Addresses != null)     
        {     
            if (p.Addresses.Count > 0)     
            {     
                Address address = p.Addresses[0];     
                lblAddress.Text = address.StreetNumber.Trim() + " " + address.StreetName.Trim() + " " +     
                                  address.AptNumber.Trim();     
            }     
        }     
    }     
}   

Thanks!

Eddie
Juan Angel
Top achievements
Rank 1
Veteran
 answered on 20 Apr 2009
3 answers
223 views

Is there a problem with sorting Template Column?
I bind the grid to Anonymus Type on codebehind 
Sorting any other column GridBoundColumn  or GridDateTimeColumn
works fine.
please advise......
below is my code.

 
 
<telerik:GridBoundColumn DataField="rs.ReqServiceID" SortExpression="rs.ReqServiceID" HeaderText="ServiceID"/>  
 
 
 
<telerik:GridDateTimeColumn DataField="rs.DateFollowup" SortExpression="rs.DateFollowup" HeaderText="Followup Date" Groupable="true" Aggregate="Min" DataType="System.DateTime" FilterListOptions="VaryByDataType" HeaderStyle-Width="140" DataFormatString="{0:g}"/>  
 
 
 
 
<telerik:GridTemplateColumn HeaderText="User" SortExpression="rs.UserName" DataField="rs.UserName" UniqueName="rs.UserName">  
 
<ItemTemplate> 
 
<asp:Image ImageUrl="~/images/service_edit.png" Visible='<%#IIF(Eval("rs.UserName")<>"", "true","false")%>' ID="imgUserName" runat="server" ImageAlign="AbsBottom"/>&nbsp;<%#Eval("rs.UserName")%> 
 
</ItemTemplate> 
 
</telerik:GridTemplateColumn> 
 
Juan Angel
Top achievements
Rank 1
Veteran
 answered on 20 Apr 2009
2 answers
139 views
Dear Telerik:

I am using build 2009.1.311.35.  I have a Web application containing a RadGrid with a UserControl edit form as follows:

<EditFormSettings CaptionDataField="ID" CaptionFormatString="Edit Form for Case {0}" EditFormType="WebUserControl" UserControlName="EditForm.ascx"></EditFormSettings> 
 

I discovered that the UserControl requires the presence of the code-behind to work!  The edit form works fine when I browse the page from Visual Studio.  However, if I removed the UserControl's code-behind file or if I deployed the application without the code-behind file, I got the following error:

Message: Sys.WebForms.PageRequestManagerServerErrorException: The file '/webtest/EditForm.ascx.cs' does not exist.  
 
URI: http://localhost:88/webtest/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3bbfe379-348b-450d-86a7-bb22e53c1978%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.1.311.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3ae7ad36d2-e9ec-4737-9fbd-fcc9c464e2bd%3a16e4e7cd%3aed16cbdc%3a58366029%3af7645509%3a24ee1bba%3a1e771326%3aaa288e2d%3ae330518b%3ac8618e41%3ae4f8f289  
 
 

The error is also returned if the application uses a post-back instead of an Ajax call.  Since we are not able to deploy the code-behind file in production, any information you can provide to help troubleshoot this issue would be appreciated.

Thanks,

-Yen

Yen
Top achievements
Rank 1
 answered on 20 Apr 2009
9 answers
302 views
I'm getting two errors in very specificfic situations when using grids in our application.

1. unterminated string constant
2. Expected ')'

These errors occur in quick succession when I insert a single quote (') character into some form field, have that saved to the database, and then load it back into the grid control.

The thing is the data displays just fine, its just these two errors will show up when a grid containing an item, that contains a single quote character, shows up. As far as I can tell this is a Telerik grid control bug of some kind, has anyone else had this problem (I would gather this would be a common situation)? If not, is there something I'm missing in properly setting up the grids etc to handle single quote characters?

I am using the Telerik 2008 Q1 AJAX ASP.NET controls (trial), this also occurred in the 2007 Q4 controls, I upgraded, hoping this issue would get fixed, but also to have latest and greatest :)

Thanks.
Daniel
Telerik team
 answered on 20 Apr 2009
8 answers
439 views
Hello,
     my problem is as follows. we have several webpages, some of them hosting radgrids. above these grids that display data we have radtoolbars. in the toolbar, we created an Export to Excel Icon, that when clicked, Excel window should open and display the data format of the grid.

the results are awckard. when the button is clicked, the Grid itself goes into an Excel type format, it removes the checkedboundfields (as expected). but stays displayed on the page itself.

no new window opens. the grid doesn't stay in its current form (instead displays like an Excel form)  we have office 2007. Code using is as follows.

                    Gridview1.ExportSettings.ExportOnlyData = true;
                    Gridview1ExportSettings.OpenInNewWindow = true;
                    Gridview1.ExportSettings.FileName = "RulesExport";
                    Gridview1.MasterTableView.ExportToExcel();

when the Export to Excel button is clicked, the grid does not expand and fill the page, it stays in its current height and width. the columns change as it would if it were going to excel, but does not. no new window opens.

any suggestions to this?
Daniel
Telerik team
 answered on 20 Apr 2009
1 answer
205 views
I have a 3 level hierarchical grid where I use editforms as my edit mode. In the edit form, I have a gridtemplatecolumn which has a lookup icon and when I click on it, I open a radwindow so the user can choose a name from a list of about 5000 names. I open this window from a client handler for the icon. On close of the window, the name and id is returned, and I need to set one of the grid item template textboxes with this name. The gridtemplate column is:
<telerik:GridTemplateColumn UniqueName="feedName" HeaderText="Feed name" DataField="feed_name"
                                     <ItemTemplate> 
                                      <asp:Label ID="feed_nameLabel"   runat="server"  Text='<%#Eval("feed_name") %>'></asp:Label> 
                                     </ItemTemplate> 
                                     <EditItemTemplate> 
                                         <telerik:RadTextBox ID="feed_name" runat="server" Enabled="false" Width="175px" 
                                                    ToolTip="Click on lookup icon to choose from sources" Text = '<%# Eval("feed_name") %>'
                                                </telerik:RadTextBox> 
                                            
                                                 
                                                <asp:ImageButton ID="sourceLookUpButton" runat="server"  
                                                    AlternateText="Click to choose feed name" ImageUrl="~/Images/Lookup1.gif"  
                                                    OnClientClick="openSourceWindow(); return false;"  
                                                    ToolTip="Click to choose source"  /> 
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server"  
                                                    ControlToValidate="feed_name" Display="Dynamic" ErrorMessage="* required"  
                                                    ForeColor="#003DEB" SetFocusOnError="true"  
                                                    ValidationGroup="FeedValidationGroup"></asp:RequiredFieldValidator> 
                                                  
                                      
                                     </EditItemTemplate> 
                                    </telerik:GridTemplateColumn> 

I found an example here that creates a script onitemcreate, and calls that script on the close of the window. It is giving me an error when calling the scipt. The code I use in the itemCreated handler is:
if (e.Item is GridEditableItem && e.Item.IsInEditMode && e.Item.OwnerTableView.Name == "FeedTableView"
        { 
            if (e.Item.OwnerTableView.IsItemInserted) // item is about to be inserted 
            { 
                GridEditableItem editableItem = (GridEditableItem)e.Item; 
                RadTextBox feedName = (RadTextBox)editableItem["feedName"].FindControl("feed_name"); 
                string script = String.Format("GetFeedNameID = '{0}';\n",  editableItem["feedName"].FindControl("feed_name").ClientID); 
                ClientScript.RegisterClientScriptBlock(Page.GetType(), "mykey", script, true); 
                RadAjaxPanel1.ResponseScripts.Add(script); 
            } 
        }   
When it runs, I debug this line:
 string script = String.Format("GetFeedNameID = '{0}';\n",  editableItem["feedName"].FindControl("feed_name").ClientID);
which gets the clientID of a gridtemplatecolumn

it and see that the script gets set with the value:
 "GetFeedNameID = 'providersGrid_ctl00_ctl09_Detail20_ctl09_Detail20_ctl02_ctl04_feed_name';\n"


In the client in the radwindow onclientclose handler, I call:
function OnClientSourceClose(oWnd) { 
 
             var txtbxSourceName; 
             var txtbxSourceID; 
             if (oWnd.argument.returnCode == 0)  // if returnCode is 0, user cancelled - don't change anything 
                 return
 
             if (oWnd.argument.returnCode == -1) // user pressed clear - clear out values 
             { 
                 txtbxSourceName = $find("source_name"); 
                 txtbxSourceName.set_value(""); 
                 txtbxSourceID = $find("source_id"); 
                 txtbxSourceID.set_value("-1"); 
                 return
             } 
             //get the transferred arguments 
             var source_name = oWnd.argument.sourceName; 
             var sourceId = oWnd.argument.sourceID; 
 
             $get(GetFeedNameID).innerHTML = source_name;   
         } 

The last statement $get(GetFeedNameID).innerHTML = source_name; is calling the script
and it It throws the error: htmlfile: Unknown runtime error

What am I doing wrong?


Laura
Top achievements
Rank 1
 answered on 20 Apr 2009
2 answers
44 views

I created a custom tool button for my Rad editor, and the button functions properly.  I also added the following code for the icon for the button:

<style type="text/css">  
    .reToolbar.Vista .MySymbols  
        {  
            background-image: url("../img/rt_icon.gif")!important;  
        }  
</style> 

However, while the icon/button show up properly in design mode of VS2005, when I run the page in IE7 I only see all the other standard toolbar buttons and my button with a small "i" in the bottom right corner.

Might someone be able to help me know what I'm missing?

Thanks!

Michael

Michael
Top achievements
Rank 1
 answered on 20 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?