Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
90 views
hi all
i have a problem with radgrid , i hope you can help me to solve this problem,
i have event <ClientEvents OnRowClick="hdRowClick" />
when i use javascript . i wrote in page aspx
function hdRowClick(sender,args)
{ ...... }
and event occur , but i want to use RadAjaxManager to solve this event , i wrote a function in code behind (page aspx.cs)
protected void hdRowClick(object sender, Telerik.Web.UI.GridClientEvents args)
{
            txt_hd_mhd.Text = "abc"; // this is my test for event
}
but event did not occur , i think i chose wrong class for args and event did not occur.
could you give me a solution for my problem . additional i want to take the datakey of the row i selected in client and bring it to code behind so that i can retrieve data from database.
thank you all.
lang dinh thien
Top achievements
Rank 1
 answered on 28 Aug 2009
1 answer
100 views
Hello,


    I would like to save the contents to database that are entered in the rad editor as such and reproduce the same
when needed. how should the datatype for saving the rad editor value be defined? Pls tell me the details



Unni
Rumen
Telerik team
 answered on 28 Aug 2009
1 answer
154 views
I am trying to determine a way of hiding my RadGrid until all of the client-side ajax events I am handling are done.  Then show the grid.

Is this possible?

Perhaps I am going about this in a more difficult manner than is needed or perhaps I am accessing the grid in the wrong event but I am trying to accomplish the following:

-Determine the height of a pane when a window is loaded. 
-Based on that pane height, set the grid's PageSize property. 
-I need to capture the pane's height prior to the grid loading so that I can set the pagesize property before this is printed to the screen.

The problem is that the Grid is displayed with the defaults prior to me getting access to the MasterTableView to get or set the pageSize property.

R
Dimo
Telerik team
 answered on 28 Aug 2009
7 answers
310 views
Bold Is always active on my radeditor. Even if i click on the bold button
I use the "Black" skin.

Here is my code :

  <telerik:RadEditor ID="test" OnClientLoad="LimitCharacters"  OnClientPasteHtml="OnClientPasteHtml"  EditModes="Design"  Runat="server" Skin="Black"  Language="fr-FR" width="450px" Height="300px" >
                         <Tools>
                    <telerik:EditorToolGroup >
                    <telerik:EditorTool Name="Cut" />
                    <telerik:EditorTool Name="Copy" />
                    <telerik:EditorTool Name="Paste" />
                    <telerik:EditorTool Name="Indent" />
                    <telerik:EditorTool Name="Outdent" />
                    <telerik:EditorTool Name="Italic" />
                    <telerik:EditorTool Name="Bold" />
                    <telerik:EditorTool Name="Underline" />
                    <telerik:EditorTool Name="JustifyCenter" />
                    <telerik:EditorTool Name="JustifyLeft" />
                    <telerik:EditorTool Name="PasteFromWord" />
                    <telerik:EditorTool Name="InsertOrderedList" />
                    <telerik:EditorTool Name="InsertUnorderedList" />
                    <telerik:EditorTool Name="ForeColor" />
                    <telerik:EditorTool Name="FontSize" />
                    </telerik:EditorToolGroup>
                    </Tools>
                    <Content>
                    
                </Content>
                </telerik:RadEditor>

How can i resolve this ?

I tried to place it in a <div style="font-weight:normal"> but it's not working.
Rumen
Telerik team
 answered on 28 Aug 2009
4 answers
115 views
Hi,

I am using RadMenu inside RadPanelbar. Everything is working fine for EI 7 and IE 8. However, I have a problem when the application is running in IE 6. Here is what is happening... Everything is looking good when I first lunch the application. I can use the menu to go from one page to another just fine. However, as soon as I click on the browser's Back button, it seems like the panelbar takes priority over the menu. I just assume this is what is happening because the menu items have the style of the panelbar items and they do not expand.  It makes impossible to use the menu. 

Could you please advice what should be done so it would work in all the browser versions started with IE 6?

 Here is my code:

<%@ Control Language="C#" AutoEventWireup="true" Codebehind="NavigationUC.ascx.cs" 
    Inherits="WWR.Web.eFirmNet.UI.UserControls.NavigationUC" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<style type="text/css">
    .RadPanelBar,
    .RadPanelBar .rpSlide,
    .RadPanelBar .rpGroup,
    .RadPanelBar .rpTemplate
    {
        overflow:visible !important;
    }

    div.RadPanelBar .rpLevel1 .rpItem
    {
        padding:0;
    }
   
    div.RadMenu .rmRootGroup
    {
        border: 0;
    }
   
    div.RadMenu .rmLink
    {
        float: none;
    }
