Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
139 views
I am using the newest RadGrid and its export funationlity. THe data is being exported just fine, however, there is this annoying security warning message.

Question 1:

How do I get around this?

Question 2:

I am able to get around this by exporting to CSV. However. now, I am not able to add style attributes to certain cells. I have number cells whos content sometimes start with 0. These leading zeros are automatically removed unless I am able to add a style attribute to that cell. How do I fix that?

--tolga
Daniel
Telerik team
 answered on 16 Oct 2008
1 answer
61 views
I have a tabstrip with a MultiPage control.
On the first PageView I have an editor control with some text boxes and a couple of image buttons.
On the second PageView I have a couple of GridControls.
On the first grid I use the add new record command item. Only one column is editable.

When I hit the enter key after adding the data in the text box. The image button click event for the first image button on the first page view is called. The sender object is the image button but it is not visible when the enter key is hit. If the check image is clicked the item is added normally.

Since the ImageClickEventArgs x y coordinates are always zero when the event is erroniously called, I have a work around, but it is not apparent what would be causing this problem. 
Yavor
Telerik team
 answered on 16 Oct 2008
1 answer
171 views


Can you tell me how to fire the select button on page load?  I would like to have the file browse window appear right away when the page loads without the user having to click the select button.

I have attempted to add to the onclientadded handler with no luck.  I am trying to configure a simple one file upload within a window control.

Seems like a simple task not sure why I am having so much trouble with it.

Thanks,
Dave
Erjan Gavalji
Telerik team
 answered on 16 Oct 2008
