Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
267 views
I have a radbinaryimage in a listview and on Radlistview1.ItemDataBound I am trying to set the DataValue to another field from my sql Query based on whether the record is "Signed" How can I do this it keeps giving me errors.

Protected Sub RadListView2_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadListViewItemEventArgs) Handles RadListView2.ItemDataBound
       If TypeOf e.Item Is RadListViewDataItem Then
           Dim signed As Label = DirectCast(e.Item.FindControl("Label6"), Label)
           Dim pnl1 As Panel = DirectCast(e.Item.FindControl("TopPanel"), Panel)
           Dim lbl4 As Label = DirectCast(e.Item.FindControl("Label4"), Label)
           Dim pnl2 As Panel = DirectCast(e.Item.FindControl("BottomPanel"), Panel)
           Dim btn1 As Button = DirectCast(e.Item.FindControl("Button1"), Button)
           Dim menu2 As RadMenu = DirectCast(sender.findcontrol("RadMenu2"), RadMenu)
           Dim img As RadBinaryImage = DirectCast(e.Item.FindControl("RadBinaryImage4"), RadBinaryImage)
           'Dim fball As menu2.
             
           'signed.Text = "True" 'Then
           'DirectCast(e.Item.FindControl("Div1"))
           'Div1.backgroundcolor = "00CC99"
       End If
         
       If Session("Signed") = 1 Then
           Dim menu2 As RadMenu = DirectCast(sender.findcontrol("RadMenu2"), RadMenu)
           Dim fball As RadMenuItem = DirectCast(menu2.FindItemByText("QuickFax (Signed)"), RadMenuItem)
           Dim fbsigned As RadMenuItem = DirectCast(menu2.FindItemByText("QuickFax (ALL)"), RadMenuItem)
           Dim img As RadBinaryImage = DirectCast(e.Item.FindControl("RadBinaryImage4"), RadBinaryImage)
           img.DataValue =<%# Bind("SignedImage") %>
           fball.Visible = True
           fbsigned.Visible = True
       End If
Rosen
Telerik team
 answered on 28 Jul 2010
1 answer
94 views
Hi,

I'm having an annoying issue with RadScheduler's rendering within a RadSplitter.

that's the code:
<telerik:RadSplitBar id="RadSplitbar1" EnableResize="false" runat="server" CollapseMode="Forward"></telerik:RadSplitBar>
                        <telerik:RadPane id="MiddlePane" runat="server">
                             <!-- Content -->
                              <!--<td valign="Top">-->
                         
                                <table width="100%">
                                    <tr>
                                        <td>
                                         <asp:updatepanel runat="server" ID="MasterUpdatePanel">
<table>
<tr>
        <td width="100%" colspan="2">
            <telerik:RadScheduler ID="SchedulerAttivita" runat="server"
                EnableCustomAttributeEditing="True" Width="100%" AllowDelete="False" AllowInsert="False"
                WeekView-HeaderDateFormat="dd/MM/yyyy" MonthView-UserSelectable="false"
                TimelineView-UserSelectable="false" DayView-UserSelectable="true"
                DayStartTime="<%# StartTime %>" DayEndTime="<%# EndTime %>" OverflowBehavior="Expand"
                WorkDayStartTime="<%# StartTime %>" WorkDayEndTime="<%# EndTime %>"
                ShowFooter="False" ShowAllDayRow="False" AppointmentStyleMode="Default"
                MinutesPerRow="<%# MinutesPerRow %>" FirstDayOfWeek="Monday" AdvancedForm-Enabled="false"
                LastDayOfWeek="Friday" DataKeyField="ID" DataStartField="DATA_INIZIO" DataEndField = "DATA_FINE"
                DataSubjectField="SUBJECT" SelectedView="WeekView"
                onappointmentclick="SchedulerAttivita_AppointmentClick"
                onformcreating="SchedulerAttivita_FormCreating"
                OnClientAppointmentMoving="OnClientAppointmentMoving"
                onnavigationcommand="SchedulerAttivita_NavigationCommand" Culture="it-IT"
                EnableAdvancedForm="False" HoursPanelTimeFormat="t">
                    <AdvancedForm Enabled="False" EnableCustomAttributeEditing="True"></AdvancedForm>
                    <Localization HeaderDay="<%$ Resources:SchedulerHeaderDay %>"
                    HeaderToday="<%$ Resources:HeaderToday %>" HeaderWeek="<%$ Resources:HeaderWeek %>" />
                    <TimelineView UserSelectable="False"></TimelineView>
                    <WeekView HeaderDateFormat="dd/MM/yyyy"></WeekView>
                    <MonthView UserSelectable="False"></MonthView>
            </telerik:RadScheduler>
        </td>
    </tr>
