Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
217 views
Does anyone know how to add HTML to the subject so a user can click on it?

Inserting HTML code in the database and returning it to the scheduler does not do anything other than display the HTML.

What am I missing. Any help or assistance is appreciated.



Sincerely,
David Tenney
http://www.dcasi.com
http://www.pctechworld.com
http://www.pctwusa.com
T. Tsonev
Telerik team
 answered on 25 Mar 2010
1 answer
243 views

I'm using LLBL DataCollections to bind to the grid which always works perfect. Is there a way to get the instance of the row as the data object entity that it holds? The only alternative I see is looping the values. Thanks!

 


void rgSystemSettings_EditCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)      
{     
   ((MyDataEntity)e.Item.DataItem).Save();     
}     
    
      
    
protected void rgSystemSettings_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)      
      
{     
   MyDataCollection col = new MyDataCollection();      
   col.GetMulti(null);      
   rgSystemSettings.DataSource = col;     
    
} 
Pavlina
Telerik team
 answered on 25 Mar 2010
2 answers
606 views
Hi,

I have a RadTextBox on my page.
Using radTextBox.Attributes.Add("Key", "Value") I add some value i need to the control.

I've been looking for a way where i can get that value in the ClientEvent OnTextChanged.
The sender in the OnTextChanged-event (which is the RadTextBox i believe) doesn't have a method like get_attribute.

Is there some other way to access this attribute client-side?

Kind regards,
Roel
Princy
Top achievements
Rank 2
 answered on 25 Mar 2010
1 answer
126 views

Hi,
Here i got the error..
How to solve it??? Need urgently..

Line 20: <system.web>
Line 21: <httpRuntime maxRequestLength="200000" executionTimeout="300"/>
Line 22: <siteMap defaultProvider="MenuXmlSiteMapProvider" enabled="true">
Line 23: <providers>
Line 24: <add name="MenuXmlSiteMapProvider" description="Default SiteMap provider." type="System.Web.XmlSiteMapProvider" siteMapFile="~/demos_platform-specific/aspnet20/navigation_architecture/web.sitemap" securityTrimmingEnabled="false"/>

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

Thanks
Bibi
Pero
Telerik team
 answered on 25 Mar 2010
4 answers
674 views
Hi

I know we can create a argument assign the value we have to pass to the parent window from the modal popup, but is there a way where we can pass more than one values as arguments to the parent page?

Following is the code i am using now:

