Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
85 views
This is a general question, but I thought it might belong
here. I’m looking at a business application that requires us to draw many (in the hundreds)
slanted lines representing the production rate (quantity in time) in a
chart-like fashion. Drawing using a Canvas is very close to what I need, but it’s
missing the ability you have in the Gantt Chart where you can click a line and
move it or get some feedback from the line, like clicking it and opening
another page with the data in a grid for that line. So the elements on the
Canvas need to be “active” and “responsive” to the user action. Any suggestions
or recommendations?

Marbry
Top achievements
Rank 1
 answered on 12 Jan 2015
0 answers
54 views
I have 3 radlive tiles that are being updated by a webservice that gets the count from the sharepoint list.

My issue is if there are no items in the view I want to display zero in the tile. But for some reason it keeps bypassing the tile whose view is empty and goes to the next views.

I have tried if tbl!=null that does not work either. Looking for some suggestions that will make this work.

Web Service:

      public static int getView_Count(string viewname) //Returns the count for the view
        {

           //Get Values siteName/listName/viewName
            string siteName = null;
            string listName = null;
            string viewName = null;
            string[] temp = viewname.Split(';');

            foreach (string s in temp)
            {
                if (s.Contains("SiteName"))
                {
                    siteName = s.Substring(9);
                }
                else if(s.Contains("ListName"))
                {
                    listName = s.Substring(9);
                }
                else if (s.Contains("ViewName"))
                {
                    viewName = s.Substring(9);
                }
            }

            //Check SiteName null

            if (string.IsNullOrEmpty(siteName))
            {
                siteName = "0";

            }
           
            if(siteName!="0")
            {
           // SPSite mySite = SPContext.Current.Site;
            SPSite mySite=new SPSite(siteName);
            {
                using (SPWeb myWeb = mySite.OpenWeb())
                {
                   // SPList list_Probs = myWeb.Lists["Probs"];
                    SPList list_Probs = myWeb.Lists[listName];
                    DataTable tbl = new DataTable();

                    ////if (!string.IsNullOrEmpty(viewname))
                    //if (!string.IsNullOrEmpty(viewName))
                    //{
                        //SPView view_Probs = list_Probs.Views[viewname];
                        SPView view_Probs = list_Probs.Views[viewName]; //This is where it bypasses the view that has no value and goes on to the one that has a value

                        tbl = list_Probs.GetItems(view_Probs).GetDataTable();
                        myWeb.Dispose();
                        mySite.Close();
                        return tbl.Rows.Count;
                    }
                
            }
            }
                    else
                    {
                        //SPQuery PQuery = new SPQuery();
                        //PQuery.Query = "<Where><IsNull><FieldRef Name='AS400Date'/></IsNull></Where>";
                        //tbl = list_Probs.GetItems(PQuery).GetDataTable();
                        //myWeb.Dispose();
                        //return tbl.Rows.Count;
                        return 0;
                    }
            
                }

 Code Behind:

namespace DashboardCount.DashboardCount
{
    public partial class DashboardCountUserControl : UserControl
    {
        public DashboardCount DashboardCount { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            //Initialize the radlive tiles
            
            
            try
            {
                if (!string.IsNullOrEmpty(DashboardCount.Title ))
                {
                    lblTile.Text = DashboardCount.TitleWebPart;
                }
                else
                {
                    lblTile.Text = null;
                }
                lblExcep.Visible=false;
                InitializeTile(RadDash);
                InitializeTile(RadDash1);
                InitializeTile(RadDash3);
            }
            catch (Exception ex)
                {
                   lblExcep.Visible=true;
                lblExcep.Text=ex.Message;
                }
        }
        
