Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
111 views
Hi,

I've developed a Grid with the Grid-control. This control has the following ClientSettings;

  • FrozenColumnsCount="3"
  • UseStaticHeaders="true"
  • AllowScroll="true"

When rendered the Grid looks like the attached ExampleGrid.jpg. As you can see there are several TemplateColumns with dates in the header and TextBoxes in the item. When I drag the horizontal scrollbar the first 3 columns stay on their position and the others will scroll as expected.

Now for the problem; when I click in the first textbox on the screen (the one beneath 28-12) and press tab several times the first 3 columns don't stay on their position. See the attached exampleerror.jpg

I've looked throught the examples but this situation (the one with editable controls like textboxes) aren't available. Can you please help me with this?

Regards

Dimo
Telerik team
 answered on 22 Dec 2009
3 answers
94 views
Hi!

I have a RadGrid on my page with two kinds of columns:
- One GridTemplateColumn that holds information about the items such as name and id.
- Numerous of GridButtonColumns, one column for each week for one year a head. These columns is created in the code-behind.
For each item in the grid i display an image in the correct column if a certified statement returns true.

Now for my question: Is it possible to move these images to another cell but in the same row (for the same item). If its possible i would like som kind of event to be triggered so I will be able to perform updates to the database.

Regards,
Johannes
Johannes Arevärn
Top achievements
Rank 1
 answered on 22 Dec 2009
3 answers
203 views
hi

I could not get the title printed on the PDF. How should i go about it? Thanks


Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
        If e.CommandName = RadGrid.ExportToPdfCommandName Then
            IsPdfExport = True
            RadGrid1.ExportSettings.ExportOnlyData = False
            RadGrid1.ExportSettings.OpenInNewWindow = True
            RadGrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("210mm")
            RadGrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("297mm")
            RadGrid1.ExportSettings.IgnorePaging = True
        End If
    End Sub

 Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
        If IsPdfExport AndAlso TypeOf e.Item Is GridHeaderItem Then
            RadGrid1.ExportSettings.Pdf.Title = "Unpaid/Partial Payment"
            Dim headerItem As GridHeaderItem = e.Item
            headerItem.Style("horizontal-align") = "left"
            headerItem.Style("font-size") = "10pt"
            headerItem.Style("background-color") = "lightgray"

            For Each cell As TableCell In headerItem.Cells
                cell.Style("text-align") = "left"
            Next
        End If
        If TypeOf e.Item Is GridDataItem Then
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)

            For Each cell As TableCell In item.Cells
                cell.Style("text-align") = "left"
                cell.Style("font-size") = "10pt"
                If e.Item.ItemType = GridItemType.AlternatingItem Then
                    e.Item.BackColor = System.Drawing.Color.LightYellow
                End If
            Next
        End If

        If IsPdfExport AndAlso TypeOf e.Item Is GridFooterItem Then
            Dim footerItem As GridFooterItem = e.Item
            footerItem.Style("horizontal-align") = "left"
            footerItem.Style("font-size") = "10pt"

            For Each cell As TableCell In footerItem.Cells
                cell.Style("text-align") = "left"
            Next
        End If
    End Sub

L
Top achievements
Rank 1
 answered on 22 Dec 2009
1 answer
86 views
Hello,
         I want to use xml file as a datasource for the list view. I had an xml file but telerik control crashed. I think it has something to do with multiple root node. Please check the attached file. But I had a clean xml file with just one root node,

<?xml version ="1.0" encoding ="utf-8"?>
<columns>
<column>Name</column>
<column>Short text.</column>>
<column>Long text.</column>>
</columns>

In the layout editor I didnt three columns..  Am I doing anything wrong? Or Is there a tutorial for XML datasource for list view?

Thanks,
Bharani
Rosen
Telerik team
 answered on 22 Dec 2009
1 answer
97 views
hi

im using tabstrip control

and i want to find all controls that my radpageview control use

