Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
143 views
Hi!  Is it possible to customize the display of the RadFilter so that the filter displays continuously along one line rather than indenting on separate lines?  If so, could someone point me to an example?

Thank you!
Amy
Top achievements
Rank 1
 answered on 28 Oct 2010
3 answers
97 views

HI  ALL

I have a  text box in  edit item template in a rad grid

during the edit mode i fill this  text box with the selected node of the  RAD tree .

 not able to find the text box during the edit mode whereas during insert its working fine.



    protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)
    {

        RadTreeView TreeNode = (RadTreeView)TreeControle.FindControl("RadTreeView1");
            -------------------------THIS PART IS WORKING FINE--------------------------------------
              if (rdUserlist.MasterTableView.IsItemInserted == true)
            {

                TextBox txtCb1 = (TextBox)rdUserlist.MasterTableView.GetInsertItem().FindControl("txtCb");
                txtCb1.Text = SLName;               

            }
            else  
            {

                --------------------NOT ABLE TO FIND THE TEXT BOX  DURING EDIT ------------------------------------------------
                -----------------OBJECT REFRENCE ERROR -----------------------------------------------------

                TextBox txtCb1 = (TextBox)rdUserlist.MasterTableView.EditItem.FindControl("txtCb");
                txtCb1.Text = SLName;  
               
            }
            TreeNode.CollapseAllNodes();
            TreeNode.ClearSelectedNodes();
                  }
    
    }

 


Thanks


Shinu
Top achievements
Rank 2
 answered on 28 Oct 2010
1 answer
407 views
How to make UpdatePanel work with telerik RadGrid?

 <div>
   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <telerik:RadGrid ID="uiUserGrid" runat="server" GridLines="None"
                AllowPaging="True" AllowSorting="true" PageSize="20" EnableEmbeddedBaseStylesheet="True"
                EnableEmbeddedSkins="false" ImagesPath="~/_layouts/global/radcontrols/Grid/MyLink" >
  <HeaderStyle ForeColor="White" />
        </telerik:RadGrid>
   
        </ContentTemplate>
     </asp:UpdatePanel>
    </div>
Sebastian
Telerik team
 answered on 28 Oct 2010
3 answers
71 views
Help,

Im trying to create RadTabs and RadGrids dynamically based on database entries.  I also want the RadGrid to postback on double click of the row.  I've tried creating javascript methods for each grid to handle the Double Click Event but the issue I run into is that the $find function cannot find my programitaccally created grids to get their UniqueID.  Is what Im trying to accomplish possible?  Some of my code is below.

Panel GridPanel = new Panel();
  
EntityDataSource NewEDS = CreateDataSource(Tab);
  
GridPanel.Controls.Add(NewEDS);
  
RadGrid NewRG = new RadGrid();
NewRG.ID = "rg" + Tab.WebTabId.ToString();
NewRG.AutoGenerateColumns = true;
NewRG.DataSourceID = NewEDS.ID;
NewRG.MasterTableView.TableLayout = GridTableLayout.Fixed;
NewRG.ClientSettings.Scrolling.AllowScroll = true;
NewRG.ClientSettings.Scrolling.UseStaticHeaders = true;
NewRG.ClientSettings.Selecting.AllowRowSelect = true;
  
GridPanel.Controls.Add(NewRG);
  
string jsText = "function " + NewRG.ID + "_DblClick(sender, eventArgs) {$find('" + RadAjaxManager.ClientID + "').ajaxRequestWithTarget('" + NewRG.UniqueID + "','Select');}";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(),NewRG.ID + "_DblClick", jsText,true);
NewRG.ClientSettings.ClientEvents.OnRowDblClick = NewRG.ID + "_DblClick";

Thanks for any help in advance.
Mira
Telerik team
 answered on 28 Oct 2010
1 answer
177 views
Hi
I want to use Asp:CheckBox in RadComboBox that users can select any item from my RadComboBox items
I use this Asp code:
<telerik:RadComboBox ID="drpEmailAddress" runat="server"
    Width="98%" Skin="Outlook"
    EmptyMessage="Select" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
    EnableVirtualScrolling="true" EnableAutomaticLoadOnDemand="true" OnItemsRequested="drpEmailAddress_ItemsRequested">
    <ItemTemplate>                                        
        <asp:CheckBox runat="server" ID="chkAddress" Text='<%#Eval("Address")%>'/>
    </ItemTemplate>                                                        
</telerik:RadComboBox>

and this Cs Code for ItemsRequested event:
protected void drpEmailAddress_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
    var q = GetData(e.Text);
    int itemOffset = e.NumberOfItems;
    int endOffset = Math.Min(itemOffset + 20, q.Count);
    e.EndOfItems = endOffset == q.Count;
    e.Message = GetStatusMessage(endOffset, q.Count); 
      drpEmailAddress.DataTextField = "Address";
      drpEmailAddress.DataValueField = "AddressId";

    drpEmailAddress.DataSource = q.Take(20);
    drpEmailAddress.DataBind();
}

 