</style>

<div style="padding-top: 10px;">
    <table border="0" cellpadding="0" cellspacing="0" width="182">
        <thead>
            <tr>
                <th class="leftZonePartTitleStyle" colspan="1"></th>
            </tr>
        </thead>
        <tr>
            <td class="leftZone">
                <telerik:RadPanelBar ID="RadPanelbar1" runat="server"
                        Width="100%" EnableViewState="false">
                    <Items>
                        <telerik:RadPanelItem Text="Perfect Practice" runat="server" Expanded="True" Width="100%">
                            <Items>
                                <telerik:RadPanelItem runat="server">
                                    <ItemTemplate>
                                        <telerik:RadMenu ID="rmPerfectPractice" Width="99%" Flow="Vertical" runat="server"
                                                 EnableViewState="false">
                                            <Items>
                                                <telerik:RadMenuItem Text="Exports">
                                                    <Items>
                                                        <telerik:RadMenuItem Text="ValidZone Invoices" NavigateUrl="~/perfectPractice/Export/ValidZoneInvoice.aspx">
                                                        </telerik:RadMenuItem>
                                                    </Items>
                                                </telerik:RadMenuItem>
                                                 <telerik:RadMenuItem Text="Reports">
                                                    <Items>
                                                        <telerik:RadMenuItem Text="PP to DW Exceptions" NavigateUrl="~/perfectPractice/Reports/Exceptions.aspx">
                                                        </telerik:RadMenuItem>
                                                    </Items>
                                                </telerik:RadMenuItem>
                                            </Items>
                                        </telerik:RadMenu>
                                    </ItemTemplate>
                                </telerik:RadPanelItem>
                            </Items>
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="Need Help?" runat="server" Expanded="True" Width="100%">
                            <Items>
                                <telerik:RadPanelItem runat="server">
                                    <ItemTemplate>
                                        <telerik:RadMenu ID="rmHelp" Width="99%" Flow="Vertical" runat="server"
                                                 EnableViewState="false">
                                            <Items>
                                                <telerik:RadMenuItem Text="eFirmNet Help" NavigateUrl="~/Default.aspx?page=help">
                                                </telerik:RadMenuItem>
                                            </Items>
                                        </telerik:RadMenu>
                                    </ItemTemplate>
                                </telerik:RadPanelItem>
                            </Items>
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelBar>
            </td>
        </tr>
    </table>
</div>

Thank you,
Tatiana

DW Web Team Member
Top achievements
Rank 2
 answered on 28 Aug 2009
2 answers
127 views
Hello

Scenario:
Using Masterpage and Contentpage. Contentpage calls Masterpage to open a different masterpage in a Radwindow.

I get the following errormessage:
Serverfehler in der Anwendung /.  
--------------------------------------------------------------------------------  
 
Dieser Seitentyp wird nicht verarbeitet.   
Beschreibung: Der angeforderte Seitentyp wird nicht verarbeitet, da er ausdrücklich verboten ist.  Die Erweiterung ".master" ist möglicherweise falsch.   Ãœberprüfen Sie den unten angegebenen URL, und stellen Sie sicher, das er richtig geschrieben wurde.   
 
Angeforderter URL: /member/rw_select_supplier.master  
 
 
--------------------------------------------------------------------------------  
Versionsinformationen: Microsoft .NET Framework-Version:2.0.50727.3082; ASP.NET-Version:2.0.50727.3082  

Question:
Is it possible to load a "xyz.master" page in a RadWindow?

Guess:
A Masterpage can not be loaded in a Radwindow. Am i right?


TIA
Markus
Markus
Top achievements
Rank 1
 answered on 28 Aug 2009
4 answers
131 views
I have untill now been using the

TreeNodeExpandMode

 

.ServerSide expend mothod.

I have also a button that deletes nodes from my treeview.
It works fine as long as i use ServerSide expend mode.

This is my code:

 

protected

 

void Page_Load(object sender, EventArgs e)

 

{

    LoadRootNodes(catTreeView,

TreeNodeExpandMode.ServerSide);

 

}

 

 

protected

 

void NodeExpand(object sender, RadTreeNodeEventArgs e)

 

{

 

if (e.Node.Nodes.Count == 0)

 

PopulateNodeOnDemand(e,

TreeNodeExpandMode.ServerSide);

 

}

 

 

protected

 

void uxDeleteCategory_Click(object sender, EventArgs e)

 

