Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
165 views
Hi,

We have a RadComboBox with search capability.  Here is the declaration:

<telerik:RadComboBox ID="ddlCustomerSearch" runat="server" AutoPostBack="true" Width="200px"
                                Height="150px" EnableLoadOnDemand="True" Skin="AsiSkin"  EnableEmbeddedSkins="false"
                                EnableVirtualScrolling="true" AllowCustomText="false"  MarkFirstMatch="true"
                                OnItemsRequested="ddlCustomerSearch_ItemsRequested"           OnClientSelectedIndexChanged="ToggleHiddenElements" OnClientLoad="CheckSelectedCustomer"
                                OnSelectedIndexChanged="CustomerSearch_OnSelectedIndexChanged" EmptyMessage="Enter or Select Customer">
                            </telerik:RadComboBox>

As you see, this dropdown has empty message property setup.  The issue is, when users remove previous selection from dropdown, empty message appears, but SelectedIndexChanged event does not fire (actually I do not think that in this case dropdown does any postback).  As a result, we do not know that user changed selection...

As a result
Simon
Telerik team
 answered on 15 Sep 2010
1 answer
76 views
If I have a dragable node on a RadTree is it possible to check the x/y location of where the node is dropped in respect to a panel?

So if I have a panel containing tree A, plus some other controls, I just want to know if the node I have dragged from tree B is over the panel containing tree A possibly changing the background colour of the panel to show that the node is over an area that it can be released?

I have tried using the following code to test the possibility out, but the domEvent.offsetX seems to keep changing what it is measuring from as I move it around.

<script type="text/javascript" language="javascript">
  
    function findPosX(obj) {
        var curleft = 0;
        if (obj.offsetParent)
            while (1) {
                curleft += obj.offsetLeft;
                if (!obj.offsetParent)
                    break;
                obj = obj.offsetParent;
            }
        else if (obj.x)
            curleft += obj.x;
        return curleft;
    }
  
    function findPosY(obj) {
        var curtop = 0;
        if (obj.offsetParent)
            while (1) {
                curtop += obj.offsetTop;
                if (!obj.offsetParent)
                    break;
                obj = obj.offsetParent;
            }
        else if (obj.y)
            curtop += obj.y;
        return curtop;
    }
  
    function ClientNodeDragging(sender, eventArgs) {
        var domEvent = eventArgs.get_domEvent();
        var node = eventArgs.get_node();
        var MyPanel;
        if (document.getElementById('<%= leftPanel.FindControl("pnlPositionSelector").ClientID %>') != null) {
            MyPanel = document.getElementById('<%= leftPanel.FindControl("pnlPositionSelector").ClientID %>');
            node.set_text("Dragging X:" + domEvent.offsetX + " Y:" + domEvent.offsetY + " target XPos=" + findPosX(MyPanel) + " target YPos=" + findPosY(MyPanel));
        }
        else {
            node.set_text("Dragging X:" + domEvent.offsetX + " Y:" + domEvent.offsetY);
        }
        //MyPanel.style.height = NewHeight + "px";
        //MyPanel.style.width = NewWidth + "px";
  
  
  
    }
</script>
T. Tsonev
Telerik team
 answered on 15 Sep 2010
1 answer
93 views
Hi,

I am working on radgrid  control, having page navigation buttons like <<Prev 1,2,3 ... Next>>
what i want is that, if it is 1st page (or default page), then <<prev button should be disabled or change the background color of button.
if the page is last then Next>> button should be disabled.
naimish
Top achievements
Rank 1
 answered on 15 Sep 2010
8 answers
170 views
I am using VS2010, RadControls for ASP.NET AJAX Q2 2010 with ASP.NET 4.0.

I have the following on my page:
<telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" OnClientFileSelected="onFileSelected" OnClientFileUploaded="onFileUploaded" ReadOnlyFileInputs="true">
</telerik:RadAsyncUpload>

When I load my page, I get an error in IE8 in this function:
 
function
__flash__addCallback(instance, name) {
instance[name] = 
 
function () { return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>"));
}
}

The Call Function is is try to load is this:
<invoke name="setFileFilters" returntype="javascript"><arguments><array></array><false/></arguments></invoke>

I have tried using the latest internal builds as well as this version and it is the same.

What might be the problem?

Daniel Gioulakis
Top achievements
Rank 1
 answered on 15 Sep 2010
2 answers
90 views
I have recently upgrade my controls from to the latest.  The one problem I had was the skins changed from 2008 to 2010.  Is there any way I can get it to appear as the 2008.
thanks.
John Giblin
Top achievements
Rank 1
 answered on 15 Sep 2010
0 answers
75 views
Hi

I am trying to match a panel bar to an existing site design. The Sitefinity skin is the nearest to
what is needed but I need to tweak the background color of the panel, and the size, color, family, of the font
at the group and child level.

I started off with this but it had no effect at all.
.RadPanelBar .rpRootGroup,     
.RadPanelBar .rpRootGroup .rpLink   
{     
     border: none !important;     
     background-color: #FFFFFF !important;
     font-family:Verdana !important;   
     text-decoration: none;   
     border-bottom-width: 0px !important;   
}   
.RadPanelBar .rpOut   
{   
    border-bottom-width: 0px !important;   
}

Maybe the naming convention is different for Q2 2010 version.

Please point me in the right direction!

Thanks

Clive
Clive Hoggar
Top achievements
Rank 1
 asked on 15 Sep 2010
0 answers
99 views
Hi 

I am working with RadSriptManager in web usercontrol. when i use it on my page it give me following error

"A critical error has occurred.
Object reference not set to an instance of an object."

I read some thread about this problem but not found any solution please guide me how i can use this control in DotNetNuke modules. 