private static string GetStatusMessage(int offset, int total)

 

{

 

  if (total <= 0)

 

 

    return "Nothing found";

 

 

  return String.Format(" <b>1 </b> <b>{0} </b> <b>{1}</b>", offset, total);

 

}


When users selecting items (checking CheckBox) i can't get selected items in my CS code!!!
I use this code for get selected items in my Cs:
protected void btnSend_Click(object sender, EventArgs e) 
    var q = (from a in drpEmailAddress.Items 
                     where (a.FindControl("chkAddress") as CheckBox).Checked 
             select a).ToList();
}

but q is empty!!!
Calleigh
Top achievements
Rank 1
 answered on 28 Oct 2010
1 answer
242 views
I have a radcombobox with EnableAutomaticLoadOnDemand="true", when I select the combobox, all the data loads and I am able to select an item.  If I then click the same combobox, the value of the previous selection is present, therefore it will not load in any of the data untill i delete the text in the combobox.  Is there away around this?  I would like to the text to be cleared out so everytime a user clicks on the box it will load all the values in?

I have set up the radcombobox in the folloaing way
<telerik:RadComboBox ID="rcb_1" AllowCustomText="true" runat="server" EmptyMessage="Please select a value..." 
DataTextField="description" DataValueField="ID" CssClass="radComboBox" AutoPostBack="true" MaxHeight="200px" width="170px"
EnableAutomaticLoadOnDemand="true" Filter="Contains" ></telerik:RadComboBox>
I bind the data in the following way,
rcb_1.DataSource = Class.getData()
rcb_1.DataBind()
Any help would be much appreciated
Yana
Telerik team
 answered on 28 Oct 2010
2 answers
85 views
Hi,

I have been using Telerik Grid, on demand load data and i have implemented custom paging to my grid.
I have used VirtualItem count property to display max reocrds avilable with given query and default it will display 10 records perpage.
ex:-   24 items in 3 pages like this format i am displaying record count.(page size is 10)
24items i am getting using virtual item count.
But my problem is when when virtrual item count is greater than the pagesize, then the grid pagination bar(page index bar) is coming.
but when the virtualitem count is lessthan the pagesize(for example:- 3 recrods retruned from db,but page size is10) then pagination bar is disappearing.
so please provide me the better solution to resolve this issue.

Thanks in advance.
Pardha Saradhi
Top achievements
Rank 1
 answered on 28 Oct 2010
1 answer
83 views
HI
Im using Radgrid that connects to  a Sql server 2000 table. I have automatic updates/deletes enabled.. My problem is that I am able to delete the rows through the radgrid, I am not able to update them...


Here's the Code
       
    <telerik:RadGrid ID="RGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SQLDS"
        GridLines="None" DataMember="DefaultView" AutoGenerateDeleteColumn="True"
        AutoGenerateEditColumn="True" AllowAutomaticDeletes="True"
        AllowAutomaticUpdates="True">
        <MasterTableView DataSourceID="SQLDS" DataKeyNames="ID">
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <Columns>
                <telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID" UniqueName="ID"
                    Visible="false" AllowFiltering="False" AllowSorting="False" Display="False" ReadOnly="True">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="NAME" HeaderText="NAME" SortExpression="NAME"
                    UniqueName="NAME">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ADDRESS" HeaderText="ADDRESS" SortExpression="ADDRESS"
                    UniqueName="ADDRESS">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
 
<br />
<br />
<asp:SqlDataSource ID="SQLDS" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringSQL %>"
    ProviderName="<%$ ConnectionStrings:ConnectionStringSQL.ProviderName %>" SelectCommand="SELECT [ID], [NAME], [ADDRESS] FROM [Info]"
    UpdateCommand="UPDATE [Info] set [NAME]=?,[ADDRESS]=? where [ID]=?"
    DeleteCommand="delete from Info where [ID]=?">
    <DeleteParameters>
        <asp:Parameter Name="ID" Type="String" />
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="NAME" Type="String" />
        <asp:Parameter Name="ADDRESS" Type="String" />
        <asp:Parameter Name="ID" Type="String" />
    </UpdateParameters>
</asp:SqlDataSource>


I'm not sure what the issue is since I'm able to delete rows...

Any help is appreciated..


Thanks,


 
Maria Ilieva
Telerik team
 answered on 28 Oct 2010
1 answer
206 views

I have RadComboBox on my page for multiple item selection.
its working fine.
but when i go to page 1st time..it will open tht radcombobox automatically.
After cliking on another button also it automatically open.
i want to supress tht on clik on any other control , it should open when user click on that RadComboBox

can any onw help??

my code is as followes


<

 

 