{

 

LinkButton thisButton = (LinkButton)sender;

 

 

RadTreeNode thisNode = (RadTreeNode)thisButton.Parent;

 

 

int usedTimes = int.Parse(((Label)thisNode.FindControl("itemsCount")).Text);

 

 

if (thisNode.Nodes.Count == 0 && usedTimes == 0)

 

{

DeleteCategory(thisNode.Value);

thisNode.Remove();

}

 

else

 

message1.Message =

"Cannot delete this item!";

 

}

 

 

<

 

asp:LinkButton OnClientClick="return blockConfirm('Are you sure you want to delete this?', event, 330, 100,'','Delete Category');"

 

 

ID="deleteCategoryButton" OnClick="uxDeleteCategory_Click" runat="server" Text='<%$Resources:Delete %>'></asp:LinkButton>

 

 

 


The methods that populate and delete the actual items from the database are not included but are simply methods with linq code to do the required work.

Also, as you can see the delete is a simple link button, that causes a post back. And that is where the problem comes in.
As soon as i change my code to ServerSideCallBack expend method, i can no longer delete anything bellow the root in my treeview.
I can delete in the root because the root nodes are reloaded with the post back, but the other nodes are not.

I gather that i need to do my deleting in some different way when using ServerSideCallBack, can anyone tell me how i would go about that?

Thanks

A

 

Vesko
Top achievements
Rank 2
 answered on 28 Aug 2009
1 answer
190 views
 <telerik:RadGrid ID="dgAddCart" runat="server" AllowPaging="True" PageSize ="15" DataSourceID="SqlDataSource1"
                   GridLines="None" Skin="Black" HeaderStyle-Font-Bold ="true"  >
                    <ClientSettings>
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="335px" />
                        <Resizing AllowColumnResize="true" AllowRowResize="false" ResizeGridOnColumnResize="false"
                            ClipCellContentOnResize="true" />
                    </ClientSettings>

<telerik:GridBoundColumn DataField="Proposal_ID" HeaderText="Proposals"
                                SortExpression="Proposal_ID" UniqueName="Proposal_ID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EstTrials" DataType="System.Int32" FooterText="Total : "  Aggregate = "Sum"
                                HeaderText="Trials" SortExpression="EstTrials" UniqueName="Trials :">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EstCost" DataType="System.Decimal" Aggregate="Sum"
                               DataFormatString ="{0:c}"  HeaderText="Cost" SortExpression="EstCost" UniqueName="Cost :">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CropName" HeaderText="CropName" Display = "false"
                                SortExpression="CropName" UniqueName="CropName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ProdName" HeaderText="ProdName" Display = "false"  
                                SortExpression="ProdName" UniqueName="ProdName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TerritoryName" HeaderText="TerritoryName" Display = "false"
                                ReadOnly="True" SortExpression="TerritoryName" UniqueName="TerritoryName">
                            </telerik:GridBoundColumn>
                            <telerik:GridButtonColumn ButtonType ="ImageButton" ImageUrl ="images/Delete.gif" HeaderText ="Remove">
                                          
                            </telerik:GridButtonColumn>

 <GroupByExpressions >                       
                        <telerik:GridGroupByExpression>                       
                        <SelectFields>
                        <telerik:GridGroupByField FieldName ="ProdName"
                                                  HeaderText ="Product"
                                                 
                                                  HeaderValueSeparator = " : " />
                        </SelectFields>         
 <GroupByFields >
                       <telerik:GridGroupByField FieldName ="ProdName"  />
                        <telerik:GridGroupByField FieldName ="TerritoryName" />
                        <telerik:GridGroupByField FieldName ="CropName" />
                        </GroupByFields>
                        </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                    </mastertableview>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
                    ConnectionString="<%$ ConnectionStrings:GowanKB2ConnectionString %>"
                   
                    SelectCommand="SELECT [Proposal_ID], [EstTrials], [EstCost], [CropName], [ProdName], [TerritoryName] FROM [QryProposalGrpWithPests]"
                    ProviderName="<%$ ConnectionStrings:DevProviderName %>">
                </asp:SqlDataSource>



How to set this propery throught code behind. Its very urgent help me ?


I am most thankfull Princey
Thanks
Regards
Rahul Mahajan


Princy
Top achievements
Rank 2
 answered on 28 Aug 2009
3 answers
281 views

Hi,
I have two listbox controls both having SelectionMode="Multiple". First one is populated from object data source. Selecting an item in the first listbox causes the SelectedIndexChanged event to fire, where I populate the second one and select all items in it. Then I select an item in the second listbox in a browser and click a button (or cause any other postback). After that all items in the second listbox are selected again. I've found two ways to select something other than all items.
1. Selecting items while holding ctrl key seems to work, but it's not very handy.

