Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
296 views
Hi,
    Am using two rad list box to transfer items each other mean while database call also

List boxes using : 
<tr>
<td align="left">
   <telerik:RadListBox runat="server" ID="radListAssigned" Height="400px" Width="300px"
    TransferToID="radListUnAssigned" AllowTransfer="true" AutoPostBackOnTransfer="true" TransferMode="Move"
    DataTextField="abc" DataValueField="ID" SelectionMode="Multiple" OnTransferring="radListAssigned_Transferring">
    <Localization AllToLeft="" AllToRight="" />
    <ButtonSettings ShowTransferAll="False" TransferButtons="Common" />
 </telerik:RadListBox>
</td>
<td align="left">
   <telerik:RadListBox runat="server" ID="radListUnAssigned" Height="400px" Width="300px" TransferMode="Move"
    DataTextField="abc" DataValueField="ID" SelectionMode="Multiple">
    <Localization AllToLeft="" AllToRight="" />
    <ButtonSettings TransferButtons="All" />
    </telerik:RadListBox>
 </td>
</tr>

OnTransferring event am updating certain data and the updation is working fine in ontransferring event.
But in the following scenarios transfer not working in both List Boxes,
 1)   if (e.SourceListBox.ID == "radListUnAssigned")   {      
               When transferring, the item selected to transfer is not removing from the SouceListBox (ie, radListUnAssigned) but the
               item is inserted in the Destination  ListBox (ie,radListAssigned ).

  2)  else if (e.SourceListBox.ID == "radListAssigned")  {
        The item selected not inserting to Destinationlistbox (ie, radListUnAssigned) but in
        this case the item is removed from Source list box (ie, radListAssigned)

Here is my code snippet:
       protected void radListAssigned_Transferring(object sender, RadListBoxTransferringEventArgs e)
        {
            if (e.SourceListBox.ID == "radListUnAssigned")
            {                
                int AssignedZipCity = 0;
                int NotAssignZipCity = 0;
                foreach (RadListBoxItem item in e.Items)
                {
                    int isAssigned = -1;
                    isAssigned = < Data updation call >
                    if (isAssigned == 1)
                    {                       
                        AssignedZipCity += 1;
                    }
                    else if (isAssigned == 0)
                    {
                        e.Cancel = true;                      
                        NotAssignZipCity += 1;                 
                    } 
                }
            }
            else if (e.SourceListBox.ID == "radListAssigned")
            {             
                int UnAssignedZipCity = 0;
                int NotUnAssignZipCity = 0;
                foreach (RadListBoxItem item in e.Items)
                {
                    int isUnAssigned = -1;
                    isUnAssigned = <  Data Updation call >
                    if (isUnAssigned == 1)
                    {                       
                        UnAssignedZipCity += 1;
                    }
                    else if (isUnAssigned == 0)
                    {
                        e.Cancel = true;                        
                        NotUnAssignZipCity += 1;
                    }
                }
           }
   Please help me,

  Thanks,



Dimitar Terziev
Telerik team
 answered on 12 Mar 2012
0 answers
76 views
Hi,

           In my sharepoint project page I have a panelbar, a label, a radbutton. In the button click and panelbar item click  i have to postback tha page. In server side, I have written a code for getting the event argument  and set it into the label. In my page I have used RadAjaxManagerProxy for ajax operation. I have placed the radajaxmanager  in MasterPage. In the button click the label is successfully updated. My problem is that  in PanelBar Item click the page is postbacked but the label is not updated.

I have attached the code below
<telerik:RadScriptBlock ID="DemoScriptBlock" runat="server">
        <script type="text/javascript" language="javascript">
 
            function OnClientItemExpand(sender, args) {
 
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(args.get_item().get_value());
 
            }
 
 
            function OnButtonClick(sender, args) {
 
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(sender.get_text());
 
            }
 
        </script>
    </telerik:RadScriptBlock>
    <telerik:RadAjaxManagerProxy ID="PanelbarDemoAjaxmanagerProxy" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="uxProfileList">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="uxProfileList" />
                </UpdatedControls>
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="DemoLabel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="DemoButton">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="DemoButton" />
                </UpdatedControls>
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="DemoLabel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
  
    <telerik:RadPanelBar ID="uxProfileList" OnClientItemClicked="OnClientItemExpand"
        OnClientItemExpand="OnClientItemExpand" ExpandMode="FullExpandedItem" Width="100%"
        runat="server">
        <Items>
            <telerik:RadPanelItem runat="server" Text="Personal Info" Value="PersonalInfo" Font-Bold="true">
            </telerik:RadPanelItem>
            <telerik:RadPanelItem runat="server" Text="Profile Info" Value="ProfileInfo" Font-Bold="true">
            </telerik:RadPanelItem>
            <telerik:RadPanelItem runat="server" Text="Education" Value="Education" Font-Bold="true">
            </telerik:RadPanelItem>
            <telerik:RadPanelItem runat="server" Text="WorkExperience" Value="WorkExperience"
                Font-Bold="true">
            </telerik:RadPanelItem>
        </Items>
    </telerik:RadPanelBar>
 
    <asp:Label ID="DemoLabel" Text="Demo Label" runat="server"></asp:Label>
 
    
 
    <telerik:RadButton ID="DemoButton" Text="Demo Button" OnClientClicked="OnButtonClick" runat="server">
    </telerik:RadButton>

C#:
protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
                DemoLabel.Text = Request["__EVENTARGUMENT"].ToString();
 
        }


Thanks,
Velkumar
Velkumar
Top achievements
Rank 2
 asked on 12 Mar 2012
1 answer
80 views
I have a client requirement to show a status field if a filter is applied to the RadGrid. To get the status I am basically checking to see if the FilterExpression has a .length >0 and then updating a ASP:LITERAL with the value. Here is the code: 

// determin filter status and update UI
bool b = RadGrid1.MasterTableView.FilterExpression.Length > 0;
string status = string.Format("Filtered: {0}", b.ToString(CultureInfo.InvariantCulture));
this.ltrfilterStatus.Text = status;

My question is, what event(s) should I be attaching my code to in order to keep that status current? And, should this code be server-side or client-side (I have versions of both)

I have tried on the Grid.PreRender, which of course fails because it hasn't bound any columns or processed any filters. I have also tried this on pageLoad (client side) and it fails there too.  I have tried ItemBound, ColumnCreated and none seem to provide the proper timing to show the status. I also tried to inject a client-side script on the AjaxRequest of my AjaxManager but the event never seemed to fire. 

Anyone else have any thoughts, or should I just be pushing back to my customer?

Thanks
-Matt
Marin
Telerik team
 answered on 12 Mar 2012
1 answer
302 views
<%@ Import Namespace="System.Data.Odbc" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="System.Security.Principal" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="DocumentFormat.OpenXml" %>
<%@ Import Namespace="DocumentFormat.OpenXml.Presentation" %>
<%@ Import Namespace="DocumentFormat.OpenXml.Packaging" %>
<%@ Import Namespace="DocumentFormat.OpenXml.Drawing" %>
 
 
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
 
<head id="Head1" runat="server">
<title>Chart</title>
<script runat="server">  
 
 
   private void Page_Load(object sender, System.EventArgs e)
   {
        
       OdbcConnection myConnectionString = new OdbcConnection(ConfigurationManager.ConnectionStrings["ConnMySQL"].ConnectionString);
       myConnectionString.Open();
 
       String strQuery = " SELECT AAA, BBB, CCC, DDD, EEE, myDates from myTbl; ";
 
       OdbcCommand objCmd = new OdbcCommand(strQuery, myConnectionString);
       objCmd.CommandType = CommandType.Text;
       objCmd.CommandText = strQuery;
 
      
       Chart1.DataSource = objCmd.ExecuteReader();      
        
       Chart1.ChartAreas["ChartArea1"].Area3DStyle.Inclination = 0;
       Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = false;
       Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Angle = -35;
       Chart1.ChartAreas["ChartArea1"].AxisX.IsLabelAutoFit = false;
       Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Font = new System.Drawing.Font("Arial", 8);
       Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.IsStaggered = false;
       Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Enabled = true;
       Chart1.ChartAreas["ChartArea1"].AxisX.IsMarginVisible = true;
       Chart1.ChartAreas["ChartArea1"].AxisX.LineColor = Color.Black;
       Chart1.ChartAreas["ChartArea1"].AxisY.LineColor = Color.Black;
       Chart1.ChartAreas["ChartArea1"].AxisX.LineDashStyle = ChartDashStyle.Solid;
       Chart1.ChartAreas["ChartArea1"].AxisX.LineWidth = 3;
       Chart1.ChartAreas["ChartArea1"].AxisY.LineWidth = 3;
       Chart1.AntiAliasing = AntiAliasingStyles.All;
       Chart1.TextAntiAliasingQuality = TextAntiAliasingQuality.High;
 
 
       Chart1.Series["Default"].XValueMember = "AAA";
       Chart1.Series["Default"].YValueMembers = "BBB";
       Chart1.Series["Default"].ChartType = SeriesChartType.Column;
       Chart1.Series["Default"]["PointWidth"] = "0.7";
       Chart1.Series["Default"].IsValueShownAsLabel = true;
       Chart1.Series["Default"]["BarLabelStyle"] = "Center";
       Chart1.Series["Default"]["PixelPointDepth"] = "99";
       Chart1.Series["Default"]["DrawingStyle"] = "Cylinder";
       Chart1.Series["Default"].Font = new System.Drawing.Font("Verdana", 10);
       Chart1.Series["Default"]["LabelStyle"] = "Top";
 
       Chart1.Series["Default2"].YValueMembers = "CCC";
       Chart1.Series["Default2"].ChartType = SeriesChartType.Column;
       Chart1.Series["Default2"]["LabelStyle"] = "Center";
       Chart1.Series["Default2"]["PointWidth"] = "0.7";
       Chart1.Series["Default2"].IsValueShownAsLabel = true;
       Chart1.Series["Default2"].Font = new System.Drawing.Font("Verdana", 10);
       Chart1.Series["Default2"]["LabelStyle"] = "TopLeft";
       Chart1.Series["Default2"]["BarLabelStyle"] = "Center";
       Chart1.Series["Default2"]["PixelPointDepth"] = "99";
       Chart1.Series["Default2"]["DrawingStyle"] = "Cylinder";
 
        
       Chart1.Series["Default3"].YValueMembers = "DDD";
       Chart1.Series["Default3"].ChartType = SeriesChartType.Line;
       Chart1.Series["Default3"].Font = new System.Drawing.Font("Verdana", 12);
       Chart1.Series["Default3"]["LabelStyle"] = "TopLeft";
 
       Chart1.Series["Default4"].YValueMembers = "EEE";
       Chart1.Series["Default4"].ChartType = SeriesChartType.Column;
       Chart1.Series["Default4"]["PointWidth"] = "0.7";
       Chart1.Series["Default4"].IsValueShownAsLabel = true;
       Chart1.Series["Default4"]["BarLabelStyle"] = "Center";
       Chart1.Series["Default4"]["PixelPointDepth"] = "99";
       Chart1.Series["Default4"]["DrawingStyle"] = "Cylinder";
       Chart1.Series["Default4"].Font = new System.Drawing.Font("Verdana", 10);
       Chart1.Series["Default4"]["LabelStyle"] = "Top";
 
       Chart1.Legends.Add(new Legend("Default"));
       Chart1.Series["Default"].Legend = "Default";
       Chart1.Legends["Default"].BackColor = Color.MediumSeaGreen;
       Chart1.Legends["Default"].BackSecondaryColor = Color.Green;
       Chart1.Legends["Default"].BackGradientStyle = GradientStyle.DiagonalLeft;
       Chart1.Legends["Default"].BorderColor = Color.Black;
       Chart1.Legends["Default"].BorderWidth = 2;
       Chart1.Legends["Default"].BorderDashStyle = ChartDashStyle.Solid;
       Chart1.Legends["Default"].ShadowOffset = 2; 
        
       myConnectionString.Close();
       myConnectionString.Dispose();
 
   }  
</script>
 
</head>
<body>
    <form id="form1" runat="server">
    <div>
 
<asp:Chart ID="Chart1" runat="server" Width="1058" Height="680">
<Series>
<asp:Series Name="Default" ChartArea="ChartArea1" Color="MediumOrchid" BorderWidth="2">
</asp:Series>
</Series>
 
<Series>
<asp:Series Name="Default2" ChartArea="ChartArea1" Color="Maroon" BorderWidth="2">
</asp:Series>
</Series>
 
<Series>
<asp:Series Name="Default3" ChartArea="ChartArea1" Color="Red" BorderWidth="4">
</asp:Series>
</Series>
 
<Series>
<asp:Series Name="Default4" ChartArea="ChartArea1" Color="Blue" BorderWidth="2">
</asp:Series>
</Series>
 
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
<AxisX Interval="1">
</AxisX>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
 
    </div>
    </form>
</body>
</html>   


Hi there, I hope your help.

I need in the legend chart:
1) add the date of update of recordset from select query ( field  `myDates` );
2) add the current month previous year;
3) add the current month current year;