5 answers
252 views
I keep getting this error. Using 2008 Q2 of radcontrols. Free version (still haven't bought) . This would not be such a big deal if it was not completely random, causing me to look like a friggin idiot every time it pops up and I have to say, " I have no idea why this is happening ". this occurance was not happening with the Q1 release. It is mysterious and confusing when testing. Can someone explain how to get rid of it please. If I drop all the ajax events, it still occur s wherever the dll is referenced.

error 1
Sys.WebForms.PageRequestManagerParserErrorException. The message received from the server could not be parsed. Common caused for this error are when the response is modified by calls to response.write(), Response filters, HttpModules, or server trace is enabled. Details: Error Parsing near '
<!Doctype HTML P' .

error 2
Sys.WebForms.PageRequestManagerParserErrorException. The message received from the server could not be parsed. Common caused for this error are when the response is modified by calls to response.write(), Response filters, HttpModules, or server trace is enabled.
Details: Error Parsing near 'Access to the path "'

Vlad
Telerik team
 answered on 16 Oct 2008
2 answers
170 views
How can control the look of a radpanelitem that is a separator?

This is how i create the radpanelitem:

Dim
rpiSeparator As New RadPanelItem
rpiSeparator.IsSeparator =
True
rpiSeparator.CssClass = "subMenuSeparator"
rpiSeparator.Text = "<hr />"
radPanel.items.add(rpiSeparator)

And this is my css:
.subMenuSeparator
{
 padding-top:5px;
 padding-left:0px;
 padding-right:0px;
 color:#000000;
}
   

It does not seem to have any effect.

 

Niclas
Top achievements
Rank 1
 answered on 16 Oct 2008
5 answers
148 views
Hi,

Following one of your tutorial, I was trying to edit/update record in the grid - the problem I am having is that for every editedItem returned blank..Following is the aspx and code behind file...Any help would be greatly appreciated..

Thanks.


<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Test.aspx.vb" Inherits="ProjectTemplar.Test"
    title="Untitled Page" EnableViewState="true"%>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <asp:Label ID="lblErrorMsg" runat="server" CssClass="errorFont"></asp:Label>
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false"
    OnNeedDataSource="RadGrid1_NeedDataSource"
    OnUpdateCommand="RadGrid1_UpdateCommand">
        <MasterTableView EditMode="InPlace">
        <Columns>
         <telerik:GridEditCommandColumn UpdateText="Update" EditText="Edit" CancelText="Cancel"></telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="BudgetExceptionID" Visible="TRUE" HEADERTEXT = "BudgetExceptionID" UniqueName="BudgetExceptionID" readonly="true"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ExceptionNotes" HeaderText="Exp. Notes" UniqueName="ExceptionNotes" ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Budget_DATETIME" HeaderText="Date &amp; Time">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="EffectivePeriod" HeaderText="Effective Period"
                    UniqueName="EffectivePeriod">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</asp:Content>

--Code Behind ---

Imports Telerik.Web.UI
Partial Public Class Test
    Inherits System.Web.UI.Page

    Private ReadOnly Property GridSource() As DataTable
        Get
            Dim obj As Object = Me.ViewState("_gds")
            If (Not obj Is Nothing) Then
                Return CType(obj, DataTable)
            Else
                Dim table As DataTable = Nothing
                Try
                    Dim ds As DataSet
                    Dim batchManager As New DataBatchManager()
                    ds = batchManager.GetBudgetExceptionsByBatchID(34)
                    table = ds.Tables(0)
                    Me.ViewState("_gds") = table
                    Return table
                Catch ex As Exception
                    lblErrorMsg.Text = ex.Message
                End Try
                Return table
            End If
        End Get
    End Property

    Protected Sub RadGrid1_NeedDataSource(ByVal source As System.Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
        RadGrid1.DataSource = Me.GridSource
    End Sub
    Protected Sub RadGrid1_UpdateCommand(ByVal source As System.Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand
        Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
        Dim ordersTable As DataTable = Me.GridSource
        Dim id As String
        id = editedItem("Client").Text  '...returns blank..
        lblErrorMsg.Text = "Hello " + id.ToString()
    End Sub

Yavor
Telerik team
 answered on 16 Oct 2008
1 answer
131 views
Hi,
I am using GroupByFields in the grid. And I want to access the values in foreach GridItem in the code behind page. how can I access that?
 Following is the code.

Eg:

aspx page:

<

telerik:RadGrid ID="personalGridView" runat="server" AutoGenerateColumns="False"

 

 

AllowPaging="True" GridLines="None" AllowMultiRowSelection="true" ShowGroupPanel="False"

 

 

Skin="Office2007" OnPreRender="personalGridView_PreRender" OnPageIndexChanged="personalGridView_PageIndexChanged">

 

 

<FilterMenu EnableTheming="True">

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

</FilterMenu>

 

 

<PagerStyle Mode="NumericPages" />

 

 

<MasterTableView>

 

 

<GroupByExpressions>

 

 

<telerik:GridGroupByExpression>

 

 

<SelectFields>

 

 

<telerik:GridGroupByField FieldAlias="Name" FieldName="Name" FormatString="" HeaderText="" />

 

 

</SelectFields>

 

 

<GroupByFields>

 

 

<telerik:GridGroupByField FieldName="Name" FieldAlias="Name" FormatString="" HeaderText="" />

 

 

</GroupByFields>

 

 

</telerik:GridGroupByExpression>

 

 

</GroupByExpressions>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridClientSelectColumn CommandName="Select">

 

 

</telerik:GridClientSelectColumn>

 

<

telerik:GridBoundColumn DataField="Amount" HeaderText="Amount">

 

 

 

 

</telerik:GridBoundColumn>

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings AllowDragToGroup="False">

 

 

<Selecting AllowRowSelect="True"></Selecting>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>

 

 

<ClientMessages DragToGroupOrReorder="Drag to group" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 



CodeBehind:

foreach

(GridItem grdItem in personalGridView.SelectedItems)
{
}

 

Shinu
Top achievements
Rank 2
 answered on 16 Oct 2008
9 answers
224 views
I have two related grids... something like 
http://www.telerik.com/demos/aspnet/Grid/Examples/Programming/SelectedValue/DefaultCS.aspx

Now I would like to insert a new records in the second grid and when that happen I need to be able to get the selected customer's id from the first grid (Customer) in the second grid (Order) insert command event.

protected

void Order_InsertCommand(object source, GridCommandEventArgs e)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
Hashtable newValues = new Hashtable();
e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
// get the selected customerID from the first grid...

}

Thank you in advance

Yavor
Telerik team
 answered on 16 Oct 2008
3 answers
117 views
How can I populate the 

GridDropDownColumn in my codebehind (c#), ive found examples where the datasourceid is set in the aspx page like this

<telerik:GridDropDownColumn  
                                         UniqueName="DropDownListCategory" 
                                         ListTextField="Category" 
                                         ListValueField="Category" 
                                         DataSourceID="SqlDataSource2" 
                                         HeaderText="Category" 
                                         DataField="Category" 
                                         DropDownControlType="RadComboBox" 
                                         AllowSorting="true">  
                                        </telerik:GridDropDownColumn> 
 But the contents of the dropdown can change depending on a selection elsewhere on the page, so Id like to be able to set the datasource using c#
Shinu
Top achievements
Rank 2
 answered on 16 Oct 2008
1 answer
83 views
I have a multi-selectable, sortable, paged grid. I'm able to retain the user's selections after a sort/page operation. However, I haven't found a way to jump to the page which contains the user's selected item on a sort operation. For example, if I select a given row on page 1 of the grid and then sort by a given column, I would like to do the following:
  1. sort the grid
  2. jump from page 1 to page n (which now contains the previously selected item)
  3. reselect that item
  4. scroll to that item
How is this accomplished w/ RadGrid?

-K
Shinu
Top achievements
Rank 2
 answered on 16 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?