telerik:RadComboBox ID="rdCombIssueTypeID" runat="server" HighlightTemplatedItems="True" AllowCustomText="True" Width="190px" TabIndex="0" OpenDropDownOnLoad="true" OnClientSelectedIndexChanging="OnClientSelectedIndexChanging"

 

 

 

 

CloseDropDownOnBlur="true"

 

 

 

OnClientDropDownOpening="OnClientDropDownOpening"

 

 

 

 

OnClientDropDownClosing="OnClientDropDownClosing"

 

 

 

OnClientBlur="OnClientBlur">

 

 

 

<HeaderTemplate>

 

 

 

<table cellspacing="0" cellpadding="0" border="0">

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:CheckBox runat="server" ID="chkAll" Enabled="true" onclick="onchkStatusAllClick(this)" />

 

 

 

</td>

 

 

 

<td style="width: 100px;"> All</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</HeaderTemplate>

 

 

 

<ItemTemplate>

 

 

 

<div onclick="StopPropagation(event)">

 

 

 

<asp:CheckBox runat="server" ID="chk1" onclick="onCheckBoxClickRadCboCourseStatus(this)" />

 

 

 

<asp:Label runat="server" ID="Label1" AssociatedControlID="chk1">

 

 

<%

 

# Eval("IssueType")%>

 

 

 

 

</asp:Label>

 

 

 

</div>

 

 

 

</ItemTemplate>

 

 

</telerik:RadComboBox>

 <script type="text/javascript" language="javascript">

        function onchkStatusAllClick(parentChk) {
            var combo =  $find("<%= rdCombIssueTypeID.ClientID %>");;
            var items = combo.get_items();
            var text = "";
            var values = "";

            //enumerate all items
            for (var i = 0; i < items.get_count(); i++) {
                var item = items.getItem(i);
                //get the checkbox element of the current item
                var chk1 = $get(combo.get_id() + "_i" + i + "_chk1");

                if (parentChk.checked) {
                    chk1.checked = true;
                    text += item.get_text() + ",";
                    values += item.get_value() + ",";
                }
                else {
                    chk1.checked = false;
                }

            }

            text = removeLastComma(text);
            values = removeLastComma(values);

            if (parentChk.checked) {
                combo.set_text("All Selected");

            }
            else {
                combo.set_text("");
            }

        }

        function onCheckBoxClickRadCboCourseStatus(chk) {

            var combo = $find("<%= rdCombIssueTypeID.ClientID %>");
            //holds the text of all checked items
            var text = "";
            //holds the values of all checked items
            var values = "";
            //get the collection of all items
            var items = combo.get_items();
            //enumerate all items
            var count = 0;
            for (var i = 0; i < items.get_count(); i++) {
                var item = items.getItem(i);
                //get the checkbox element of the current item
                var chk1 = $get(combo.get_id() + "_i" + i + "_chk1");
                if (chk1.checked) {
                    text += item.get_text() + ",";
                    values += item.get_value() + ",";
                    count += 1;
                }
            }
            if (count == 1) {
                text = removeLastComma(text);
                values = removeLastComma(values);
            }
            if (count == items.get_count())
            {
                text = "All Status";
                //chkAll
                var chkHeader = $get(combo.get_id() + "_Header" + "_chkAll");
                chkHeader.checked = true;
            }
            if (count > 1 && count != items.get_count()) {
                var chkHeader = $get(combo.get_id() + "_Header" + "_chkAll");
                chkHeader.checked = false;
            }
            if (count == 0) {
                text = "No selection";
            }
            if (text.length > 0) {
                combo.set_text(text);
            }
            else {

                combo.set_text("");

            }
        }

        var supressDropDownClosing = false;

        function StopPropagation(e) {
            //cancel bubbling
            e.cancelBubble = true;
            if (e.stopPropagation) {
                e.stopPropagation();
            }
        }
        function removeLastComma(str) {
            return str.replace(/,$/, "");
        }

        function OnClientDropDownClosing(sender, eventArgs) {
            eventArgs.set_cancel(supressDropDownClosing);
        }

        function OnClientSelectedIndexChanging(sender, eventArgs) {
            eventArgs.set_cancel(supressDropDownClosing);
        }

        function OnClientDropDownOpening(sender, eventArgs) {
            supressDropDownClosing = true;
        }

        function OnClientBlur(sender) {
            supressDropDownClosing = false;

            sender.toggleDropDown();
        }
 

    </script>

Cori
Top achievements
Rank 2
 answered on 28 Oct 2010
1 answer
64 views
Hi all...

The problem is exactly that, when I filter the grid with the filters commands, how do I maintain those filters with EnableSEOPaging="true"?

When I use the pager, the filter is lost.

I'm using Telerik Q2 2008, although I don't think it makes any difference at all...

Thanks and best regards,
Sérgio Diniz
Tsvetina
Telerik team
 answered on 28 Oct 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?