Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
336 views
I have a GridTemplateColumn that can only be visible to specific roles within my system.  My problems is that I cannot figure out to hide it... any help would be great.
    Protected Sub RadGrid1_ColumnCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles RadGrid1.ColumnCreated  
        If e.Column.UniqueName = "Edit" Then e.Column.Visible = False 
 
    End Sub 'RadGrid1_ColumnCreated 
Chase Florell
Top achievements
Rank 1
 answered on 10 Nov 2008
2 answers
102 views
I'm attempting to create a grid with a details table view. However, I do not want the user to be able to select items in the details view with a client side click on the row because it falsly selects the parent row that I'm using for another operation. Here's the relevant code:

    function EnableBulkEdit(isEnabled)  
    {  
        var Toolbar = $find('<%= MainToolBar.ClientID %>');  
        var BulkEditButton = Toolbar.findItemByText("Bulk Edit");  
        var BulkApproveButton = Toolbar.findItemByText("Bulk Approve");  
        if(isEnabled == true)  
        {  
            BulkEditButton.enable();  
            if (BulkApproveButton != null)  
            {  
                BulkApproveButton.enable();  
            }  
        }  
        else 
        {  
            BulkEditButton.disable();  
            if (BulkApproveButton != null)  
            {  
                BulkApproveButton.disable();  
            }  
        }  
    }  
      
    var currentCostCenters = new Array();  
    function CostCenterSelected(sender, args)  
    {  
        // get the ID of the cost center from the rad grid row.  
        var ccID = args.getDataKeyValue("CostCenterItemID");  
        var addToCollection = true;  
          
        // see if the item is already in the collection. Don't add it if already in collection.  
        for(i=0;i<currentCostCenters.length;i++)  
        {  
            if(currentCostCenters[i]==ccID)  
            {  
                addToCollection=false;  
                break;  
            }  
        }  
          
        // add the item to the selected cost centers  
        if(addToCollection == true)  
        {  
            var nextItem = currentCostCenters.length;  
            currentCostCenters[nextItem] = ccID;  
        }  
        EnableBulkEdit(currentCostCenters.length>0);  
    }  
    function CostCenterUnselected(sender, args)  
    {  
        // get the ID of the cost center from the rad grid row.  
        var ccID = args.getDataKeyValue("CostCenterItemID");  
        for(i=0;i<currentCostCenters.length;i++)  
        {  
            if(currentCostCenters[i]==ccID)  
            {  
                currentCostCenters[i] = ''// Set to an empty string  
                currentCostCenters.sort(); // Sort the array to place the string at the beginning  
                currentCostCenters.shift(); // Shift the array to remove the first element  
                break;  
            }  
        }  
        EnableBulkEdit(currentCostCenters.length>0);  
    }  
 
                <telerik:RadToolBar ID="MainToolBar" runat="server" Skin="Office2007" AutoPostBack="true">  
                    <ExpandAnimation Type="OutQuad" Duration="300" /> 
                    <CollapseAnimation Type="OutQuad" Duration="300" /> 
                    <Items> 
                        <telerik:RadToolBarDropDown runat="server" Text="Permissions" ImageUrl="~/Images/lock.gif" 
                            OnLoad="CheckForPortalAdmin">  
                            <Buttons> 
                                <telerik:RadToolBarButton runat="server" Text="Funds" ToolTip="Set permissions for the various funds in the system." 
                                    ImageUrl="~/Images/fund.gif" CommandName="FundPermissions">  
                                </telerik:RadToolBarButton> 
                                <telerik:RadToolBarButton runat="server" Text="Units" ToolTip="Set access permissions for units in the system." 
                                    ImageUrl="~/Images/unit.gif" CommandName="UnitPermissions">  
                                </telerik:RadToolBarButton> 
                            </Buttons> 
                        </telerik:RadToolBarDropDown> 
                        <telerik:RadToolBarButton runat="server" Text="Users" ImageUrl="~/Images/users.gif" 
                            CommandName="Users" OnLoad="CheckForPortalAdmin" /> 
                        <telerik:RadToolBarButton runat="server" IsSeparator="True" OnLoad="CheckForPortalAdmin">  
                        </telerik:RadToolBarButton> 
                        <telerik:RadToolBarButton runat="server" Text="Bulk Edit" PostBack="false" ToolTip="Allows you to apply changes to multiple cost centers at a time." /> 
                        <telerik:RadToolBarButton runat="server" Text="Bulk Approve" PostBack="false" ToolTip="Allows you to approve multiple cost centers at a time." 
                            OnLoad="CheckForPortalAdmin" /> 
                        <telerik:RadToolBarButton runat="server" Text="Export" ImageUrl="~/Images/export.gif" 
                            CommandName="Export">  
                        </telerik:RadToolBarButton> 
                    </Items> 
                </telerik:RadToolBar> 
 
                <telerik:RadGrid ID="CurrentCostCentersGrid" runat="server" Skin="Office2007" AllowMultiRowSelection="True" 
                    AllowMultiRowEdit="True" ShowGroupPanel="True" AllowPaging="True" DataSourceID="DataSourceUnits" 
                    GridLines="Horizontal" AutoGenerateColumns="False" PageSize="50" ShowFooter="true" 
                    Width="100%">  
                    <ClientSettings AllowDragToGroup="true" AllowGroupExpandCollapse="true" AllowColumnsReorder="true" 
                        AllowExpandCollapse="true">  
                        <Selecting AllowRowSelect="true" /> 
                        <ClientEvents OnRowSelected="CostCenterSelected" OnRowDeselected="CostCenterUnselected"/>  
                    </ClientSettings> 
                    <GroupPanel Enabled="true" Text="Groups">  
                    </GroupPanel> 
                    <PagerStyle Mode="NextPrevAndNumeric" NextPageText="Next" PrevPageText="Previous" /> 
                    <MasterTableView ShowGroupFooter="true" ShowFooter="true" DataSourceID="DataSourceUnits" 
                        DataKeyNames="CostCenterItemID" CommandItemDisplay="None" ClientDataKeyNames="CostCenterItemID">  
                        <CommandItemTemplate> 
                            <asp:Button ID="BulkApproveButton" runat="server" Text="Bulk Approve" /> 
                        </CommandItemTemplate> 
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn Visible="False">  
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                            <telerik:GridClientSelectColumn> 
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" /> 
                            </telerik:GridClientSelectColumn> 
                            <telerik:GridBoundColumn HeaderText="Fund" DataField="FundID" AllowFiltering="true" 
                                DataType="System.Int32" SortExpression="FundID" ReadOnly="True" UniqueName="FundID">  
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Wrap="false" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Unit" DataField="UnitID" AllowFiltering="true" 
                                DataType="System.Int32" SortExpression="UnitID" ReadOnly="True" UniqueName="UnitID">  
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Wrap="false" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Line Item" DataField="LineItemID" AllowFiltering="true" 
                                DataType="System.Int32" SortExpression="LineItemID" ReadOnly="True" UniqueName="LineItemID">  
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Wrap="false" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="Category" EmptyDataText="&amp;nbsp;" HeaderText="Category" 
                                SortExpression="Category" UniqueName="Category">  
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" Wrap="false" Width="115px" 
                                    Font-Size="10px" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Description" DataField="LineItemName" SortExpression="LineItemName" 
                                UniqueName="Description" ReadOnly="true" Groupable="false">  
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" Wrap="true" Width="150px" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Previous Budget" DataField="PreviousBudget" 
                                AllowFiltering="true" DataType="System.Decimal" SortExpression="PreviousBudget" 
                                UniqueName="PreviousBudget" DataFormatString="{0:C}" ReadOnly="True" Aggregate="Sum" 
                                FooterAggregateFormatString="{0:C}" Groupable="false">  
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> 
                                <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Previous Actual" DataField="PreviousActual" 
                                DataType="System.Decimal" SortExpression="PreviousActual" UniqueName="PreviousActual" 
                                DataFormatString="{0:C}" Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}">  
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> 
                                <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Current Budget" DataField="CurrentBudget" DataType="System.Decimal" 
                                SortExpression="CurrentBudget" UniqueName="CurrentBudget" DataFormatString="{0:C}" 
                                Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}">  
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> 
                                <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Current YTD" DataField="CurrentYTD" DataType="System.Decimal" 
                                SortExpression="CurrentYTD" UniqueName="CurrentYTD" DataFormatString="{0:C}" 
                                Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}">  
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> 
                                <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Proposed Budget" DataField="ProposedBudget" 
                                DataType="System.Decimal" SortExpression="ProposedBudget" UniqueName="ProposedBudget" 
                                Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}" DataFormatString="{0:C}">  
                                <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> 
                                <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="StatusName" EmptyDataText="&amp;nbsp;" HeaderText="Status" 
                                SortExpression="StatusName" UniqueName="StatusName">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Modify Date" DataField="ModifyDate" DataType="System.DateTime" 
                                SortExpression="ModifyDate" UniqueName="ModifyDate" Groupable="false" /> 
                        </Columns> 
                        <DetailTables> 
                            <telerik:GridTableView DataSourceID="DataSourceHistory" AutoGenerateColumns="false" 
                                ShowHeader="false" GroupsDefaultExpanded="false" NoDetailRecordsText="No notes currently exist for this item" 
                                Width="100%" CommandItemDisplay="Top" Frame="Void">  
                                <CommandItemTemplate> 
                                    <telerik:RadToolBar ID="DetailsToolbar" runat="server" Skin="Office2007" Width="100%" 
                                        AutoPostBack="true" OnClientLoad="SetNestedToolbar">  
                                        <ExpandAnimation Type="OutQuad" Duration="150" /> 
                                        <CollapseAnimation Type="InQuad" Duration="150" /> 
                                        <Items> 
                                            <telerik:RadToolBarButton Text="Make Request" CommandName="MakeRequest" ImageUrl="Images/request.gif">  
                                            </telerik:RadToolBarButton> 
                                            <telerik:RadToolBarButton IsSeparator="true">  
                                            </telerik:RadToolBarButton> 
                                            <telerik:RadToolBarButton Text="Approval" CommandArgument="Approval" OnLoad="CheckForPortalAdmin"></telerik:RadToolBarButton> 
                                        </Items> 
                                    </telerik:RadToolBar> 
                                </CommandItemTemplate> 
                                <ParentTableRelation> 
                                    <telerik:GridRelationFields MasterKeyField="CostCenterItemID" DetailKeyField="ItemID" /> 
                                </ParentTableRelation> 
                                <RowIndicatorColumn> 
                                    <HeaderStyle Width="20px"></HeaderStyle> 
                                </RowIndicatorColumn> 
                                <ExpandCollapseColumn> 
                                    <HeaderStyle Width="20px"></HeaderStyle> 
                                </ExpandCollapseColumn> 
                                <Columns> 
                                    <telerik:GridTemplateColumn> 
                                        <ItemTemplate> 
                                            <strong> 
                                                <%#Eval("CreateDate","{0:d}") %>&nbsp;<%#Eval("CreateDate","{0:t}") %>&nbsp;-&nbsp;<%#Eval("UserName")%>:</strong>&nbsp;<br /> 
                                            <br /> 
                                            <%#Eval("NoteText")%><br /> 
                                            <br /> 
                                            <strong style="color: Red">Requested Increase:</strong>&nbsp;  
                                            <%#Eval("RequestedBudget", "{0:C}")%> 
                                        </ItemTemplate> 
                                    </telerik:GridTemplateColumn> 
                                </Columns> 
                            </telerik:GridTableView> 
                        </DetailTables> 
                        <PagerStyle Mode="NextPrevAndNumeric" /> 
                        <PagerTemplate> 
                            Item Description  
                        </PagerTemplate> 
                    </MasterTableView> 
                    <FilterMenu EnableTheming="True" Skin="Gray">  
                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                    </FilterMenu> 
                </telerik:RadGrid> 
 