Thanks
Mohsin Javed Khan
mohsinjk jk
Top achievements
Rank 1
 asked on 15 Sep 2010
14 answers
306 views
Hello Telerik,

I am using RadGrid and filtering templates functionality to filter the grid. I Used SqlDataSource to bind the respetive filtering combo boxes.
I used the below kind of query to bind the SqlDataSource1
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:EmpConnectionString %>"
                  
                SelectCommand="SELECT DISTINCT Position FROM Employee WHERE (EID IS NULL OR EID = @EID) AND (Deleted = 0) AND (Status = 0)">
                 <SelectParameters>
                     <asp:Parameter Direction="Input" Name="EID" />
                 </SelectParameters>
            </asp:SqlDataSource>

When i run the project and select the item from combo to filter the combo, i am getting the following error "Incorrect syntax near the keyword 'WHERE'." from RefreshCombos function

protected void RefreshCombos()
        {            
            SqlDataSource1.SelectCommand = SqlDataSource1.SelectCommand + " WHERE " + RadEmpList.MasterTableView.FilterExpression.ToString();
 SqlDataSource2.SelectCommand = SqlDataSource2.SelectCommand + " WHERE " + RadEmpList.MasterTableView.FilterExpression.ToString();
            RadEmpList.MasterTableView.Rebind();
        }

I also tried by replacing the sql command by adding procedure for the same query as given below
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:EmpConnectionString %>"
                SelectCommand="proc_GetPositions" SelectCommandType="StoredProcedure">
                 <SelectParameters>
                     <asp:Parameter Name="EID" Type="Int32" />
                 </SelectParameters>
            </asp:SqlDataSource>

But no use, i am getting the error from the same function.
I hope you could understand my doubt, so please helpe me to know how to do filtering functionality with the above related query. It would be more helpful if i could know the result in both ordinary query and Procedure of the above query of SqlDataSource

-Thanks
Chandran Chandran
Top achievements
Rank 1
 answered on 15 Sep 2010
4 answers
147 views
Hi,

I have a question about the following scenario:

I have a hierarchical grid which contains products. Every product has a detail table (the inner grid) with the countries where this product is being sold. Each row in the detailed table represents a different country.

I would like to have a filter which filters by country on top level, meaning that I would set for example a value "France" in that filter and in the grid I would get only the products that are being sold in France (meaning that in their detailed tables they have a row for France).

What approach would you recommend in order to achieve this behavior?

Thanks.

Vladimir
Top achievements
Rank 1
 answered on 15 Sep 2010
3 answers
122 views
Hi,

I have a grid that displays a list of items that when clicked on populates another section with data using the AjaxManager. This works great, the problem is that when I try to incorporate paging of the grid after I select one item it won't let me select another. To incorporate paging I included the grid control in the "UpdatedControls" area of the AjaxManager. When I remove it from the manager my row select functionality returns but it will no longer page my grid data. Below is my sample code, any help would be appreciated.

Thanks,

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="blogPostGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rptImages"></telerik:AjaxUpdatedControl>
                <telerik:AjaxUpdatedControl ControlID="blogPostGrid"></telerik:AjaxUpdatedControl>
                <telerik:AjaxUpdatedControl ControlID="litTitle"></telerik:AjaxUpdatedControl>
                <telerik:AjaxUpdatedControl ControlID="litDate"></telerik:AjaxUpdatedControl>
                <telerik:AjaxUpdatedControl ControlID="litContent"></telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
  
<div class="blogBox">
    <div class="blogContent">
        <div class="blogTitle"><asp:Literal ID="litTitle" runat="server"></asp:Literal></div>
        <div class="blogDate"><asp:Literal ID="litDate" runat="server"></asp:Literal></div>
        <div class="blogText blogTextLess"><asp:Literal ID="litContent" runat="server"></asp:Literal></div>            <div id="divImages" runat="server" class="thumbnails">
                <asp:Repeater ID="rptImages" runat="server">
                    <HeaderTemplate>
                        <h2>Blog Post Images</h2>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div class="thumbnail">
                            <img src="<%# DataBinder.Eval(Container.DataItem, "Url").ToString().Replace("~","") %>.tmb?width=75&height=75&decreaseOnly=true"/></div>
                    </ItemTemplate>
                </asp:Repeater>
                <div class="clearFix"></div>
            </div>
            <div id="div1" runat="server">
                <h2>Recent Blog Posts</h2>    
                <telerik:RadGrid ID="blogPostGrid" OnNeedDataSource="blogPostGrid_NeedDataSource"  OnItemCommand="blogPostGrid_ItemCommand" AllowPaging="true" runat="server" AutoGenerateColumns="False" GridLines="None" ShowHeader="False" BorderStyle="None">
                    <PagerStyle Mode="NumericPages"></PagerStyle>
                    <MasterTableView DataKeyNames="ID" GridLines="None" PageSize="5">
                        <RowIndicatorColumn Visible="False"></RowIndicatorColumn>
                        <ExpandCollapseColumn Visible="False" Resizable="False">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="Title" HeaderText="Title"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Date" HeaderText="Date"></telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings EnablePostBackOnRowClick="true">
                        <Selecting AllowRowSelect="true" />
                    </ClientSettings>
                </telerik:RadGrid>
            </div>
        </div>
  
    </div>
</div>

protected void blogPostGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
 {
     BindBlogPosts();
 }
 protected void blogPostGrid_ItemCommand(object source, GridCommandEventArgs e)
 {
     if(e.CommandName == "RowClick")
         LoadPlayerBlogByID(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString());
 }
Tsvetoslav
Telerik team
 answered on 15 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?