Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
65 views
We are experiencing an issue with Firefox/RadEditor stripping tags from data that gets loaded into a RadEditor edit area.  The enabled filters are "None" but an unclosed tag at the very top (which is wanted) keeps getting stripped out in Firefox.  The behavior doesn't happen in IE or Safari.

I am curious what could cause this?  Any suggestions?

Thank you.
Rumen
Telerik team
 answered on 13 Jan 2011
3 answers
131 views
Hi
I've stuck with following problem.
I have a grid where I do use SetRenderMethodDelegate method to customize header row (build two-level header), i.e. following:
--------------------------------------------------------
|  col1 |  col2  |______col3________|_______col4_______|
|       |        |  col3.1 | col3.2 |  col4.1 | col4.2 |
--------------------------------------------------------
|       |        |         |        |         |        |


When Command row is visible it is rendered with different collspan count for IE 8 in compatibility mode and standard mode.
For the example above in IE8 standard mode and FF, Opera it renders:
<tr class="rgCommandRow"><td class="rgCommandCell" colspan="6">
for IE8 compatibility mode:
<tr class="rgCommandRow"><td class="rgCommandCell" colspan="4">

As a result when IE8 is in compatibility mode Command row does not fill all grid's width

I tried to set custom render method for command row and set manually Colspan property but it DOES NOT change for Compatibility mode (for FF/IE8standard renders as expected)
Below is code
Private Sub weldsGrid_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles weldsGrid.ItemCreated
        If e.Item.ItemType = GridItemType.CommandItem Then
            e.Item.SetRenderMethodDelegate(AddressOf RenderCommandDelegate)
        End If
        'If e.Item.ItemType = GridItemType.Header Then
        '   e.Item.SetRenderMethodDelegate(AddressOf RenderHeaderDelegate)
        'End If
    End Sub
 
    Private Sub RenderCommandDelegate(ByVal output As HtmlTextWriter, ByVal container As Control)
        Dim cell = DirectCast(container.Controls(0), System.Web.UI.WebControls.TableCell)      
        'IE7 or IE8 in compat mode fix  
        cell.ColumnSpan = 20
        cell.RenderControl(output)
    End Sub

Thank you
Radoslav
Telerik team
 answered on 13 Jan 2011
1 answer
71 views
I used the Telerik.GridExamplesCSharp.Programming.SEOPaging namesapce to display the pager of radgridview to disable and enable the pager buttons according to current page index with out using custom paging "using NextPrevAndNumeric mode " but I faced a problem when adding a checkbox column to the grid as the checkbox column doesnt check the selected checkbox because the pager work with query string mechanism so the page is reloaded and lost the selected checkbox state ..
could u please help me asap...
thanks for ur effort
Veli
Telerik team
 answered on 13 Jan 2011