I would actually prefer that the user be forced to select using the client side checkbox alone. All other clicks on the row or child items should be totally discarded in the selection process.

Thanks for any assistance!
Chris
Top achievements
Rank 1
 answered on 10 Nov 2008
1 answer
84 views
Hey guys,
 
Whenever I double click on a row, the grid disappears and is replaced by a solid line.  I have copied the code from the example on the demos site except I am databinding in the code-behind and I wish to insert/update/delete in the code-behind.  Why is there a blue bar showing instead of a field converting into a text box?

Here's my code:

.ASPX

 

<telerik:RadGrid id="RadGrid1" runat="server" RegClient="true"

 

 

AllowPaging="True" AllowSorting="True" AllowAutomaticUpdates="true" OnUpdateCommand="updateDrips" GridLines="None" PageSize="20" Width="100%" EnableEmbeddedSkins="false" Skin="Elevate" >

 

 

<ClientSettings AllowColumnHide="True" Selecting-AllowRowSelect="true" AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="true">

 

 

<Resizing EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="true"></Resizing>

 

 

<Scrolling AllowScroll="true" />

 

 

<ClientEvents OnRowDblClick="editDrips" OnRowSelected="enableEdit" OnRowDeselected="disableEdit" />

 

 

</ClientSettings>

 

 