</table>
</asp:updatepanel>                                                              
                                        </td>
                                    </tr>
                                </table>
</telerik:RadPane>
                    </telerik:RadSplitter>

At the Page Load I see that the Radscheduler isn't completely rendered, as you can see in the attached screenshot.
If I make a post on the page, or simply closing and reopening the radsplitter bar, the scheduler behave as expected, filling the 100% width.

Some ideas about that?
Thanks in advance, bye

Leonardo
Peter
Telerik team
 answered on 28 Jul 2010
1 answer
109 views
Hi,

Is it possible to perform some action when a resource is clicked? i.e. can I make the resource name a link to something?

Cheers
Jon
Peter
Telerik team
 answered on 28 Jul 2010
4 answers
126 views
I'm using a radSplitter to devise the page in two part, the top and the bottom. In the bottom pane I have a radEditor with his ToolbarMode="ShowOnFocus". My problem is this : I set the contentUrl of the top pan to a PDF document and the document is located a tn front of all the control so the toolbar of my radEditor is not visible. Is there a way that I can put the toolbar in front of it. Is suspect it might not be possible because the pdf is opened with the default program and you might not have control over this, but I'm asking anyway. Another solution that would work for me, if it is possible, would be to set ToolbarMode="PageTop" but I would like to have the toolbar on top of his pane, not the top of the page.

I have attached an image showing the behavior of the radEditor when it has focus.

If anyone have a solution.

Thanks,
Sébastien
Rumen
Telerik team
 answered on 28 Jul 2010
2 answers
95 views
When we are  trying to split two cells, borders doesn't appear on radgrid as you can see on the attach file below?
Is it possible to help?
Maria Ilieva
Telerik team
 answered on 28 Jul 2010
1 answer
99 views
Hi, I have 4 radDatePicker in a form say start date from, start date to, end date from and end date to. the scenario is if i select something in start date from or start date to both end date from and end date to should be disabled viz. when i clear the values all four radDatePicker should be enabled..
any body have any suggestions how to do this??
Shinu
Top achievements
Rank 2
 answered on 28 Jul 2010
1 answer
59 views
Hi All,

I recently updated the radGrid Control from 2008.3.1314.34  to   2010.1.415.35. I am having a problem. When i expand the grid there is a blank column at the end of the Master grid. when i went on the apsx page i cannot find any blank column. I went in to the source code of the page and found that there is a blank column and the whold grid alignment is changed.
Also all the column are automatically resized to same width, i have to manually go in and change the width of each column  

Is there a way to remove or hide this column or this is a bug ?
Is there a way to automatically change the size of the column to the atleast the size of the header text?

Mahesh
Iana Tsolova
Telerik team
 answered on 28 Jul 2010
3 answers
473 views
Hi,
I am using a Map and a RadAjax Manager. My map's height and width is set to 100% of its container.On  using asp.net updatepanel  I can give a css style  and map renders perfectly. However, on using RadAjax manager map disappears.
The reason was RadAjax manager was wrapping my map with an update panel and unfortunately its width and height isnot set which caused map width and height = 0px.
How can I give a width and height  value of 100% to updatepanel created by RadAjax manager, Is it possible to know the client ID of Update panel generated  by RadAjax Manager that is wrapping the map, so that I can give a css style.

Any suggestion is appreciated.
Thanks
Prava
Tsvetina
Telerik team
 answered on 28 Jul 2010
11 answers
391 views

I am making a simple grid control using the radgrid which derives its structure(columns) from an xml and databind using client side web serivce. It works fine, render intially, paging/sorting work fine, I implement the client OnRowDataBound event and render hyperlinks also. When a postback happens from any other buttons on the page, the columns in the grid are duplicated.