I need resolve this problems in chart:
4) the Value Shown As Label in the series "Default4" remains hidden from the series "Default3" (e.g. value 2.96);
5) I change the font color in the "Default2" (e.g. value 14.73).

how can I do that?
thanks
Peshito
Telerik team
 answered on 12 Mar 2012
1 answer
82 views
Hi,

I have once requirement to refresh my grid each 5 second of time, In each row grid has checkboxes through which I select the rows
once grid refresh in 5 seconds, all checkboxes which I checked comes to the unchecked state ( because they are not able to keep there state), Is there any way to keep the state of the checkboxes in client side or serverside so that my rows still be selected once the grid refresh in each 5 second.???
Princy
Top achievements
Rank 2
 answered on 12 Mar 2012
1 answer
103 views
Hello,

I using the following control
<telerik:RadSchedulerRecurrenceEditor ID="RadSchedulerRecurrenceEditor1" runat="server"   />.
I don't want the hourly option in this control.

I also try to used the following function:

function OnClientFormCreated(sender, eventArgs) {
          $telerik.$(".rsRecurrenceOptionList li:first-child").hide();
      }

but i don't see this OnClientFormCreated event in above control. But i found this event in the RadScheduler control.
I attached the image. Please see this.

Please help me as soon as possible.

Thanks

Best Regards

Jiten Mutum


Princy
Top achievements
Rank 2
 answered on 12 Mar 2012
1 answer
77 views
Is it possible to add an extra item to a pie chart legend with the new item as the last one?  I can add an the extra item, but it always appears first.
Giuseppe
Telerik team
 answered on 12 Mar 2012
2 answers
117 views
Hi Team,

I'm using RadTimePicker in ASP.NET Grid. My requirement is need to display start time 30 mins increment and End time 30 decrement in TimeView based on current time in the grid.

Kindly suggest.

Thanks in advance.
Chandrasekhar
Top achievements
Rank 1
 answered on 12 Mar 2012
4 answers
295 views

I am using radlistbox, which i am binding to a data source and contains 430 elements.
Now, radlistbox does not show any vertical/horizontal scrollbar and occupying whole page.
Any suggestion how to display scrollbar is welcome.
Thanks in advance

 

Princy
Top achievements
Rank 2
 answered on 12 Mar 2012
1 answer
63 views
Hi

How can I remove Telerik Radeditor from "Add WebPart" page. I want to restrict user's from using it for sometime. I am not able to find this Web Part in WebPart Gallery.

Stanimir
Telerik team
 answered on 12 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?