Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
156 views
Hi

I have a tooltip that loads its content on demand. The loading panel is not shown on top of the tooptip but slightly to the right and it doesnt look great. I took a screenshot but I can't see anywhere where i can attach an image to this post

thanks
andieje
Top achievements
Rank 1
 answered on 29 Jun 2009
11 answers
254 views
Hello,

I have a grid that has both GridBoundColumns and GridButtonColumns and is populated using client-side databinding. 
On Page_Load, I hide one of the GridButtonColumns using the following code:
C#:
grdManifest.MasterTableView.GetColumn("ViewErrorDescription").Display = false
Here is what the grid looks like on initial load: grid on initial load

When the user clicks a radio button, I need to show or hide certain columns depending on their selection.  I attempt to do this using the following code:
JS:
tableView = grdManifest.get_masterTableView();          
tableView.showColumn(tableView.getColumnByUniqueName("ViewErrorDescription").get_element().cellIndex);  
tableView.hideColumn(tableView.getColumnByUniqueName("CustomerImported").get_element().cellIndex);  
tableView.hideColumn(tableView.getColumnByUniqueName("RollsReceived").get_element().cellIndex);  
tableView.hideColumn(tableView.getColumnByUniqueName("ViewReceiptErrors").get_element().cellIndex);  
tableView.hideColumn(tableView.getColumnByUniqueName("ViewTransactionHistory").get_element().cellIndex); 
This successfully hides the two GridBoundColumns (CustomerImported and RollsReceived) but the two GridButtonColumns (ViewReceiptErrors and ViewTransactionHistory) do not get hidden.  Also, the GridButtonColumn (ViewErrorDescription) that I'm trying to show does not get displayed.  Here is what the grid looks like after this code is executed: grid after trying to show/hide columns

Could someone tell me what I'm doing wrong?