        private void InitializeTile(RadLiveTile tile)
        {
           
                //tile.CssClass = "liveTile";
                string name = tile.ID;
                tile.Target = "_blank";
            

                //The text between the #= # characters is replaced by the corresponding properties of the data item
                //returned on the web service response.

                if (name == "RadDash")
                {
                    if (!string.IsNullOrEmpty(DashboardCount.Link1))
                    {
                        tile.NavigateUrl = DashboardCount.Link1;
                    }
                    tile.ClientTemplate = @"
                  <div style='width:170px;height:170px;background-color: #= GetColor #'> 
                <div style='text-align:center;font-size:60px;'><strong> #= ViewCount #</strong></div>  
                 <div style='text-align:center;font-size:18px;'><strong> #= GetTileName #</strong></div><br></br>                 
                 <div style='position:absolute;bottom:0;right:0;font-size:12px'> #=DDate  #</div>
                </div>";

                    tile.Value = "SiteName:" + DashboardCount.SiteName + ";ListName:" + DashboardCount.ListName + ";ViewName:" + DashboardCount.View1Name +";TileName:"+DashboardCount.Tile1Name +";MaxNormalCount:" + DashboardCount.MaxNormalCount1 + ";MaxWarningCount:" + DashboardCount.MaxWarningCount1 ; 
                }
                else if (name == "RadDash1")
                {
                    if (!string.IsNullOrEmpty(DashboardCount.Link2))
                    {
                        tile.NavigateUrl = DashboardCount.Link2;
                    }
                    tile.ClientTemplate = @"
                <div style='width:170px;height:170px;background-color:#= GetColor #'> 
                <div style='text-align:center;font-size:60px'><strong>#= ViewCount #</strong></div>  
                <div style='text-align:center;font-size:18px'><strong>#= GetTileName #</strong></div><br></br> 
                <div style='position:absolute;bottom:0;right:0;font-size:12px'> #=DDate  #</div>
                </div>";
                    tile.Value = "SiteName:" + DashboardCount.SiteName + ";ListName:" + DashboardCount.ListName + ";ViewName:" + DashboardCount.View2Name + ";TileName:" + DashboardCount.Tile2Name + ";MaxNormalCount:" + DashboardCount.MaxNormalCount2 + ";MaxWarningCount:" + DashboardCount.MaxWarningCount2; 
                }
                else if (name == "RadDash3")
                {
                    if (!string.IsNullOrEmpty(DashboardCount.Link3))
                    {
                        tile.NavigateUrl = DashboardCount.Link3;
                    }
                    tile.ClientTemplate = @"
                     <div style='width:170px;height:170px;background-color:#= GetColor #'> 
                     <div style='text-align:center;font-size:60px;'><strong>#= ViewCount #</strong></div> 
                    <div style='text-align:center;font-size:18px'><strong>#= GetTileName #</strong></div><br></br>                  
                    <div style='position:absolute;bottom:0;right:0;font-size:12px'> #=DDate  #</div>
                     </div>";
                    tile.Value = "SiteName:" + DashboardCount.SiteName + ";ListName:" + DashboardCount.ListName + ";ViewName:" + DashboardCount.View3Name + ";TileName:" + DashboardCount.Tile3Name + ";MaxNormalCount:" + DashboardCount.MaxNormalCount3 + ";MaxWarningCount:" + DashboardCount.MaxWarningCount3; 
                }
                //Configure the web service providing the live data.
                tile.WebServiceSettings.Path = "~/_layouts/DashboardWS/DashboardWS.asmx";
                tile.WebServiceSettings.Method = "GetEmpData";


                //Attach client side event handlers.
                tile.OnClientDataLoaded = "tileDataLoaded";
                tile.OnClientDataLoadingError = "tileDataLoadingError";
                //tile.OnClientTemplateDataBound = "tileClientTemplateDataBound";
            }

            
        }
    }



 
Reeba
Top achievements
Rank 1
 asked on 12 Jan 2015
1 answer
143 views
On save button click i want to save the values stored in all my ItemTemplate's Label which is inside GridTableView of a RadGrid.

I 'm not sure how to write the foreach statement on Save button click to get the those.

My Efforts-

protected void btnSave_Click(...)
{
     foreach(GridDataItem item in rgScopeOfWork.MasterTabelView.Items)
     {
          // here we can get only those which are outside of the GridTableView 
     }
}

How to write foreach ​to get to loop through the columns inside GridTableView?

Thanks . 
Pavlina
Telerik team
 answered on 12 Jan 2015
1 answer
64 views
http://www.telerik.com/forums/radconfirm-on-page-load

building on the post from above is there a way to change this so the window only appears the first time (per session). I want the user to see it the first time they start a new session on the site, but should they revisit the homepage i dont want them to see the confirm window again. Thanks
Marin Bratanov
Telerik team
 answered on 12 Jan 2015
