Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
629 views
Hi

Is therre a way to highlight the current date in RadCalendar? (similar to focused date when a date is selected)...


Kind regards

Mark Eaton
Andy
Top achievements
Rank 1
 answered on 12 Jun 2013
2 answers
183 views
Hi,
     How do I set radtooltip for raddatepicker. I have tried many a things and failed. Please help.
thanks
Savyo
Ivo
Top achievements
Rank 1
 answered on 12 Jun 2013
6 answers
420 views
I am adding the columns to my radgrid dynamically, in page_load as shown in the link,
http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html#Section1
 using the method
- declare the RadGrid control in the ASPX file and define its structure in the code-behind.

Now, the issue is that, whenever a postback occurs in the page, my deletecolumn disappears. Obviously this is because I am checking for ispostback in my CreateGridDynamically() method. But then, why all other columns are populated after postback then?

What I need to have is a deletecolumn(either template column or gridbuttoncolumn). I tried to add the template column. but as it was written in that link, it needed to call the method in page_init. Then my needdatasource didn’t work. In effect, my grid didn’t bind with data at all. So, I was trying to add the gridbutton column. now, that works (I mean delete column is shown initially). But whenever a postback occurs in the page(may be with some other ddl change), the column becomes hidden. I removed the ispostback checking , but that resulted in all columns added twice to the grid, after a postback. So, is there any other grid event where I need to add the deletecolumn to make it show after postback, or what may be the wrong thing in my code?

btw, i can click on my delete button and it fires the itemcommand. but even if i added the commandname for the deletecolumn, the e.commandName appears as "" in the itemcommand. Does it have a relation to what am doing? what can i do to get the actual command name instead?

Please help me to get aroud this. Any help is appreciated.

Veena
Veena
Top achievements
Rank 1
 answered on 12 Jun 2013
1 answer
44 views
Hi, I'm struggling to make a RadCalendar to apparently only allow to select weeks.
I would like the hover effect of row headers selection (all days in a week are rchover styled)  whenever the mouse is over a concrete date.
How could I achieve this?

Thank you in advance :)
Viktor Tachev
Telerik team
 answered on 12 Jun 2013
2 answers
89 views
Hi,

I'm new to using these controls so please forgive my ignorance!  I am using the RadTreeList to display a list of events and some attributes of those events (start date etc).  When the user selects a node in the tree I want to call a server side function to populate another list of the users on that event but I can't seem to work out how that is done.  

I have looked at the selection examples but I don't want a 'check box' which is what the server side selection uses - I just want to click a row in the tree and call a server side function to populate a list box.  I have implemented the client side OnItemSelected but I'm sure that there must be an event server side that is called when the user clicks on a node...
Chris
Top achievements
Rank 1
 answered on 12 Jun 2013
1 answer
59 views
I have a RadGrid that contains an custom Edit Template (which can also be used for inserts). When the user has the edit template open, I need to prevent them from selecting another row of the grid until that edit is saved or canceled.  Is there a simple setting for this?  If not, I'm guessing I need to add client side code in the OnRowSelecting event.  How do I detect if the grid that the user clicked on has an edit or insert template showing?  How do I detect if a DIFFERENT grid on the same page has an edit or isnert template showing?

Thanks
Princy
Top achievements
Rank 2
 answered on 12 Jun 2013
3 answers
76 views

Hi there, is there a way to make the appointments be 'behind' the timeslots?  I am looking on a scheduler
that will allow you to hover on anytime slot and highlight it, no matter if there is an appointment there or not, now, when you hover,
the timeslot only highlights when you touch the 10% left over by the appointment.

If the Appointment had some sort of z -index prop, and the timeslot was transparent , maybe this will work but I have no clue where to begin.

Thanks.
Magdalena
Telerik team
 answered on 12 Jun 2013
5 answers
475 views
With much prior help from Telerik Support, I've implemented a fairly sophisticated RadListBox which let's the user single-click and double-click.  I thought everything was working perfectly until I discovered today that the vertical scrollbar is not maintaining its position between Postbacks.  This needs to be fixed.

Here's the pertinent layout code:

<asp:Panel ID="panelMain" runat="server" style="border-top: solid 1px #000000; padding-bottom:20px">
  <telerik:RadSplitter ID="radSplitter" runat="server" LiveResize="false">
    <telerik:RadPane ID="radPaneLeft" runat="server" Scrolling="None" MinWidth="232" MaxWidth="272">
      <telerik:RadSlidingZone ID="radSlidingZone" runat="server" Width="22" Height="0" ClickToOpen="true" DockedPaneId="radSlidingPane">
        <telerik:RadSlidingPane ID="radSlidingPane" runat="server" BackColor="#F0F8FF" CssClass="slidingPane" TabView="TextAndImage" IconUrl="~/Images/hierarchy.gif"
                                DockOnOpen="true" OnClientDocked="radSlidingPane_Docked" OnClientUndocked="radSlidingPane_Undocked" Width="200">
 
          <telerik:RadListBox ID="radListBoxMuck" runat="server" Width="100%" Height="100%" OnClientSelectedIndexChanged="rlbClicked" OnClientItemDoubleClicked="rlbDoubleClicked"
                              OnClientContextMenu="rlbContextMenu" onselectstart="return false;" OnItemCreated="radListBoxMuck_ItemCreated" EnableDragAndDrop="false">

And here's the Javascript code that handles the RadListBox:

var rlbClickTimer;  // Required presence for logic to distinguish between single & double-clicks
 
function rlbClicked() {
  if (rlbClickTimer) clearTimeout(rlbClickTimer);
 
  rlbClickTimer = setTimeout(function () {
    // Code in 'rlbContextMenu' causes this method to be called.  When a right-click occurs,
    // we don't want a PostBack to occur so we're just going to exit quietly.
    var rlbRightClicked = $('input[id$=_radListBoxIsRightClicked]')[0].id;
    var hidVar = document.getElementById(rlbRightClicked);
    if (hidVar.value == 'true') {
      hidVar.value = ''// We successfully intercepted the right-click that got us to here so clear the hidden variable for when a left-click occurs
      return;
    }
 
    var updatePanel = $('div[id$=_UpdatePanel1]')[0].id;
    var slidingZone = $find($('table[id$=_radSlidingZone]')[0].id);
    var slidingPane = slidingZone.getPanes()[0];
    var listBox = $find($("#" + slidingPane.get_id() + " div[id$=_radListBoxMuck]")[0].id);
 
    var rlbIdxName = $('input[id$=_radListBoxIndex]')[0].id;
    hidVar = document.getElementById(rlbIdxName);
    var rlbIdxVal = hidVar.value;
 
    var parameters;
 
    if (rlbIdxVal == '')
      parameters = 'radListBoxMuck,' + listBox.get_selectedIndex();
    else {
      parameters = 'radListBoxMuck,' + rlbIdxVal;
      hidVar.value = '';
    }
 
    parameters += ',1';
 
    __doPostBack(updatePanel, parameters);
  }, 250);
 
  setTimeout(function() { scrollIntoView() }, 400);
}
 
// Works in conjunction with 'rlbClicked' and handles double-clicking on a RadListBox item.
function rlbDoubleClicked() {
  var updatePanel = $('div[id$=_UpdatePanel1]')[0].id;
  var slidingZone = $find($('table[id$=_radSlidingZone]')[0].id);
  var slidingPane = slidingZone.getPanes()[0];
  var listBox = $find($("#" + slidingPane.get_id() + " div[id$=_radListBoxMuck]")[0].id);
 
  clearTimeout(rlbClickTimer);
 
  var parameters = 'radListBoxMuck,' + listBox.get_selectedIndex() + ',2';
 
  __doPostBack(updatePanel, parameters);
}
 
// Ensures that the selected item, if there is one, remains visible to the user after a postback.
function scrollIntoView() {
  var slidingZone = $find($('table[id$=_radSlidingZone]')[0].id);
  var slidingPane = slidingZone.getPanes()[0];
  var listBox = $find($("#" + slidingPane.get_id() + " div[id$=_radListBoxMuck]")[0].id);
 
  var item = listBox.get_selectedItem();
  if (item != null)
    item.scrollIntoView();
}

Please note the last line of code, which calls the "scrollIntoView()" method of the RadListBoxItem.  I've stepped through the code and it appears to be running okay.  I've also confirmed that the "item" in question is always the correct one.  But it's as if "scrollIntoView()" isn't doing anything.

Is there something wrong with my code?

As an ancillary comment, I should mention that I've created a quite extensive function library that uses the AJAX Event Handler functions to maintain the position of any DIV scrollbar that I so identify during initialization.  It also works perfectly with your RadTreeView control.  But, when I tried using it with the RadListBox, it didn't work.  It relies on the fact that the "scrollTop" property of each DIV will range from '0' at its top position to a positive integer at the bottom.  So alternatively, if you could tell me how to adapt this code for the RadListBox then I'd also have a solution.  In other words, what RadListBox property maintains the scroll position?

Hope you can help!

Robert