<MasterTableView AutoGenerateColumns="false" ClientDataKeyNames="touchID, campaignID" EditMode="InPlace">

 

 

<PagerStyle Visible="false" />

 

 

<Columns>

 

 

<telerik:GridBoundColumn UniqueName="touchID" DataField="touchID" Display="false" />

 

 

<telerik:GridBoundColumn UniqueName="campaignID" DataField="campaignID" Display="false" />

 

 

<telerik:GridBoundColumn UniqueName="description" DataField="description" HeaderText="Touches">

 

 

<ItemStyle Wrap="false" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="date" DataField="date" HeaderText="Date" ItemStyle-Width="150" DataFormatString="{0:MM/dd/yyyy}" />

 

 

<telerik:GridBoundColumn UniqueName="daysOffset" DataField="daysOffset" HeaderText="Offset" ItemStyle-Width="150" />

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

.JS

 

function

 

editDrips(sender, args) {

 

editedRow = args.get_itemIndexHierarchical();

$find("<% RadGrid1.ClientID %>").get_masterTableView().editItem(editedRow);

}

Joshua
Top achievements
Rank 1
 answered on 10 Nov 2008
1 answer
259 views
I have a RadEditor for ASP.NET Ajax (Nov. Service Pack)  and I am trying to set the Default Font of the Editor to Verdana 10pt.
I have created a css file with the following options and named it as  EditorContentAreaStyles.css