want to use a same code like this on fiding the control

    Public Sub ImpostaCampiDataBase(ByVal Pagina As Page, ByVal IDWS As String, ByVal NotaMod As String) 
        ' imposta campi data base dalla pagina web 
        TestoMessaggio = "" 
        Dim c As Control 
        Dim childc As Control 
        Dim intc As Integer 
 
        Try 
            For Each c In Pagina.Controls 
                For Each childc In c.Controls 
                    If TypeOf childc Is TextBox Then 
                        If Left(CType(childc, TextBox).ID, 3) = "txt" Then 
                            ReDim Preserve param(intc) 
                            ReDim Preserve paramVal(intc) 
                            param(intc) = Mid(childc.ID, 4) 
                            paramVal(intc) = CType(childc, TextBox).Text 
                            intcintc = intc + 1 
                        End If 
                    ElseIf TypeOf childc Is Telerik.Web.UI.RadTextBox Then 
                        If Left(CType(childc, Telerik.Web.UI.RadTextBox).ID, 3) = "txt" Then 
                            ReDim Preserve param(intc) 
                            ReDim Preserve paramVal(intc) 
                            param(intc) = Mid(childc.ID, 4) 
                            paramVal(intc) = CType(childc, Telerik.Web.UI.RadTextBox).Text 
                            intcintc = intc + 1 
                        End If 
                    ElseIf TypeOf childc Is Telerik.Web.UI.RadDatePicker Then 
                        If Left(CType(childc, Telerik.Web.UI.RadDatePicker).ID, 3) = "rdp" Then 
                            ReDim Preserve param(intc) 
                            ReDim Preserve paramVal(intc) 
                            param(intc) = Mid(childc.ID, 4) 
 
                            If CType(childc, Telerik.Web.UI.RadDatePicker).IsEmpty = True Then 
                                paramVal(intc) = "" 
                            Else 
                                paramVal(intc) = CType(childc, Telerik.Web.UI.RadDatePicker).SelectedDate 
                            End If 
                            intcintc = intc + 1 
                        End If 
 
                    ElseIf TypeOf childc Is Telerik.Web.UI.RadComboBox Then 
                        If Left(CType(childc, Telerik.Web.UI.RadComboBox).ID, 3) = "lst" Then 
                            ReDim Preserve param(intc) 
                            ReDim Preserve paramVal(intc) 
                            param(intc) = Mid(childc.ID, 4) 
                            paramVal(intc) = CType(childc, Telerik.Web.UI.RadComboBox).SelectedValue 
                            intcintc = intc + 1 
                        End If 
                    End If 
                Next 
            Next 
            ReDim Preserve param(intc) 
            ReDim Preserve paramVal(intc) 
            param(intc) = "IDWS" 
            paramVal(intc) = IDWS 
            intcintc = intc + 1 
            ReDim Preserve param(intc) 
            ReDim Preserve paramVal(intc) 
            param(intc) = "NOTAMOD" 
            paramVal(intc) = NotaMod 
 
        Catch _err As Exception 
            TestoMessaggio = "Errore Imposta Campi DataBase - " + _err.Source + "->" + _err.Message 
        End Try 
 
    End Sub 

i hope u will help me

thanks a lot

regards
webster
Shinu
Top achievements
Rank 2
 answered on 22 Dec 2009
6 answers
197 views
Hi all,
i am playing around with the Menu control and ITemplates and am trying to figure out how to control the events fired within the ITemplate class and having it effect the Menu Item that it is in client side.

What i have is a Menu control with two items using my custom ITemplate.  In essence it is a Panel with a small panel within it that i want to be able to click on and have it close the menu item it is in.  It will end up being a menu item that can remove itself from the menu.

