Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
85 views
Hi,

I'm using RadSchedular advance form to insert/update appointments. It works fine when I assign resources at the time of databinding.
Now what I'm trying to achieve it to dynamically add new  resources by giving a add button besides the dropdowns in the appointment form.

For exmaple:
Initially there are 3 users, user1, user2,user3. Now I want to give user ability to choose from exisitng users or add a new user (user4) there only.

Is that possible? If yes how can this be achieved please share if any samples are avaiable.

Thanks,
Piyush
Piyush
Top achievements
Rank 1
 answered on 24 Jul 2012
2 answers
176 views
I am having an issue with the following. I have a general RadGrid with two specific Grid Template columns (RadComboBox/RadTextBox). The Combo box is formatted for Load on demand. When a value is found/selected from the combo box (OnIndexChanged) I want to populate the RadTextBox with the combo box DataValueField value.

I have access to the combo box in the onindexchanged event, but am not sure how to gain access to the RadTextBox in it's own template. Have tried a number of solutions over several days without success.

Thank you,

SteveO
JSON
Top achievements
Rank 1
 answered on 24 Jul 2012
3 answers
191 views
We have your 2012 AJAX Controls. We are using a RadGrid for a finical application. What the customer was doing before was cutting parts of an Excel spreadsheet into the clip board and pasting the content into another Excel spread sheet. I don't see any way to do this directly with the RadGird it self; however, can you give us an idea how we can provide a solution to allow the user to cut a range of cells and paste them into some type of textbox control then import the data into a RadGrid?

Thanks,


Steve Holdorf
Pavlina
Telerik team
 answered on 24 Jul 2012
3 answers
632 views

 

Hello

Can anyone send how to create a header template in GridTemplateColumn programmatically in RadGrid, inorder to set the header context filter menu.

Thanks in advance.

Princy
Top achievements
Rank 2
 answered on 24 Jul 2012
1 answer
117 views
Hi,

I'm trying to create a panelbar with a single (root) item which I can expand and collapse. 
I've found the solution in this help section
Now I'm tryning to add a button in the header of this root item, but without succes (setting the headertemplate for the root item works, but the expand/collapse button disappears)

This is the complete code of my page : 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Detail.aspx.cs" Inherits="Mobile_Detail" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ScriptManager" runat="server" />
    <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="742px" Height="330px"
        Skin="MetroTouch" ExpandMode="FullExpandedItem" AllowCollapseAllItems="true">
        <CollapseAnimation Type="None"></CollapseAnimation>
        <Items>
            <telerik:RadPanelItem runat="server" Text="Root RadPanelItem1">
            <HeaderTemplate><asp:Button runat="server" Text = "TEST" /></HeaderTemplate>
                <Items>
                    <telerik:RadPanelItem Expanded="false">
                        <ItemTemplate>
                            TEST</ItemTemplate>
                    </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>
        </Items>
    </telerik:RadPanelBar>
    </form>
</body>
</html>


How can i achieve this? Thx
Peter
Telerik team
 answered on 24 Jul 2012
1 answer
293 views
hi,

I have create a rad panel as below and for the RadPanelBar with the ID "rpbIncludeSections" items are added dynamically.
<telerik:RadPanelBar runat="server" ID="rpbResumeSections" Width="300px" GridLines="Horizontal" >
        <Items>
            <telerik:RadPanelItem ID="rpiResumeSections" runat="server" PreventCollapse="false" Expanded="true" >
                <Items>
                    <telerik:RadPanelItem ID="rpbResumeSectionInfo" runat="server" >
                        <HeaderTemplate>
                            <div style="margin: 10px;">
                                <telerik:RadComboBox runat="server" ID="rcbTemplates" Width="250px" AutoPostBack="true"  OnSelectedIndexChanged="rcbTemplates_OnSelectedIndexChanged"></telerik:RadComboBox>
                            </div>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <!--Dynamically generate a rad panel bar -->
                            <div style="margin: 10px;max-height: 200px; overflow:auto;">
                                <telerik:RadPanelBar runat="server" ID="rpbIncludeSections" GridLines="Horizontal" ExpandMode="MultipleExpandedItems" >
                                </telerik:RadPanelBar>
                            </div>
                             
                            <div style="margin:10px;margin-top: 30px; text-align:right;">
                                <telerik:RadButton  ID="btnPreview" runat="server" OnClick="btnPreview_OnClick"></telerik:RadButton>
                                <telerik:RadButton ID="btnSavePublish" runat="server" OnClick="btnSavePublish_OnClick"></telerik:RadButton>
                                <telerik:RadButton ID="btnPrintCV" runat="server" OnClick="btnPrintCV_OnClick"></telerik:RadButton>                                         
                            </div>
                             
                        </ItemTemplate>                     
 
                    </telerik:RadPanelItem>                   
                </Items>
            </telerik:RadPanelItem>
        </Items>
    </telerik:RadPanelBar>