In the parent page:
function OnSelectCodePopUpClose(oWnd, args) {
        
            var arg = args.get_argument();
            if (arg) {
                var returnText = arg.returnText;
            }

In the rad window popup page:

 function closewin() {
        var oArg = new Object();
        oArg.returnText = document.getElementById("<%= HdnTxt.ClientID %>").value;
        // I want to pass two other values back to the other page.
// Is there a oArg array or something??
        GetRadWindow().close(oArg);
}

Thanks
Rishi

robertw102
Top achievements
Rank 1
 answered on 25 Mar 2010
1 answer
164 views
Is it possible to have a vertical menu that is hidden on the page unless custom menu image (in top left corner) clicked, then it would slide down where each menu item when hovered over would (potentially, not all items) expand to the right with more sub-menu items.
I'd also like to integrate it with Breadcrumb/ShowPath with it.
When each top menu item hovered - background image would change (different images for submenu items)
And I need all menu items to potentially have an icon of its own.

I'm debating to switch my JSF project to Telerik as too many problems occur with JSF, but I have highly customized menu I'd like to port without much trouble. It would probably also require to set width and height on each menu item to accommodate background images and icons. Also spacings/paddings.

Thank you!
Yana
Telerik team
 answered on 25 Mar 2010
2 answers
212 views
Forgive the length of this post, but I'm attempting to give all relevant details.

I am currently selecting a single row in a grid by using the ClientSettings-ClientEvents-OnRowClick event. I have linked up a JavaScript function that executes when the row is clicked. It saves an ID from the ClientDataKeys property into a hidden field on the page and then "clicks" a hidden button to load another grid with rows matching the ID. (Basically a master-detail situation, but in two separate grids). Here is the JavaScript and C# server-side code that gets executed:

JavaScript
    // Client-side event called by Rad grid when a row is selected.  
    // Gets the Id of the selected profile and saves it in hidden field.  
    function RowSelected(sender, eventArgs)  
    {  
        var hidden = $get("<%=selectedLocationRowId.ClientID %>");  
        hidden.value = eventArgs.getDataKeyValue("Id");  
        // Need to "press button" on page to initiate server-side code  
        var button = $get("<%=btnServerGrid.ClientID %>");  
        button.click();  
    } 

C# - Server-side - exeucted by the "button.click()" line above.
         protected void GetServerData(object sender, EventArgs e)  
         {  
             ServerController sc = new ServerController();  
             List<ServerModel> list = null;  
             string s = selectedLocationRowId.Value;  
             if(!string.IsNullOrEmpty(s))  
             {  
                 list = sc.ListServers(new Guid(s)).ToList();  
             }  
             else 
             {  
                 list = new List<ServerModel>();  
             }  
             rgrdServers.DataSource = list;  
             rgrdServers.Rebind();               
         } 

As you can see, the server-side code retrieves the value from the hidden field and then uses that to get the list from our business layer and then populates the grid.

I also have an Edit column in the primary grid that initiates in-place editing of the row. The user can have a row selected and then choose to press the "Edit" link in the edit column in a different row. This takes the highlight off of the currently selected row and puts the editable row into edit mode, but the secondary grid is not updated with the new "child" rows.

I've been trying to somehow execute the population of the secondary grid from the EditCommand (and a number of other places - like ItemCommand) but can't seem to get the secondary grid to refresh itself with new data. The list is retrieved successfully, but the grid does not update with the new data.

I am using "advanced" databinding with the OnNeedDataSource event. The editing and paging works fine - it's just that I seem to somehow have to execute the JavaScript event for ClientSettings-ClientEvents-OnRowClick in order to get this to work. (I'm guessing here as well. I'm just assuming that executing that client-side code from the server might solve this problem.)

I should also include the definition of the grid with appropriate defined events and such. here it is:
<telerik:RadGrid ID="rgrdLocations" runat="server" AllowPaging="true" 
    AllowFilteringByColumn="false" AllowMultiRowSelection="false" Height="260px" 
    ShowGroupPanel="false" GroupingEnabled="false" 
    ShowHeader="true" Skin="MSGridSkin" EnableEmbeddedSkins="false" 
    OnItemCreated="rgrdLocations_ItemCreated" AutoGenerateColumns="false"   
    Width="786px" onneeddatasource="RadNeedDataSource"   
    onitemdatabound="rgrdLocations_ItemDataBound"   
    AllowAutomaticUpdates="false" 
    onupdatecommand="rgrdLocations_UpdateCommand" 
    oncancelcommand="rgrdLocations_CancelCommand"   
    oneditcommand="rgrdLocations_EditCommand"   
    onitemcommand="rgrdLocations_ItemCommand" 
    ClientSettings-ClientEvents-OnRowClick="RowSelected">  
      
    <ClientSettings AllowDragToGroup="false" Selecting-AllowRowSelect="true" EnablePostBackOnRowClick="true">  
        <Selecting AllowRowSelect="true" /> 
        <Scrolling AllowScroll="false" /> 
        <Resizing AllowColumnResize="false" /> 
    </ClientSettings> 
      
    <PagerStyle Position=Top Mode="NextPrev" AlwaysVisible="true"/>  
    <MasterTableView AutoGenerateColumns="false" PageSize="9" GridLines="Vertical"   
        TableLayout="Fixed" EditMode="InPlace" DataKeyNames="Id" ClientDataKeyNames="Id">  
        <PagerTemplate>                                          
            <table width="100%" cellpadding="0" cellspacing="0" border="0" 
                style="border-top:0px; border-top-color:White;">  
                <tr style="background-color:#e1e6dc; border-top:0px;">  
                    <td align="left" style="height:26px; padding-left:10px;">  
                        <asp:Label ID="lblLocationsHead" runat="server" Text="System Locations" style="font-family:Verdana; font-weight:bold; font-size:11px; color:#666666;">  
                        </asp:Label> 
                    </td>                                                  
                    <td align="right" style="height:26px; padding-right:10px;">  
                        <asp:ImageButton ID="imgPrev" ImageUrl="~/Images/arr_left_cal.gif" runat="server">  
                        </asp:ImageButton> 
                        <asp:DropDownList ID="ddlPager" runat="server">  
                        </asp:DropDownList>                                                  
                        <asp:ImageButton ID="imgNext" runat="server" ImageUrl="~/Images/arr_right_cal.gif">  
                        </asp:ImageButton> 
                    </td> 
                </tr> 
            </table>                                          
        </PagerTemplate> 
 
        <Columns> 
            <telerik:GridTemplateColumn HeaderText="Actions" HeaderStyle-Width="13%" UniqueName="EditColumn">  
                <ItemTemplate> 
                    <asp:LinkButton ID="Edit" CommandName="Edit" runat="server">Edit</asp:LinkButton> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <table cellpadding="0" cellspacing="0" border="0">  
                        <tr style="padding:0px 0px 0px 0px; margin:0px 0px 0px 0px;">  
                            <td style="padding:0px 0px 0px 0px;"><asp:LinkButton ID="Cancel" runat="server" CommandName="Cancel" style="font-size:11px;">Cancel</asp:LinkButton></td>  
                            <td style="color:#CCCCCC; padding:0px 0px 0px 0px;">&nbsp;|&nbsp;</td> 
                            <td style="padding:0px 0px 0px 0px;"><asp:LinkButton ID="Save" runat="server" CommandName="Update" style="font-size:11px;">Save</asp:LinkButton></td>  
                        </tr> 
                    </table> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
 
            <telerik:GridTemplateColumn HeaderText="Building Name" HeaderStyle-Width="38%">  
                <ItemTemplate> 
                    <asp:Label ID="BuildingName" runat="server" Font-Size="10px" Text='<%# Eval("BuildingName") %>'></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:Label ID="BuildingNameEdit" runat="server" Font-Size="10px" Text='<%# Eval("BuildingName") %>'></asp:Label> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
 
            <telerik:GridTemplateColumn HeaderText="System Location" HeaderStyle-Width="23%">  
                <ItemTemplate> 
                    <asp:Label ID="Location" runat="server" Font-Size="10px" Text='<%# Eval("Location") %>'></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:Label ID="LocationEdit" runat="server" Font-Size="10px" Text='<%# Eval("Location") %>'></asp:Label> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
                                                      
            <telerik:GridTemplateColumn HeaderText="Branch Office" HeaderStyle-Width="10%">  
                <ItemTemplate> 
                    <asp:CheckBox ID="BranchOffice" runat="server" Checked='<%# Eval("IsBranchOffice") %>' /> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:CheckBox ID="BranchOfficeEdit" runat="server" Checked='<%# Eval("IsBranchOffice") %>' /> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Country Code" HeaderStyle-Width="7%">  
                <ItemTemplate> 
                    <asp:Label ID="CountryCode" runat="server" Font-Size="10px" Text='<%# Eval("CountryCode") %>'></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:TextBox ID="CountryCodeEdit" runat="server" Font-Size="10px" Width="15" Text='<%# Eval("CountryCode") %>'></asp:TextBox> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Area Code" HeaderStyle-Width="9%">  
                <ItemTemplate> 
                    <asp:Label ID="AreaCode" runat="server" Font-Size="10px" Text='<%# Eval("AreaCode") %>'></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:TextBox ID="AreaCodeEdit" runat="server" Width="45" Font-Size="10px" Text='<%# Eval("AreaCode") %>'></asp:TextBox> 
                </EditItemTemplate>                                              
            </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn DataField="Id" Visible=false ReadOnly="false"></telerik:GridBoundColumn>                                          
        </Columns> 
    </MasterTableView> 
      
</telerik:RadGrid> 


Once again, sorry about the length. Anyone willing to help?

Thanks.
Charles
Top achievements
Rank 2
 answered on 25 Mar 2010
3 answers
195 views
hello,

can i get the sample for telerik Like Search Box with results populated in grid

Regards,
Naga Sridhar madiraju
robertw102
Top achievements
Rank 1
 answered on 25 Mar 2010
17 answers
322 views
After updating my dll with the Q2 version, my custom skins are broken, particularly with the panelbar. On closer inspection, I see many new classes in the panelbar css for the newest versions of the embedable skins, and it looks like the new dll is looking for these new classes when rendering the controls. Is it possible that I can update to Q2 without recreating all of my custom skins (I have dozens)? Help! Help! Help!
Pero
Telerik team
 answered on 25 Mar 2010
9 answers
383 views
Hi everybody,
I want to change my mouse cursor from a beam into a pointing hand (or something like that) when i hover over the rows of the grid, so the user knows he can click on the row to get more info... Saw some C# code, but could not get it to work. I work in VB.NET.

Cheers, Peter.
peter
Top achievements
Rank 1
 answered on 25 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?