class CaseMenuTemplate : ITemplate 
    { 
        public void InstantiateIn(Control container) 
        { 
            Panel pBase = new Panel(); 
            Panel pHeader = new Panel(); 
            Panel pContent = new Panel(); 
 
            pBase.CssClass = "MenuPanelBase"
            pHeader.CssClass = "MenuPanelHeader"
            pContent.CssClass = "MenuPanelContent"
             
            Label lblCase = new Label(); 
            lblCase.ID = "lblCase"
            lblCase.Text = "Case:"
            lblCase.CssClass = "MenuLabelCase"
            pHeader.Controls.Add(lblCase); 
 
            Label lblCaseNumber = new Label(); 
            lblCaseNumber.ID = "lblCaseNumber"
            lblCaseNumber.Text = "1234567890"
            lblCaseNumber.CssClass = "MenuLabelCaseNumber"
            pHeader.Controls.Add(lblCaseNumber); 
 
            Button pClose = new Button(); 
            pClose.CssClass = "MenuCloseButton"
             
            pHeader.Controls.Add(pClose); 
 
            pBase.Attributes.Add("onmouseover", "this.className = 'MenuPanelBaseHover';"); 
            pBase.Attributes.Add("onmouseout", "this.className = 'MenuPanelBase';"); 
            pClose.Attributes.Add("onmouseover", "this.className = 'MenuCloseButtonHover';"); 
            pClose.Attributes.Add("onmouseout", "this.className = 'MenuCloseButton';"); 
            pClose.Attributes.Add("onclick", "deleteItem(this);return false;"); 
 
            container.Controls.Add(pBase); 
            pBase.Controls.Add(pHeader); 
            pBase.Controls.Add(pContent); 
 
        } 


I have the ITemplate control loading as expected, but i cannot find out how to, on the onclick event of the panel, have the menu remove the parent item from iteself.

suggestions?
Jordan
Yana
Telerik team
 answered on 22 Dec 2009
10 answers
122 views
I have a splitter in my master page and then another one in one of my content pages, when I try to load the page I get a javascript eroor at this line:e.style.width=b.toString()+"px";   inside of this code :
function(){a.SplitterPaneBase.callBaseMethod(this,"initialize");  
var b=this._isSplitterVertical();  
this.getVarSize=b?this.get_width:this.get_height;  
this.setVarSize=b?this.set_width:this.set_height;  
this.getVarMinSize=b?this.get_minWidth:this.get_minHeight;  
this.getVarMaxSize=b?this.get_maxWidth:this.get_maxHeight;  
},dispose:function(){a.SplitterPaneBase.callBaseMethod(this,"dispose");  
},_setOuterWidth:function(e,c){if(!e){throw Error.argumentNull("element");  
}if(c==null){throw Error.argumentNull("width");  
}var d=$telerik.getBorderBox(e);  
var f=$telerik.getPaddingBox(e);  
var b=c-d.horizontal-f.horizontal;  
e.style.width=b.toString()+"px";  
},_setOuterHeight:function(e,b){if(!e){throw Error.argumentNull("element");  
}if(b==null){throw Error.argumentNull("height");  
}var d=$telerik.getBorderBox(e);  
var f=$telerik.getPaddingBox(e);  
var c=b-d.vertical-f.vertical;  
 
Tsvetie
Telerik team
 answered on 22 Dec 2009
10 answers
157 views
Attempt to click on Close(X) icon of editor toolbar. Nothing happens. Sometimes it works sometimes it dosen't, unwanted behavior.
Please help me on this.
Also Toggle Full-screen takes much longer times. Is there any way to implement a processing message or reduce the time.
 
Thanks
Praveen
manoj sharma
Top achievements
Rank 1
 answered on 22 Dec 2009
3 answers
150 views
I am using the scheduler control with mostly the default settings.  I am databinding my own datasource in code, and have created event handlers for the AppointmentInsert and AppointmentDelete events, which work just fine.  My AppointmentUpdate event seems to have a small problem.  I'm sure it's something simple, but I can't seem to figure out what.

The problem is that the event fires and I'm able to update the appointment record in my database just fine.  But the scheduler control does not retain the updated information.  It continues to display the previous information.  It's as though it's canceling the update event.

Here is my code:

       protected void rscSchedule_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e) 
        { 
            aspnet_User user = SecurityExtended.UserGet(Page.User.Identity.Name); 
            Telerik.Web.UI.Appointment appointment = e.ModifiedAppointment; 
            Data.Appointment appt = Appointments.AppointmentUpdate((int)appointment.ID, appointment.Subject, appointment.Start, appointment.End, user.UserId, appointment.RecurrenceRule, (int?)appointment.RecurrenceParentID, "", appointment.Description, true); 
 
            foreach (Resource resource in appointment.Resources) 
            { 
                AppointmentResourceType rt = Appointments.AppointmentResourceTypeGet(resource.Type); 
                int key = (int)resource.Key; 
                string text = (string)resource.Text; 
                if (key > 0) Appointments.AppointmentResourceUpdateSingle(appt.AppointmentID, key); 
            } 
        } 


Can anyone help me determine what I might be doing wrong here that would cause the control to not display the updated appointment information?  Thanks in advance.
Peter
Telerik team
 answered on 22 Dec 2009
1 answer
229 views
Hi,

I have a nested radgrid. I want to update the grid elements on click of Save Button present outside the grid. But I am unable to find the child grid's elements there.
Please help how to get elemnts outside the radgrid event.

Thanks,
Princy
Top achievements
Rank 2
 answered on 22 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?