Following is my simplified code:
aspx:

<asp:Button ID="btnPostBack" runat="server" Text="PostBack" /> 
        <telerik:RadGrid ID="grid" runat="server" GridLines="None" AllowFilteringByColumn="false" 
            AllowSorting="true" AllowPaging="true" PageSize="10" AutoGenerateColumns="false">  
            <ClientSettings> 
                <DataBinding SelectMethod="GetResults" /> 
                <ClientEvents /> 
            </ClientSettings> 
            <MasterTableView Width="100%" AutoGenerateColumns="false">  
            </MasterTableView> 
            <PagerStyle Mode="NextPrevAndNumeric" /> 
        </telerik:RadGrid> 

Code behind:
protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
            FillColumns();  
        }  
        [Serializable]  
        public class Field  
        {  
            public String ColumnName { getset; }  
            public String DisplayName { getset; }  
        }  
        private void FillColumns()  
        {  
            List<Field> fields = new List<Field>  
            {  
                new Field { DisplayName = "ID", ColumnName = "ID" },  
                new Field { DisplayName = "Name", ColumnName = "Name" },  
                new Field { DisplayName = "Description", ColumnName = "Description" },  
                new Field { DisplayName = "Location", ColumnName = "Location" }  
            };  
            grid.MasterTableView.Columns.Clear();  
            foreach (var field in fields)  
            {  
                GridBoundColumn col = new GridBoundColumn();  
                grid.MasterTableView.Columns.Add(col);  
                col.DataField = field.ColumnName;  
                col.HeaderText = field.DisplayName;  
                if (field.ColumnName == "ID")  
                    col.DataType = Type.GetType("System.Int32");  
                  
            }  
        }  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            grid.ClientSettings.DataBinding.Location = ResolveUrl("~/SearchService.asmx");  
        } 

ASMX:
[WebService(Namespace = "http://tempuri.org/")]  
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]  
    [System.ComponentModel.ToolboxItem(false)]  
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.   
    [System.Web.Script.Services.ScriptService]  
    public class SearchService : System.Web.Services.WebService  
    {  
        [WebMethod(EnableSession = true)]  
        public Dictionary<String, Object> GetResults(  
            int startRowIndex, int maximumRows,  
            List<GridSortExpression> sortExpression,  
            List<GridFilterExpression> filterExpression)  
        {  
            DataTable dt = new DataTable();  
            dt.Columns.Add("ID", Type.GetType("System.Int32"));  
            dt.Columns.Add("Name");  
            dt.Columns.Add("Description");  
            dt.Columns.Add("Location");  
 
            for (int i = 0; i < 35; i++)  
            {  
                System.Data.DataRow dr = dt.NewRow();  
                dr["ID"] = i;  
                dr["Name"] = "Name" + i;  
                dr["Description"] = "Description" + i;  
                dr["Location"] = "Location" + i;  
                dt.Rows.Add(dr);  
            }  
 
            return new Dictionary<String, Object>  
            {  
                { "Data", RowsToDictionary(dt, dt.Select(string.Format(" ID > {0} and ID < {1}", startRowIndex.ToString(), (startRowIndex + maximumRows).ToString()))) },  
                { "Count", dt.Rows.Count }  
            };  
        }  
        private static List<Dictionary<stringobject>> RowsToDictionary(DataTable table, DataRow[] rows)  
        {  
            List<Dictionary<stringobject>> objs =  
                new List<Dictionary<stringobject>>();  
            foreach (DataRow dr in rows)  
            {  
                Dictionary<stringobject> drow = new Dictionary<stringobject>();  
                for (int i = 0; i < table.Columns.Count; i++)  
                {  
                    drow.Add(table.Columns[i].ColumnName, dr[i]);  
                }  
                objs.Add(drow);  
            }  
 
            return objs;  
        } 


Note, this is a simplified version and the control has more complicated things which are not relevant here.

Thank you,
Tilak
Iana Tsolova
Telerik team
 answered on 28 Jul 2010
3 answers
82 views
I'm trying to figure out how to create a minutes frequency option for the schedular. For a project we're doing, hourly is not in small enough intervals.

Peter
Telerik team
 answered on 28 Jul 2010
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?