1 answer
241 views
When I set the width of columns in a master table view and then open a detail table view the widths in the parent table change, is there away to avoid this?
<telerik:RadGrid ID="grdGroups" runat="server" EnableLinqExpressions="false" 
GridLines="None" AllowFilteringByColumn="True" DataSourceID="GroupsDataSource"
AllowPaging="True" AllowSorting="True"   OnDetailTableDataBind="grdGroups_DetailTableDataBind"
AutoGenerateColumns="False" oninsertcommand="grdGroups_InsertCommand" 
OnUpdateCommand="grdGroups_UpdateCommand" onitemcommand="grdGroups_ItemCommand" 
    >
    <MasterTableView autogeneratecolumns="False" Name="grdGroups" datakeynames="GroupID" CommandItemDisplay="Top" datasourceid="GroupsDataSource" CommandItemSettings-AddNewRecordImageUrl="~/_resources/images/grid/Grid_AddNew.png" CommandItemSettings-RefreshImageUrl="~/_resources/images/grid/Grid_Hide.png" CommandItemSettings-AddNewRecordText="<%$ Resources:CreateGroup %>" CommandItemSettings-RefreshText="">
        <DetailTables>
  
            <telerik:GridTableView Name="grdGroupEmployees" runat="server" OnItemCommand="grdGroupEmployees_ItemCommand"
                GridLines="None" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" DataKeyNames="UserID"
                AutoGenerateColumns="False" >
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
  
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
  
                    <Columns>
                        <telerik:GridBoundColumn DataField="LastName" AutoPostBackOnFilter="true" HeaderText="<%$ Resources:LastName %>" ShowFilterIcon="false"
                            SortExpression="LastName" UniqueName="LastName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="FirstName" HeaderText="<%$ Resources:FirstName %>" AutoPostBackOnFilter="true" ShowFilterIcon="false"
                            SortExpression="FirstName" UniqueName="FirstName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Email" HeaderText="Email" AutoPostBackOnFilter="true" ShowFilterIcon="false"
                            SortExpression="Email" UniqueName="Email">
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/_resources/images/grid/Grid_Trash.jpg" ConfirmText="<%$ Resources:RemoveUser%>" Text="<%$ Resources:Main, Archive %>" HeaderText="<%$ Resources: Remove %>" CommandName="RemoveUser" >
                            <HeaderStyle HorizontalAlign="Center" Width="50px" />
                            <ItemStyle HorizontalAlign="Center"  Width="50px" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/_resources/images/grid/Grid_Forward.png" Text="<%$ Resources:Main, View %>" HeaderText="<%$ Resources:Main, View %>" CommandName="ViewUser" >
                            <HeaderStyle HorizontalAlign="Center" Width="50px" />
                            <ItemStyle HorizontalAlign="Center"  Width="50px" />
                        </telerik:GridButtonColumn>
                    </Columns>
            </telerik:GridTableView>
        </DetailTables>
          
          
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
  
        <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
  
        <Columns>
            <telerik:GridBoundColumn DataField="Name" AutoPostBackOnFilter="true" UniqueName="Name" HeaderText="<%$ Resources:GroupName %>" ShowFilterIcon="false" SortExpression="Name" >
            </telerik:GridBoundColumn>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="~/_resources/images/grid/Grid_Edit.png" UpdateImageUrl="~/_resources/images/Grid/Grid_Accept.png"  CancelImageUrl="~/_resources/images/Grid/Grid_Cancel.png" UniqueName="EditCommandColumn"  ItemStyle-Width="50px" HeaderText="<%$ Resources:Main, Edit %>" CancelText="<%$ Resources:Main, Cancel %>" UpdateText="<%$ Resources:Main, Update %>" >
                <HeaderStyle HorizontalAlign="Center" Width="50px" />
                <ItemStyle HorizontalAlign="Center"  Width="50px" />
                <FooterStyle HorizontalAlign="Center"  Width="50px" />
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/_resources/images/grid/Grid_Cancel.png" ConfirmText="Resources:ArchiveConfirm" Text="<%$ Resources:Main, Archive %>" HeaderText="<%$ Resources:Main, Archive %>" CommandName="Archive" >
                <HeaderStyle HorizontalAlign="Center" Width="50px" />
                <ItemStyle HorizontalAlign="Center"  Width="50px" />
            </telerik:GridButtonColumn>
            <telerik:GridButtonColumn ButtonType="ImageButton" UniqueName="ViewGroup" Visible="false" ImageUrl="~/_resources/images/grid/Grid_Forward.png" Text="<%$ Resources: Courses %>" HeaderText="<%$ Resources: Courses %>" CommandName="ViewGroup" >
                <HeaderStyle HorizontalAlign="Center" Width="50px" />
                <ItemStyle HorizontalAlign="Center"  Width="50px" />
            </telerik:GridButtonColumn>
        </Columns>
  
        <EditFormSettings ColumnNumber="1" CaptionDataField="Name" CaptionFormatString="<%$ Resources:EditGroupTitle %> {0}" InsertCaption="<%$ Resources:NewGroupTitle %>">
            <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" Width="60%"  />
            <FormTableStyle CellSpacing="5" CellPadding="2" GridLines="None" />
            <EditColumn ButtonType="ImageButton" InsertText="<%$ Resources:Main, Insert %>" UpdateText="<%$ Resources:Main, Update %>" InsertImageUrl="~/_resources/images/grid/Grid_Accept.png" UpdateImageUrl="~/_resources/images/grid/Grid_Accept.png"
                UniqueName="EditCommandColumn1" CancelText="<%$ Resources:Main, Cancel %>"  CancelImageUrl="~/_resources/images/grid/Grid_Cancel.png">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>
  
<asp:ObjectDataSource ID="GroupsDataSource" runat="server" 
SelectMethod="GetClientsGroups" TypeName="i2d2Main" SortParameterName="sort">
<SelectParameters>
    <asp:SessionParameter Name="ClientID" SessionField="ClientID" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
Princy
Top achievements
Rank 2
 answered on 13 Jan 2011
10 answers
136 views
Hi there,

I have been playing around with the Scheduler and have created a data provider that inherits from SchedulerProviderBase.  However, instead of instantiating the provider via web.config etc, I have instead created a new provider object each time the page is loaded (ie in Page_Load).  So, like this:

RadScheduler1.Provider = new SchedulerDataProvider( venueId, groupId );

This is so I can pass in some arguments to the provider so it returns different data based on the parameters sent in by the user.

This was all working fine until doing a postback from a dropdownlist in the page.  A that point, the standard " DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding" exception was being thrown even before Page_Load is fired, as those fields are not set.

I got around this by just setting those fields to anything - that seemed to work and the scheduler managed to ignore the fact that it did not yet have any data (which is fine by me, as I need to reload the data each time).

However, when searching the Knowledge Base for help on the above, I came across the following:

The provider is instantiated once per application domain and is shared across threads. RadScheduler ensures basic thread safety by encapsulating each provider in a wrapper that provides locks around each of its public methods. However, you should take care of synchronizing access to instance field members where appropriate.

My question is this: I take it by doing what I am doing, the provider is NOT only instantiated the once, and a new one is created each time the page loads.  Is that the case?  Can I not worry about threading issues by doing it the way I am?  If not, any suggestions on how I should actually implement?

Thanks for your help.

Kind regards,

Matthew

 
Veronica
Telerik team
 answered on 13 Jan 2011
1 answer
149 views
Hi,

In my application i have a rad time picker (For time booking) and Date picker.

I am setting the start and end time from my Master  table from database.

As its a web application so we are planing to have the users from all the countries.
So we are giving the option to the user to choose the Time Zone in master web form.

Need to set the Selected Time Zone in Rad Date  and Time picker for the session (user based on the Master record selection).

I have to block (make non selectable by the user) the booked timing in rad time picker.. (I think we have to do with the time view of the rad time picker.)

Those logic's are very impotent for my application .

Can any one suggest as much early as possible to me how to achieve the above blocked logic's..

Thanks in Advance
Thenmozhi
Daniel
Telerik team
 answered on 13 Jan 2011
2 answers
128 views
I am using this code in the ItemDataBound function of my radGrid in order to set the tooltip to the text of the cell:
if(e.Item is GridDataItem) 
   foreach(TableCell cell in e.Item.Cells) 
   
       cell.ToolTip = cell.Text; 
   
}

I am formatting the column to hide all decimals for space reasons, but I am also using filtering. It is possible that one filters for say where column xyz >= 50 and a row showing 50 will not show up because the value is really 49.6.
I would like the tooltip to shop 49.6, not 50.

Is this possible?

Thank you for any expert advice.
-Megan
Megan Vee
Top achievements
Rank 1
 answered on 13 Jan 2011
1 answer
58 views
Hello,

I am working with the RADGrid and need to catch the OnCollapsed event when a group is collapsed. 

I've set the following properties in the grid 

    function GroupCollapsed(sender, args) {
        alert('colapsed');
    }

                    <MasterTableView 
                        EditMode="InPlace" 
                        CommandItemDisplay="Top" 
                        GroupLoadMode="Client"
                        DataKeyNames="SectionID" >
...
                    </MasterTableView>
                    <ClientSettings  AllowGroupExpandCollapse="True">
                        <ClientEvents OnGroupCollapsed="GroupCollapsed"
                                      OnRowClick="GroupCollapsed" />
                    </ClientSettings>                   

When I click a row I'm seeing the GroupCollapsed function get executed however it does not get executed when I collapse an expanded group, as I would expect.

I'm pretty sure this is just some minor detail I'm missing but I haven't been able to find it yet.

Any input is appreciated.

Thanks in advance,
jeff bryant


Maria Ilieva
Telerik team
 answered on 13 Jan 2011
1 answer
120 views
Hi I have tried for a while to create a tabstrip and modify the height of the tabs and the fonts (make them much bigger).
I have tried many different ways but never managed to achieve it. (I mean it looks very ugly - backcolor or bgimage just not right)
Is it possible for you guys to give me a little example on how to do it?

Regards.
Shinu
Top achievements
Rank 2
 answered on 13 Jan 2011
1 answer
116 views
I want to use similar code in my RADGRID.
How to use it in RADGRID, since radgrid dont have some methods which was mention in my code.

Private Sub save__details()
        Dim S As Integer
        For S = 0 To datagridgridview1.RowCount - 1
            If CStr(datagridgridview1.Item(0, S).Value()) <> "" Then
                'payment details
                updateRecord("insert into table1 (code)" & _
                  " values('" & CStr(datagridgridview1.Item(0, S).Value()) & "' )")
            End If
        Next
        'loop all the record until end using next.
    End Sub
Princy
Top achievements
Rank 2
 answered on 13 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?