1 answer
98 views
I cannot get the RadNotification to display from a button click (.Show) if I put a RadFileExplorer control in it. I get an error of 'Uncaught TypeError: Cannot read property 'getContentElement' of null'.

Is this achievable? I'm trying to create a 'sidebar' where the user can navigate files.

Tnx
Marcel


Marin Bratanov
Telerik team
 answered on 12 Jan 2015
4 answers
177 views
Hi, I am having a problem formatting a HtmlChart. Specifically I want to reduce spacing/padding or margins in the the axis.I also want to hide the borders (lines) of the x and y axis but cant seem to find a way to do this. Below is aspx. I have also attached image of how it looks now (current). And how I want it to look (desired). I want the horizontal bars to have almost no gap (eg 5 px or so) so that its more compact. How can I accomplish this do I have to hack w css? If so what are the relevant properties? Thanks

<telerik:RadHtmlChart runat="server" ID="rcRatings" Height="150px"
Width="200px">
<PlotArea>
<Series>
<telerik:BarSeries DataField="rating" Name="Rating">
<Appearance >
<FillStyle BackgroundColor="Orange" />
</Appearance>
<LabelsAppearance Visible="false">
</LabelsAppearance>
</telerik:BarSeries>
</Series>
<XAxis DataLabelsField="title">
<MinorGridLines Visible="false"></MinorGridLines>
<MajorGridLines Visible="false"></MajorGridLines>
</XAxis>
<YAxis Step="1">
<MinorGridLines Visible="false"></MinorGridLines>
<MajorGridLines Visible="false"></MajorGridLines>
<LabelsAppearance Visible = "false" />
<TitleAppearance Visible = "false" />
</YAxis>
</PlotArea>
<Legend>
<Appearance Visible="false"></Appearance>
</Legend>
<ChartTitle>
<Appearance Visible="False" />
</ChartTitle>
</telerik:RadHtmlChart>
Lee
Top achievements
Rank 1
 answered on 12 Jan 2015
1 answer
106 views
Hi

Reading following forum post (http://www.telerik.com/forums/display-boolean-field-as-checkbox) has lead me to try it.

What does not work is when I click the checkbox it does not get checked / unchecked. jsfiddle here: http://jsfiddle.net/3n2ottx7/

Funny enough - I can click the cell (anywhere but the actual checkbox), then click the checkbox inside that cell (only).

How can it work as expected and why is this not a standard example? - No normal user in the world works with "true" / "false" that turn into checkboxes when clicked - as per kendo example: http://dojo.telerik.com/ANItE

Thanks
Konstantin Dikov
Telerik team
 answered on 12 Jan 2015
1 answer
71 views
I am using the Social Share and it's working great. One item I am trying to do is figure out how many times a share is happening. How can I perform a logging of each click and share? Is there a server side event that fires that I can catch and then save the information into SQL Server for reporting?
Danail Vasilev
Telerik team
 answered on 12 Jan 2015
2 answers
193 views
Hi All, 
I am using the below code to retrieve an varbinary image from a database. Is it possible to display the image into an image editor.
Any idea or sample code 
SqlConnection conn = new SqlConnection(strconnection);
  SqlDataAdapter sda = new SqlDataAdapter("select Front_Image,Rear_Image from Transactions", conn);
  DataTable dt = new DataTable();
  sda.Fill(dt);
 
  foreach (DataRow row in dt.Rows)
      {
 
      //Get the byte array from image file
      byte[] imgBytes = (byte[])row["Front_Image"];
 
      //If you want convert to a bitmap file
      TypeConverter tc = TypeDescriptor.GetConverter(typeof(Bitmap));
      Bitmap MyBitmap = (Bitmap)tc.ConvertFrom(imgBytes);
 
 
      string imgString = Convert.ToBase64String(imgBytes);
      //Set the source with data:image/bmp
      Front_img.Src = String.Format("data:image/Bmp;base64,{0}\"", imgString);


Thanks
Vessy
Telerik team
 answered on 12 Jan 2015
8 answers
158 views
Hello,

I have a problem with the progress area of upload control . when i select file and click on any control that causes postback the upload process starts and progress area appears, but actually no file is uploaded   which is not convenient. I need only to show the progress area and begin upload process when i need so. please help me.
Thanks
Nencho
Telerik team
 answered on 12 Jan 2015
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?