Here is the markup for the grid:
<telerik:RadGrid ID="grdManifest" runat="server" AllowFilteringByColumn="false" AllowSorting="true" 
        AllowPaging="true" PageSize="13" EnableViewState="false" AutoGenerateColumns="false" 
        style="display:none; overflow:hidden;">  
        <MasterTableView ClientDataKeyNames="ManifestID, SupplierCode, SoldToCodeType, SoldToCode, CorporateCode, PrintSiteCode" 
            ShowHeader="true">  
            <Columns> 
                <telerik:GridBoundColumn DataField="ManifestID" Visible="false" DataType="System.Int32" 
                    UniqueName="ManifestID" /> 
                <telerik:GridBoundColumn DataField="ManifestNumber" HeaderText="Manifest Number" 
                    DataType="System.String" DataFormatString="<nobr>{0}</nobr>" HeaderStyle-Width="95px" 
                    ItemStyle-Width="95px" /> 
                <telerik:GridBoundColumn DataField="BillOfLading" HeaderText="BOL" DataType="System.String" 
                    DataFormatString="<nobr>{0}</nobr>" UniqueName="BillOfLading" HeaderStyle-Width="90px" 
                    ItemStyle-Width="90px" /> 
                <telerik:GridBoundColumn DataField="SupplierCode" Visible="false" DataType="System.String" /> 
                <telerik:GridBoundColumn DataField="SoldToCodeType" Visible="false" DataType="System.String" /> 
                <telerik:GridBoundColumn DataField="SoldToCode" Visible="false" DataType="System.String" /> 
                <telerik:GridButtonColumn HeaderText="Sold To" ButtonType="LinkButton" CommandName="ViewSoldTo" 
                    DataTextField="SoldTo" DataTextFormatString="<nobr>{0}</nobr>" UniqueName="ViewSoldTo" 
                    HeaderStyle-Width="150px" ItemStyle-Width="150px" SortExpression="SoldTo">  
                </telerik:GridButtonColumn> 
                <telerik:GridBoundColumn DataField="CorporateCode" Visible="false" DataType="System.String" /> 
                <telerik:GridBoundColumn DataField="PrintSiteCode" Visible="false" DataType="System.String" /> 
                <telerik:GridButtonColumn HeaderText="Print Site" ButtonType="LinkButton" CommandName="ViewPrintSite" 
                    DataTextField="PSName" DataTextFormatString="<nobr>{0}</nobr>" UniqueName="ViewPrintSite" 
                    HeaderStyle-Width="150px" ItemStyle-Width="150px" SortExpression="PrintSite">  
                </telerik:GridButtonColumn> 
                <telerik:GridBoundColumn DataField="ShipDate" HeaderText="Ship Date" DataType="System.DateTime" 
                    DataFormatString="{0:MM/dd/yyyy}" UniqueName="ShipDate" HeaderStyle-Width="70px" 
                    ItemStyle-Width="70px" /> 
                <telerik:GridBoundColumn DataField="ImportDate" HeaderText="Import Date" DataType="System.DateTime" 
                    DataFormatString="{0:MM/dd/yyyy}" HeaderStyle-Width="70px" ItemStyle-Width="70px" /> 
                <telerik:GridBoundColumn DataField="MessageType" HeaderText="Message Type" DataType="System.String" 
                    HeaderStyle-Width="60px" ItemStyle-Width="60px" /> 
                <telerik:GridButtonColumn HeaderText="Total Items" ButtonType="LinkButton" CommandName="ViewItems" 
                    DataTextField="TotalItems" DataTextFormatString="{0}" UniqueName="ViewItems" 
                    HeaderStyle-Width="30px" ItemStyle-Width="30px" SortExpression="TotalItems">  
                </telerik:GridButtonColumn> 
                <telerik:GridButtonColumn HeaderText="Total Rolls" ButtonType="LinkButton" CommandName="ViewRolls" 
                    DataTextField="TotalRolls" DataTextFormatString="{0}" UniqueName="ViewRolls" 
                    HeaderStyle-Width="30px" ItemStyle-Width="30px" SortExpression="TotalRolls">  
                </telerik:GridButtonColumn> 
                <telerik:GridBoundColumn DataField="TotalGrossWeight" HeaderText="Total Gross Weight" 
                    DataType="System.Decimal" DataFormatString="{0:N}" HeaderStyle-Width="75px" ItemStyle-Width="75px" /> 
                <telerik:GridBoundColumn DataField="CustomerImported" HeaderText="Customer Imported" 
                    DataType="System.String" HeaderStyle-Width="70px" ItemStyle-Width="70px" UniqueName="CustomerImported"/>  
                <telerik:GridBoundColumn DataField="RollsReceived" HeaderText="Rolls Received" DataType="System.Int32" 
                    HeaderStyle-Width="55px" ItemStyle-Width="55px" /> 
                <telerik:GridButtonColumn HeaderText="Receipt Errors" ButtonType="LinkButton" CommandName="ViewReceiptErrors" 
                    DataTextField="ReceiptErrors" DataTextFormatString="<nobr>{0}</nobr>" UniqueName="ViewReceiptErrors" 
                    HeaderStyle-Width="90px" ItemStyle-Width="90px" SortExpression="ReceiptErrors">  
                </telerik:GridButtonColumn> 
                <telerik:GridButtonColumn HeaderText="Transaction History" ButtonType="LinkButton" 
                    CommandName="ViewTransactionHistory" DataTextFormatString="<nobr>View Transactions</nobr>" 
                    UniqueName="ViewTransactionHistory" DataTextField="ManifestID" HeaderStyle-Width="110px" 
                    ItemStyle-Width="110px">  
                </telerik:GridButtonColumn> 
                <telerik:GridButtonColumn HeaderText="Error Description" ButtonType="LinkButton"   
                    CommandName="ViewErrorDescription" DataTextField="ReceiptErrors"   
                    DataTextFormatString="<nobr>{0}</nobr>" UniqueName="ViewErrorDescription"   
                    SortExpression="ReceiptErrors" HeaderStyle-Width="110px" 
                    ItemStyle-Width="110px">  
                </telerik:GridButtonColumn> 
            </Columns> 
            <PagerStyle Mode="Slider" /> 
        </MasterTableView> 
        <ClientSettings AllowColumnHide="true">  
            <ClientEvents OnCommand="grdManifest_OnCommand"   
                OnRowMouseOver="grdManifest_RowMouseOver" 
                OnRowContextMenu="grdManifest_RowContextMenu"/>  
            <Selecting AllowRowSelect="true" /> 
            <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="330px" /> 
        </ClientSettings> 
    </telerik:RadGrid> 

Thanks,
Marie
Georgi Krustev
Telerik team
 answered on 29 Jun 2009