Robert
Top achievements
Rank 1
 answered on 12 Jun 2013
2 answers
59 views
Hello  Telerik  folks,can You help here
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"
            AutoGenerateColumns="false" onitemcommand="RadGrid1_ItemCommand">
            <MasterTableView AutoGenerateColumns="false">
                <Columns>
                    <telerik:GridTemplateColumn>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server"   />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="employeenaem" HeaderText="EmployeeName">
                        <ItemTemplate>
                            <%#Eval("Employeename") %>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="employeeDesgination" HeaderText="EmployeeDesignation">
                        <ItemTemplate>
                            <%#Eval("EmployeeDesignation")%>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="Salary" HeaderText="salary">
                        <ItemTemplate>
                            <%#Eval("EmployeeSalary") %>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <telerik:RadButton ID="RadButton1" runat="server" Text="Print"
        onclick="RadButton1_Click">
        </telerik:RadButton>

.aspx.cs
protected void RadButton1_Click(object sender, EventArgs e)
    {
        PrintDocument pd = new PrintDocument();
        foreach (GridDataItem item1 in RadGrid1.MasterTableView.Items)
        {  
            CheckBox ChkedList = (CheckBox)item1.FindControl("CheckBox1");
            if (ChkedList.Checked)
            {
                Index = item1.ItemIndex;
                DrawImage();
            }
           
        }
    }

 public void  DrawImage()
    {
        if (m_oConn.State != ConnectionState.Closed)
        {

            m_oConn.Open();
        }
        m_oCmd = new MySqlCommand("select * from  printtest",m_oConn);
        DataSet ds = new DataSet();
        m_aDp = new MySqlDataAdapter(m_oCmd);
        m_aDp.Fill(ds);
        string dempname,dempdesg;
        decimal dsalary;
        dempname=(string)ds.Tables[0].Rows[Index]["Employeename"];
        dempdesg=(string)ds.Tables[0].Rows[Index]["EmployeeDesignation"];
        dsalary=(decimal)ds.Tables[0].Rows[Index]["EmployeeSalary"];
        string drawString2 = string.Empty;
        Graphics g;
        Bitmap b;
        Page p;
        b = new Bitmap(790, 1050);
        g = Graphics.FromImage(b);
        p = this.Page;
        p.Response.ContentType = "image/jpeg";
        g.FillRectangle(new SolidBrush(Color.White), 0, 0, 790, 325);
        g.FillRectangle(new SolidBrush(Color.White), 0, 325, 790, 1050)
        FontFamily fm1 = new FontFamily("Consolas");
        Font drawFont = new Font(fm1, 12);
        Font drFont = new Font("Arial", 8);
        Font drFont1 = new Font("Arial", 9);
        Font drsmallFont = new Font("Arial", 8);
        Font drnarrowFont = new Font("Arial Narrow", 8);
      
        Font drnarrowFont1 = new Font("Verdana,sans-serif", 8);
        Font drarialblackFont = new Font("Arial Black", 10);

        SolidBrush drawBrush = new SolidBrush(Color.Black);

        PointF drawPoint = new PointF(140.0F, 290.0F);

        Pen pn = new Pen(drawBrush);
     
        string path = Server.MapPath("images/InfoImg.png");
        Bitmap logo = new Bitmap(path);

        Graphics gra = Graphics.FromImage(logo);
      
        g.DrawImage(logo, 15.0F, 30.0F);

        ImageConverter ic = new ImageConverter();

        g.DrawString("PAY TO THE ORDER OF ____" + "__________________________________________________________________", drnarrowFont1, drawBrush, 15.0F, 120.0F);
        g.DrawString(dempname + "is worked as " + dempdesg + "and erans" + dsalary, drnarrowFont1, drawBrush, 145.0F, 117.0F);
        b.Save(p.Response.OutputStream, ImageFormat.Jpeg);
        
    }

Here ...I want to print the .....Data That in database....not current document......based user select  Data-rows and then click on Print.. ...presently.  I want to print the Multiple Image files...based on user selected rows ..only one Image Show in page......I don't want to show printing information ..I want to Print ...Image files......I search many website...I am not getting results.....That why I am post the thread...
Andrey
Telerik team
 answered on 12 Jun 2013
1 answer
329 views
overall, i would like a nested grid where there is a radio button list column. The column will have an approve option and a reject option if reject is selected all the items in the child grid will automatically inherit that value as well. If the reject button is pushed, also a text box for the parent item and each child item will appear next to the corresponding row. Your help would be so greatly appreciated!!!!
Eyup
Telerik team
 answered on 12 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?