Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
399 views
Hello,

I have a RadGrid being bound via the DataSource property.  Null is being bound to the control because there are no records, and DataBind() is being called.  But my NoRecordsTemplate isn't being shown; instead, I see a horizontal line and that's it.  No template content.  How do I get this to work?  I'm not doing anything special and I have EnableNoRecordsTemplate set to true.

Thanks.
Dimo
Telerik team
 answered on 25 Nov 2008
4 answers
231 views

I have a client that would like to see a drop shadow with the raddock pieces.  Nothing fancy, just an offset black line on the top and right edges of the panel (like a shadow).  I can do this with divs and offsets, however I can't figure out how to do it with a RadDock item.  The divs don't follow the dock.  Here's the effect I'm looking for:

The CSS:

    <style>  
        body {  
            margin0px;  
            padding20px;  
            font-familyverdana;  
            font-size12px;  
            background-color#FFFFFF;  
        }  
 
        #shadow-container {  
            positionrelative;  
            left3px;  
            top3px;  
            margin-right3px;  
            margin-bottom3px;  
        }  
 
        #shadow-container .shadow2,  
        #shadow-container .shadow3,  
        #shadow-container .container {  
            positionrelative;  
            left: -3px;  
            bottombottom: -3px;  
        }  
 
        #shadow-container .shadow1 {  
            /*background: #F1F0F1;*/ 
            background-color#808080;  
        }  
 
        #shadow-container .shadow2 {  
            background#DBDADB;  
        }  
 
        #shadow-container .shadow3 {  
            background#B8B6B8;  
        }  
 
        #shadow-container .container {  
            background#ffffff;  
            border1px solid #848284;  
            padding10px;  
        }  
    </style> 

The HTML:

    <div id="shadow-container">  
        <div class="shadow1">  
            <div class="container">  
                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.  
            </div> 
        </div> 
    </div> 

joe

Joseph
Top achievements
Rank 1
 answered on 25 Nov 2008
4 answers
136 views
How can I include controls inside of ToolTipManger in aspx (design mode)? If it's possible?
Svetlina Anati
Telerik team
 answered on 25 Nov 2008
1 answer
187 views
Has anyone experienced problems with DataKeys in grids hierachical grids? I have a grid somewhat like this:

Role1
 - User1
 - User2
Role2
 - User2
 - User4
Role 3
 - User1

On the parent level I have a column with a LinkButton and in the ItemCommand event I want to get the DataKey value for the row (eg. "RoleId1") when the button is pressed. This works fine until I click a role and and exand to see users. If I click Role1 row button the detail view is expaned and data is fetched for the details view. In the ItemCommand event I can get the DataKey for Role1, but if I subsequently click the button on Role2 or Role3 their DataKey is missing and when I look into the Item object its seems as though the item is one of their siblings.

Hope somebody has a clue, thanks in advance!

        <telerik:RadGrid id="uiRoleSummaryRadGrid" runat="server" allowsorting="True" width="95%"
            cssclass="GVTableLayout3" skin="" enableajax="True" showfooter="True" allowpaging="True"
            allowmultirowselection="True" gridlines="None" autogeneratecolumns="false" onitemcommand="uiRoleSummaryRadGrid_ItemCommand"
            ondetailtabledatabind="uiRoleSummaryRadGrid_DetailTableDataBind"
            onneeddatasource="uiRoleSummaryRadGrid_NeedDataSource" Font-Size="Medium"
            ForeColor="Red">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView DataKeyNames="Id,Name">
                <DetailTables>
                    <telerik:GridTableView DataKeyNames="ProfileUserId,ContactFullName" Name="UserDetails" Width="100%">
                        <RowIndicatorColumn Visible="False">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn Visible="False" Resizable="False">
                        <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridTemplateColumn UniqueName="ContactFullName" HeaderText="UserName" SortExpression="ContactFullName"
                            HeaderButtonType="LinkButton" SortAscImageUrl="~/SelfServiceB2B/Test/Images/asc.gif"
                            SortDescImageUrl="~/SelfServiceB2B/Test/Images/desc.gif" ItemStyle-ForeColor ="Black" >
                            <ItemTemplate>
                                <asp:LinkButton ID="uiViewRoleNameLinkButton" runat="server" Text='<%# Eval("ContactFullName") %>'
                                    CommandName="ViewUser" CommandArgument='<%# Eval("ProfileUserId") %>' ></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle ForeColor="Black"></ItemStyle>
                            </telerik:GridTemplateColumn>
                        </Columns>

                        <EditFormSettings>
                            <PopUpSettings ScrollBars="None"></PopUpSettings>
                        </EditFormSettings>
                    </telerik:GridTableView>
                </DetailTables>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn Resizable="False">
                <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridTemplateColumn UniqueName="Name" HeaderText="Role" SortExpression="Name"
                        HeaderButtonType="LinkButton" SortAscImageUrl="~/SelfServiceB2B/Test/Images/asc.gif"
                        SortDescImageUrl="~/SelfServiceB2B/Test/Images/desc.gif">
                        <ItemTemplate>
                            <asp:LinkButton ID="uiViewRoleLinkButton" runat="server" Text='<%# Eval("Name") %>'
                                CommandName="ViewRole"></asp:LinkButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridButtonColumn ButtonType=PushButton Text = "Edit" UniqueName="ID"
                        HeaderText="Edit" CommandName="EditRole" HeaderButtonType="LinkButton">
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn ButtonType=PushButton Text = "Show Id" UniqueName="ID"
                        HeaderText="Delete" CommandName="DeleteRole" HeaderButtonType="LinkButton">
                    </telerik:GridButtonColumn>
                </Columns>
                <EditFormSettings>
                    <PopUpSettings ScrollBars="None"></PopUpSettings>
                </EditFormSettings>
            </MasterTableView>
            <PagerStyle PageButtonCount="5" AlwaysVisible="true" Mode="NextPrevAndNumeric" HorizontalAlign="Center" Position="Bottom" ShowPagerText="false" />
        </telerik:RadGrid>



        protected void uiRoleSummaryRadGrid_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            try
            {
                switch (e.CommandName)
                {
                    case "DeleteRole":
                        {

                            Telerik.Web.UI.GridDataItem item = uiRoleSummaryRadGrid.Items[e.Item.ItemIndex];

                            if (null != item.GetDataKeyValue("Id"))
                            {
                                uiResultLabel.Text = "Role Id" + item.GetDataKeyValue("Id").ToString() ;
                            }
                            else
                            {
                                if (null != item.GetDataKeyValue("ProfileUserId"))
                                {
                                    uiResultLabel.Text = "Error while get data key value for Id, but actual key value is " + item.GetDataKeyValue("ProfileUserId").ToString();
                                }
                                else
                                {
                                    uiResultLabel.Text = "Error while get data key values";
                                }
                              
                            }
                        }
                        break;
                }
            }
            catch (Exception ex)
            {

            }
        }