1 answer
205 views
I need a dropdown list column with a different datasource for each detail table, so I am programmatically adding a new column to each DetailTable when it gets databound.  The column gets added but has no values in view/edit mode.  Any ideas why the following code fails to populate the values?

    Private Sub radgrid1_DetailTableDataBind(ByVal source As ObjectByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles radgrid1.DetailTableDataBind 
        If e.DetailTableView.Name = "DetailTable2" Then 
            Dim dropdownColumn As New Telerik.Web.UI.GridDropDownColumn() 
            dropdownColumn.HeaderText = "Test" 
            dropdownColumn.UniqueName = "dropdownColumn" 
            dropdownColumn.DropDownControlType = GridDropDownColumnControlType.DropDownList 
            e.DetailTableView.Columns.Insert(2, dropdownColumn) 
        End If 
    End Sub 
 
    Private Sub radgrid1_ItemCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs) Handles radgrid1.ItemCreated 
        If e.Item.OwnerTableView.Name = "DetailTable2" Then 
            If TypeOf e.Item Is GridEditableItem Then 
                Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem) 
                Dim dropdownColumn As GridDropDownColumn = DirectCast(item.OwnerTableView.Columns(2), GridDropDownColumn) 
 
                Dim data As New Dictionary(Of StringString
                data.Add("A""A"
                data.Add("B""B"
                dropdownColumn.FillValues(data, item) 
            End If 
        End If 
    End Sub 

Georgi Krustev
Telerik team
 answered on 29 Jun 2009
1 answer
172 views
Hi,

I am having a user control which contains two buttons  SAVE & CANCEL and I am using that user control as radTooltip and this tooltip opens on a button click.
Here i want to close the tooltip on SAVE button click (after performing some operations) and on Cancel button click?
How to do this?



Thanks,
Svetlina Anati
Telerik team
 answered on 29 Jun 2009
1 answer
143 views
i'm trying to trigger on demand download of one combobox on selectedindex change (Client side Javascript ) event of other combobox.
e.g.
on selected index change event of country i want to populate states in other combobox using WebMethod
here what i tried,
//Country combobox event
function onSelectedIndexChanged(sender, eventArgs) {
        var id = eventArgs._item.get_value();
       var ddlstate = $get('ddlStateComboBoxID');
        ddlstate.control._doLoadOnDemandFromWebService(id, { NumberOfItems: 0, Text: '', ID: id });
    }
It calls WebMethod and get result properly at client side.
But it is giving javascript error on callback. It seems it is not initializing other methods that required before calling _doLoadOnDemandFromWebService.
so using which method i can start populating State Combo box?

Also I'm using Grid. and inside that i have 2 comboboxes on each row. So i can not use <%= State.ClientID %> in javascript.
So I'm creating JSon object having Country combo Id as Name and State combo id as its value(Not shown in above example).
Is there any other better way to define relation.

thanks & regards,
Shailesh
Yana
Telerik team
 answered on 29 Jun 2009
4 answers
107 views
Hi,
I want to make an item invisible, based on certain attributes of it. Is it possible in the grid? For example if the item is marked as deleted don't show it on grid. The actual delete is performed after certain user actions. Please let me know if any solution is available other than maintaining two list one actual list with and one list for View.

Thanks you
Kunmuni
Kunmuni
Top achievements
Rank 1
 answered on 29 Jun 2009
1 answer
193 views
Hi,

I would like to know how I can set the FileExplorer in Readonly mode, no matter the value of PathPermissions on files/folders.

I have written my own FileBrowserContentProvider, for my database filesystem, but the "readonly mode" data is not in the filesystem data, but somewhere else in my app (computed value).

So is it possible to add a "readonly" mode to the FileExplorer, that deactivate toolbar buttons, context menu, and drag-drop ?

Thanks.
Fiko
Telerik team
 answered on 29 Jun 2009
1 answer
230 views
I have a timer that opens an existing radwindow using the RegisterStartupScript method since it's inside of an update panel:
Dim scriptstring As String = "window.radopen('something.aspx', 'YOZ');" 
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "YOZ", scriptstring, True) 
'YOZ being the ID of one of my windows in the windowmanager

What i need to do now is to find out if this window is indeed open so i don't keep refreshing the page when i call the script to load the window again (which is what's happening). I would also like to close this window programatically if need be. 

thanks!


Fiko
Telerik team
 answered on 29 Jun 2009
2 answers
181 views
I have an editable grid that needs to have one of its cells conditionally editable.  I decided that the best place to make this check would probably be the EditCommand event.  My rationale was that when an item was clicked to be edited, I would grab the ID from it, and if it was greater than 0, I would grab the GridTextBoxColumnEditor for the DataKey cell and set its TextBox to Enabled = false.  Below is my code snippet.
    <telerik:RadGrid ID="coreDataEntriesGrid" runat="server" Width="700" EnableViewState="true" HorizontalAlign="Center" 
     AutoGenerateColumns="false" AllowSorting="false" OnRowDrop="CoreDataEntriesGrid_RowDrop" Skin="Web20" 
     OnNeedDataSource="CoreDataEntriesGrid_NeedDataSource" OnUpdateCommand="CoreDataEntriesGrid_UpdateCommand" 
     OnInsertCommand="CoreDataEntriesGrid_InsertCommand" OnEditCommand="CoreDataEntriesGrid_EditCommand"
        <MasterTableView DataKeyNames="ObjectID,DataKey,DataValue,IsActive" EditMode="InPlace" CommandItemDisplay="Top"
            <Columns> 
                <telerik:GridEditCommandColumn ButtonType="LinkButton" CancelText="Cancel" EditText="Edit" UpdateText="Update"  /> 
                <telerik:GridBoundColumn HeaderText="Key" DataField="DataKey" ItemStyle-Width="100" 
                 ColumnEditorID="dataKeyEditor" UniqueName="DataKey" /> 
                <telerik:GridBoundColumn HeaderText="Value" DataField="DataValue" ItemStyle-Width="500" 
                 ColumnEditorID="dataValueEditor" UniqueName="DataValue" /> 
                <telerik:GridCheckBoxColumn HeaderText="Active" DataField="IsActive" ItemStyle-Width="50"  
                 UniqueName="IsActive" /> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings AllowRowsDragDrop="true"
            <Selecting AllowRowSelect="true" /> 
            <ClientEvents OnRowDropping="CoreDataEntriesGrid_RowDropping" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
     
    <telerik:GridTextBoxColumnEditor ID="dataKeyEditor" runat="server" TextBoxStyle-Width="100" /> 
    <telerik:GridTextBoxColumnEditor ID="dataValueEditor" runat="server" TextBoxStyle-Width="500" /> 

        protected void CoreDataEntriesGrid_EditCommand(object source, GridCommandEventArgs e) 
        { 
            GridEditableItem item = e.Item as GridEditableItem; 
            int id = (int) item.GetDataKeyValue("ObjectID"); 
            if (id > 0) 
            { 
                (item.EditManager.GetColumnEditor("DataKey"as GridTextBoxColumnEditor).TextBoxControl.Enabled = false
            } 
        } 
 

What's happening is that I'm getting an ArgumentOutOfRangeException on the line item.EditManager.GetColumnEditor("DataKey").  I figured ok, this is obviously not the right event to tap into.  However, when I was in debug mode, I put a watch on item.EditManager.GetColumnEditor("IsActive") and that returned the correct GridCheckboxColumnEditor without tossing the exception.  The only thing that I could tell that was different was the fact that I'm setting the ColumnEditorID for the DataKey column and not on the IsActive column (besides the obvious fact that they're different column types), so I tried taking it out and letting the BoundColumn handle it on its own, but that had the same result.  Could you point me in the right direction?

Thanks,
Jared
eakins05
Top achievements
Rank 1
 answered on 29 Jun 2009
6 answers
140 views
Hi,

I'm changing the background color of an appointment, and not using you skin/style
everything works great,
but there is a small gap in the upper part of the appointment that doesn't fill the whole cell,

I'm using the following

 .RadScheduler .rsAptContent, .RadScheduler .rsAptIn, .RadScheduler .rsAptMid, .RadScheduler .rsAptOut
        {
            background-image: none !important;
        }

It also display differently in IE & FF

http://80.179.90.69/ie.png
http://80.179.90.69/ff.png





Please advise,
Mickey
Mickey
Top achievements
Rank 1
 answered on 29 Jun 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?