body

 

{

 

 

 

font-family: Verdana !important;

 

 

 

font-size: 10pt !important;

 

 

}

 

 

In my code I have my RadEditor declared as follows:

<

 

telerik:RadEditor ID="RadHTMLContent" runat="server" Height="400" ToolbarMode="Default"

 

 

 

Font-Names="Verdana" Font-Size="11pt" EditModes="Design,Html" Skin="Office2007" ContentAreaCssFile="~/EditorContentAreaStyles.css"

 

 

 

StripFormattingOptions="AllExceptNewLines" Width="95%" ToolsFile="~/RadEditorMenu/RadToolBar.xml"

 

 

 

EnableViewState="False">  

 

 

</telerik:RadEditor>

 

 


My problem is when I declare ContentAreaCssFile and try to put a table the borders of the tables are not appearing and the users can't see the border. Although it is there and I can select it but I can't see the dotted border. Once I remove the ContentAreaCssFile option I get the border as designed in Editor Control. Is there something missing in my .css file that I need to add.

Please Advise.
Thanks
Himadri
Rumen
Telerik team
 answered on 10 Nov 2008
1 answer
346 views
Hello - I've got a pretty complex RadGrid mostly working, except for one case.  In this case, when the user clicks a button, I change a hidden field, rebind the grid (which produces a slightly different recordset, adding one row), and I want to select that particular row and put it in edit mode.

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) 
        { 
            switch (e.CommandName) 
            { 
                case "New": hdnForceBlankShiftForEmployeeID.Value = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["EmployeeID"].ToString(); 
                    RadGrid1.Rebind(); 
                    Hashtable dictionary = new Hashtable(2); 
                    dictionary.Add("EmployeeID",Convert.ToInt32(hdnForceBlankShiftForEmployeeID.Value)); 
                    dictionary.Add("EmployeeShiftID",System.DBNull.Value); 
                    GridDataItem[] myArray = RadGrid1.MasterTableView.FindItemsByKeyValues(dictionary); 
                    if (myArray.Length> 0) 
                    { 
                        myArray[0].Edit = true
                    } 
                    break
            } 
        } 