Vlad
Telerik team
 answered on 25 Nov 2008
2 answers
100 views
I'm using treeview control and I place the control inside a div tag then I set the dir attribute of the div tag to "rtl". the treeview appeared okay but the plus and minus (+/-) images did not show up. the images appears only at design time but when I view the page in the browser the images disappears.


I tried all the passable ways but I end up with the same problem.

Please how can I resolve this problem?

Thank you
Ahmad Alkhiary
Top achievements
Rank 1
 answered on 25 Nov 2008
1 answer
53 views

In one of our scenarios we have content page which loads a webusercontrol which has Telerik grid and have <ClientEvents OnRowDblClick="ShowImportResult" />

In the javascript declared in the usercontrol the following is not working: sender.get_masterTableView().get_dataItems()[eventArgs.get_itemIndexHierarchical()];

Any ideas why I am not getting "eventArgs.get_itemIndexHierarchical()" as desired.

Atul
Vlad
Telerik team
 answered on 25 Nov 2008
1 answer
154 views
I have a radGrid and its columns get created all server side dynamically.
The grid has 3 columns and each column contains a textbox.
On client-side, the first textbox value needs to be changed according to the inputs of the second and the third textboxs.
This javascript function has those three column names.
Inside the function I can get innerHTML values of all three controls by doing

GridControl.GetCellByColumnUniqueName(selectedRow, thefirstTextBoxColumnName).innerHTML

GridControl.GetCellByColumnUniqueName(selectedRow, thesecondTextBoxColumnName).innerHTML

GridControl.GetCellByColumnUniqueName(selectedRow, thethirdTextBoxColumnName).innerHTML

Firstly, are there any ways of extracting only values from innerHTML strings without having to create a complex string manipulation to get only values?

Secondly, how do I assign a value to the first textbox?
If I do
GridControl.GetCellByColumnUniqueName(selectedRow, thefirstTextBoxColumnName).innerHTML = 1 + 2;
the column becomes label rather than staying in input textbox.

Thanks in advance,

Toby

Yavor
Telerik team
 answered on 25 Nov 2008
1 answer
124 views
Hello!

I'm wondering .. does anyone tryed to send notifications (for example by email) using informations stored in RadScheduler database? Biggest problem here I think is sending only one email per RadScheduler entry (especially for recurring events which can be changed from 1 per month to 1 per week).

Thanks for any info
Peter
Telerik team
 answered on 25 Nov 2008
1 answer
122 views
Hi,

I have dynamically generated treeview and i wish to apply defined css class to last node of each parent node using js on 

OnClientNodeExpanded event.

 

<

 

script language="javascript" type="text/javascript">

 

 

 

 

 

 

function ApplyCSS(sender, eventArgs)

 

{

 

////var treeView = $find("<%=tvCategories.ClientID%>");

 

 

 

 

 

 

//var selectedNode = treeView.get_selectedNode();

 

 

 

 

 

 

var node =eventArgs.get_node();

 

alert(node.get_nodes().get_count());

 

if(node.get_nodes().get_count()>0)

 

{

 

for(var i = 0; i < node.get_nodes().get_count(); i++){

 

 

//WHAT SHOULD BE THE CODE HERE?
 i tried but gives error.

 

node.get_nodes().getNode(i).style.cursor = 'hand'; ;

}

}

 

}

regards,
Parimal

Atanas Korchev
Telerik team
 answered on 25 Nov 2008
1 answer
39 views
HI,
I use a grid with 2 levels but only one Datasource with 2 tables. The second table is used for the second hierarchy level.
I can sort the first hierarchy level but it doesn't work for the 2nd hierarchy level.

I don't understand why. Does somone know how to sort the 2nd hierarchy level?

thanks,
Maria Ilieva
Telerik team
 answered on 25 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?