The components added dynimacally is as follows
RadPanelBar _rpbIncludeSections = (RadPanelBar)rpbResumeSectionInfo.FindControl("rpbIncludeSections");
 
            if (_personID != 0)
            {
                DataSet _Sections = _cvController.GetSectionsFromCVTemplateIDPersonID(int.Parse(e.Value), _personID);
                 
                _rpbIncludeSections.Items.Clear();
                 
                 
                foreach (DataRow _drSection in _Sections.Tables[0].Rows)
                {
                    bool _checked = false;
                    if ((_drSection["Include"].ToString() != "" && bool.Parse(_drSection["Include"].ToString()) == true) || _drSection["Persons_PersonID"].ToString() == "")
                        _checked = true;
 
 
                    RadPanelItem _panelItemLvl1 = new RadPanelItem();
                    _panelItemLvl1.Text = _drSection["CV_Section"].ToString();
                    _panelItemLvl1.Selected = true;
 
                    RadPanelItem _panelItemLvl2 = new RadPanelItem();
 
                    CheckBox _checkBox = new CheckBox();
                    _checkBox.ID = "Savidu";
                    _checkBox.Checked = _checked;
                    _checkBox.Text = Localization.GetString("Include.Text", this.LocalResourceFile);
                    _checkBox.ToolTip = "Check to Include in ude in CV";
                    _checkBox.CssClass = "MarginLeft";
                    _panelItemLvl2.Controls.Add(_checkBox);
 
                    _panelItemLvl1.Items.Add(_panelItemLvl2);
                    _rpbIncludeSections.Items.Add(_panelItemLvl1);
                }
            }

This part works fine the issue comes when the button "btnSavePublish" OnClick method i need to find out whether the check box is checked or not.

For this id some thing like
RadPanelBar _rpbIncludeSections = (RadPanelBar)rpbResumeSectionInfo.FindControl("rpbIncludeSections");

Through the Items attribute i am able to find the added panels. I.e since i have added 2 panels i would be able to access them

_rpbIncludeSections.Items[0].Items[0]

But, there is no way for me to access the added checkbox. I tried with the "Controls" attribute as well but it gave no luck.

Thanks Regards,
Savidu

Peter
Telerik team
 answered on 24 Jul 2012
2 answers
100 views
HI,

Ok, with some help i got to this point but found out on postback for some reason it alwyas registers my check event as as false and then i get an error in the datasource event, how can I check for it the cb_checkchanged event is true or false for checked or not in the event so that I can set the value of my hidden field to load the grid properly.

Protected Sub myRadGrid_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles myRadGrid.ItemCreated
      If TypeOf e.Item Is GridCommandItem Then
          Dim citem As GridCommandItem = DirectCast(e.Item, GridCommandItem)
          Dim Cb As CheckBox = DirectCast(citem.FindControl("cbhist"), CheckBox)
          If Cb.Checked = True Then
              HFHist.Value = 1
              AddHandler Cb.CheckedChanged, AddressOf cb_CheckedChanged
          Else
              HFHist.Value = Nothing
              AddHandler Cb.CheckedChanged, AddressOf cb_CheckedChanged
          End If
      End If
  End Sub
  Private Sub cb_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
      myRadGrid.Rebind()
  End Sub

Protected Sub myRadGrid_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles myRadGrid.NeedDataSource
      Dim sqlwhere As String
      If Int32.Parse(HFHist.Value) = 1 Then
          sqlwhere = ""
      Else
          sqlwhere = "where bitJ6 IS NULL or bitJ6 = 0"
      End If
      sql = "Select f.intFlagId, f.intPersonnelid, mn.strFullname + ' ' + mn.strRank Flag, m.strFullname + ' ' + m.strRank FlagBy, CONVERT(varchar(10), dtFlagged, 101) dtFlagged, bitUnit, bitJ2, bitJ6, strNotes " _
          & "from iMAC_J2Flag f INNER JOIN MnNgPersonnel.dbo.tblMNNatPersonnel mn on mn.intPersonnelId = f.intPersonnelId INNER JOIN MnNgPersonnel.dbo.tblMNNatPersonnel m on m.intPersonnelId = f.intFlagBy " _
          & "" & sqlwhere & ""
      Response.Write(sql)
      Response.End()
      myRadGrid.DataSource = getData(sql)
  End Sub

Radoslav
Telerik team
 answered on 24 Jul 2012
4 answers
350 views
Team,

I have a scenario to ask for confirmation before proceeding the logic. I need to call the confirm in TextBox Changed Event at code-behind (C#).

CS
RadAjaxManager1.ResponseScripts.Add("radconfirm('Are you sure!?', confirmCallBackFn);");

How can i get the result value if I press Yes or No, need some sample script.

Mohan
Top achievements
Rank 1
 answered on 24 Jul 2012
2 answers
88 views
I need to have 2 refresh button in the Radgrid.On clicking one Refresh button I need to show a set of data in the grid and on clicking the other refresh button,need to show another set of data.
How can I accomplish this by giving 2 refresh buttons in the radGrid.?

Also ,in the Grid,I have given filter with below properties in one of my column 'Name'.
"AutoPostBackOnFilter="true" ShowFilterIcon="false" CurrentFilterFunction="Contains""
If I enter a name and press enter,records with given name is fetched.But if I remove the name and click on refresh button,the grid is not refreshed with whole data.It is showing the 1 record with that name itself.Can I refresh the Grid as in normal case/

Please help me on the above two issues.
Thanks,
Soumya.


Radoslav
Telerik team
 answered on 24 Jul 2012
3 answers
1.9K+ views
Hi there..

Normally we have English letter keyboards with other languages support. And we can switch between languages by pressing Alt-Shift or Ctrl-Shift, or by selecting the input language from the language bar, and then we can start typing in the selected language.

Currently I am developing a web page where the user should fill some fields in two languages (i.e., filling name in English letters and then filling name in Arabic letters). Normally in this case, the user should fill the name in English and then switch the keyboard language from the keyboard or the language bar.


I want to restrict the input the Arabic text box to accept only Arabic , put also you can pest arabic word,,
I am using ASP.NET AJAX Q1 2012 ..

is there any way in Rad Control to do that?

Thanks..
Eyup
Telerik team
 answered on 24 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?