However, when I do this, I get the error below.  It's coming from setting the .Edit = true, as if I comment that out, it all works (other than the record not being in edit mode, of course).  Oh, incidentally, I don't have an onprerender - it's just whatever the base functionality is.

Object reference not set to an instance of an object.

Description:An unhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about the error andwhere it originated in the code.

Exception Details:System.NullReferenceException: Object reference not set to an instance of anobject.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]   Telerik.Web.UI.RadGrid.OnPreRender(EventArgs e) +1302   System.Web.UI.Control.PreRenderRecursiveInternal() +80   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Control.PreRenderRecursiveInternal() +171   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

So I'm assuming my approach is wrong somehow.  It's a complicated page, so I'm hoping this fragment is enough to point out my mistake, but if not, let me know...


Thanks,

Scott

Scott
Top achievements
Rank 1
 answered on 10 Nov 2008
3 answers
175 views
Hi
I would like to know if it are using the radmenu within the code below, because through this code that I set who has access to it.

Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then

            Dim dtMenuItems As New DataSet
            Dim erro As Boolean = False
            Dim mensagem As String = ""
            Dim obj As New clsSistemaVistoria.Menu

            dtMenuItems = obj.Buscar(erro, mensagem, 2, "", Session("ID_Usuario"))

            For Each drMenuItem As Data.DataRow In dtMenuItems.Tables(0).Rows

                If drMenuItem("ID_Menu").Equals(drMenuItem("ID_MenuPai")) Then
                    Dim mnuMenuItem As New MenuItem
                    mnuMenuItem.Value = drMenuItem("ID_Menu").ToString
                    mnuMenuItem.Text = drMenuItem("NM_Menu").ToString
                    If drMenuItem("Url_Menu").ToString.Trim <> "" Then
                        mnuMenuItem.NavigateUrl = drMenuItem("Url_Menu").ToString & "?Autorizacao=" & drMenuItem("TP_Acesso").ToString
                    Else
                        mnuMenuItem.Selectable = False
                    End If
                    mnuPrincipal.Items.Add(mnuMenuItem)

                    AddMenuItem(mnuMenuItem, dtMenuItems.Tables(0))
                End If
            Next
        End If
 End Sub

    Private Sub AddMenuItem(ByRef mnuMenuItem As MenuItem, ByVal dtMenuItems As Data.DataTable)

        For Each drMenuItem As Data.DataRow In dtMenuItems.Rows
            If drMenuItem("ID_MenuPai").ToString.Equals(mnuMenuItem.Value) AndAlso _
            Not drMenuItem("ID_Menu").Equals(drMenuItem("ID_MenuPai")) Then
                Dim mnuNewMenuItem As New MenuItem
                mnuNewMenuItem.Value = drMenuItem("ID_Menu").ToString
                mnuNewMenuItem.Text = drMenuItem("NM_Menu").ToString
                If drMenuItem("Url_Menu").ToString.Trim <> "" Then
                    mnuNewMenuItem.NavigateUrl = drMenuItem("Url_Menu").ToString & "?Autorizacao=" & drMenuItem("TP_Acesso").ToString
                Else
                    mnuMenuItem.Selectable = False
                End If
                mnuMenuItem.ChildItems.Add(mnuNewMenuItem)

                AddMenuItem(mnuNewMenuItem, dtMenuItems)
            End If
        Next

        For Each drMenuItem As Data.DataRow In dtMenuItems.Rows

        Next

    End Sub