2. In the second listbox moving the scrollbar, selecting an item and then causing postback gets all items unselected (even the one just selected). Then selecting works as expected.

here is my asp sample:

<div style="float: left; width: 150px">  
    <asp:Label ID="_lblBrokerLabel" runat="server" Text="PoÅ›rednik:" /><br />  
    <telerik:RadListBox ID="_rlbBrokers" runat="server" DataSourceID="_odsBrokers" DataTextField="Name"  
        DataValueField="ID" Skin="Default" AutoPostBack="true" CausesValidation="false"  
        SelectionMode="Multiple" OnSelectedIndexChanged="BrokersChanged" Height="200" />  
    <asp:RequiredFieldValidator ControlToValidate="_rlbBrokers" Text="*" ID="_rfvBrokers"  
        runat="server" />  
    <asp:ObjectDataSource ID="_odsBrokers" runat="server" SelectMethod="GetUserBrokers"  
        TypeName="Ewita.Model.Entities">  
        <SelectParameters>  
            <asp:Parameter Name="userId" Type="Int32" />  
            <asp:Parameter Name="activeOnly" Type="Boolean" DefaultValue="False" />  
        </SelectParameters>  
    </asp:ObjectDataSource>  
</div>  
<div style="float: left; width: 150px">  
    <asp:Label ID="_lblWarehouseLabel" runat="server" Text="Magazyny:" /><br />  
    <telerik:RadListBox ID="_rlbWarehouses" runat="server" DataValueField="ID" Skin="Default"  
        SelectionMode="Multiple" Height="200">  
        <ItemTemplate>  
            <asp:Panel CssClass='<%# (bool)Eval("Active")?"":"inactive" %>' ID="_pnlWarehouse"  
                runat="server">  
                <%# Eval("Name") %>  
            </asp:Panel>  
        </ItemTemplate>  
    </telerik:RadListBox>  
    <asp:RequiredFieldValidator ControlToValidate="_rlbWarehouses" Text="*" ID="_rfvWarehouses"  
        runat="server" />  
</div> 

and here is code behind

        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (IsPostBack) return;  
            var user = (User)Session["user"];  
            _odsBrokers.SelectParameters["userId"].DefaultValue = user.ID.ToString();  
        }  
 
        protected void BrokersChanged(object sender, EventArgs e)  
        {  
            var warehouses = new List<Warehouse>();  
            var user = (User)Session["user"];  
            foreach (var item in _rlbBrokers.SelectedItems)  
            {  
                int brokerId;  
                if (!int.TryParse(item.Value, out brokerId)) continue;  
                warehouses.AddRange(Entities.Instance.GetUserWarehouses(brokerId, user.ID, false));  
            }  
            _rlbWarehouses.DataSource = warehouses;  
            _rlbWarehouses.DataBind();  
            foreach (RadListBoxItem item in _rlbWarehouses.Items)  
            {  
                item.Selected = true;  
            }  
        } 

I checked this issue on Opera and Firefox browsers. I'm using .net 3.5, visual studio 2008 and Telerik RadControls for ASP.NET Ajax v. 2009.2.701.35

Thanks in advance.

Regards
Paweł Aszklar

Genady Sergeev
Telerik team
 answered on 28 Aug 2009
1 answer
139 views
Hi, 

I have a grid call RadGridArea, in the PreRender event, I need to set the grid into edit mode in the
page load.  But I want to set the focus to an aspTextBox control.

How can I do? please help.

    protected void RadGridArea_PreRender(object sender, EventArgs e)
    {
        PropertyArea projarea = new PropertyArea();
        DataTable dt = projarea.GetPropertyAreaByPropertyId(this.property_id);

        if (dt.Rows.Count == 0)
        {
            for (int i = 0; i < this.RadGridArea.Items.Count; i++)
            {
                this.RadGridArea.MasterTableView.Items[i].Edit = true;
            }
            this.RadGridArea.Rebind();
        }

        if (!Page.IsPostBack)
        {
            string s = "<script type='text/javascript'>document.getElementById('" + this.txtPropertyName.ClientID + "').focus();</script>";
            ClientScript.RegisterStartupScript(Page.GetType(), Guid.NewGuid().ToString(), s, false);
        }
    }

The above coding is not work.

Regards,

Paul

Shinu
Top achievements
Rank 2
 answered on 28 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?