Atanas Korchev
Telerik team
 answered on 10 Nov 2008
1 answer
154 views
Sys.ArgumentException
Can not deserialize. Data does not correspond to valid JSON.  The rad spell check was working until I moved to the latest development version.
Rumen
Telerik team
 answered on 10 Nov 2008
6 answers
313 views
Hello,

I'm trying to find information about a property that exists in the radGrid cells; the checkbox - "childNodes[1].checked".

I have a dataset that is being loaded at runtime and my columns are set to automatic so when the radGrid finds a boolean DataType it automatically creates a checkbox in the cell. Ok, no problem so far.

At runtime, the user selects a row and I must determine if the checkbox is "checked" or "unchecked" via Javascript.

My trouble began when I searched the help files and didn't find anything describing the "childNodes[1].checked" property.

Here's a code snippet of what I'm trying but isn't working;

var gridIsCommodityValue = MasterTable.getCellByColumnUniqueName(row, "isCommodity").childNodes[0].checked;)

if (gridIsCommodityValue.checked) {
    alert("This checkbox is checked!");
else {
    alert("This checkbox is NOT checked!");
}

It seems like this should work but regardless of the checkbox being checked or unchecked my returned value is null.

Any suggestions?

Also, does anyone know where in the help files I can find the reference to the checkbox properties? I just can't seem to find it.

Many thanks in advance,

Dave
Dave Navarro
Top achievements
Rank 2
 answered on 10 Nov 2008
5 answers
170 views
Im getting random 

&nbsp;
inserted into the html of my pages in Visual Studio 2008
I delete them and after a while they suddenly appear again for no reason.  Heres the latest bunch !

</telerik:RadTabStrip> 
                    <telerik:RadMultiPage id="RadMultiPage1" runat="server" SelectedIndex="1">  
                      <telerik:RadPageView id="Pageview1" runat="server">  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <telerik:RadTextBox ID="RadTextBoxArtistNotes" runat="server" Height="410px"   
                              Skin="Vista" Width="550px"></telerik:RadTextBox></telerik:RadPageView> 
                      <telerik:RadPageView id="Pageview2" runat="server">  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <telerik:RadTextBox ID="RadTextBoxArtistRider" runat="server" Height="410px"   
                              Skin="Vista" Width="550px"></telerik:RadTextBox></telerik:RadPageView> 
                        
                    </telerik:RadMultiPage> 
 Has anyone else experienced this ?
Atanas Korchev
Telerik team
 answered on 10 Nov 2008
1 answer
325 views
I'm trying to use the RadProgressManager.  After I post back to page, I get 'Object reference not set to an instance of an object', [NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.RadUploadHttpModule.SetTextContent(Type workerRequestType, HttpWorkerRequest workerRequest, Byte[] textContent) +169
   Telerik.Web.UI.RadUploadHttpModule.Context_BeginRequest(Object sender, EventArgs e) +612
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

I've followed all of the web.config examples but nothing works.

Setup is VS2005 on Vista.  RadControls version is 2008.01.0619.20.

Code looks like this:

 

<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">

 

 

</telerik:RadStyleSheetManager>

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

</telerik:RadScriptManager><telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

</telerik:RadAjaxManager>

 

 

 

<input type="file" runat="server" id="inputFile"/>

 

 

<asp:button ID="buttonSubmit" runat="server" Text="Submit" OnClick="buttonSubmit_Click" CssClass="RadUploadButton" />

 

 

 

<telerik:RadProgressManager id="Radprogressmanager1" runat="server" />

 

 

<telerik:RadProgressArea id="RadProgressArea1" runat="server" />

 

Atanas Korchev
Telerik team
 answered on 10 Nov 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?