Telerik Forums
UI for ASP.NET AJAX Forum
22 answers
470 views
I want to perform grouping on a RadGrid like the example in the demo section for Outlook like grouping.

My database holds a list of blog posts with Date and Time in the same field {pubDate}

I only want to group on the Date part, not the time part

Is this possible?
I tried changing the value of pubDate the field in the itemdatabound and/or itemdatacreate but that did not seem to work.

Thanks
Alan

<telerik:RadGrid ID="ResultsGrid2"  Skin="Vista" Width="430px" PageSize="30" AllowSorting="true"
            AllowPaging="True" ShowGroupPanel="True" AutoGenerateColumns="False" GridLines="none"  runat="server" >
              <PagerStyle Mode="NumericPages" Position="TopAndBottom" ></PagerStyle>             
            <MasterTableView DataKeyNames="PostID" >
            <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="Date" FieldName="PubDate" FormatString="{0:D}"></telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="PubDate" SortOrder="Descending"></telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>                
                <Columns>                                                
                    <telerik:GridDateTimeColumn ItemStyle-Width="60" DataField="PubDate" HeaderText="Date" DataFormatString="{0:dd/MM/yyyy}" UniqueName="pubDate" ></telerik:GridDateTimeColumn>                    
                    <telerik:GridHyperLinkColumn DataTextField="Title" DataNavigateUrlFields="Link" HeaderText="Post" UniqueName="PostLink" Target="_blank"></telerik:GridHyperLinkColumn>
                    <telerik:GridHyperLinkColumn ItemStyle-Width="80" DataNavigateUrlFields="Blog.title" DataNavigateUrlFormatString="/tag.aspx/{0}" DataTextField ="Blog.title" HeaderText="Blog" UniqueName="BlogTitle"></telerik:GridHyperLinkColumn>
                    <telerik:GridBoundColumn DataField="Description" UniqueName="Description" Visible="false" ></telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
                <ClientEvents OnRowMouseOut="RowMouseOver" />
                <Selecting AllowRowSelect="True"></Selecting>
            </ClientSettings>
        </telerik:RadGrid>
Zoran
Telerik team
 answered on 05 Oct 2009
6 answers
430 views
Hello,

I'm trying to create custom attributes on a Radtreenode that is being build with the property ServerSideCallback.  For some reason, when I create this node with node.Attributes.Add("key", "Value"), it keeps the attribute at first.  But once it posts back and I access the node via the RadTreeNodeEventArgs e.Node.  My attributes Count=0 and I have no keys available to access the value.  If I change the node to ServerSide, everything works fine, however, this isn't what I want.

Any suggestions or thoughts would be great.


--This is where i create the node.
<code>
foreach (var zone in x)
             {
                 RadTreeNode zoneNode = new RadTreeNode();
                 zoneNode.Text = String.Format("Zone {0}", zone.ZoneName);
                 zoneNode.Value = zone.NSD_ZoneID.ToString();
                 zoneNode.Expanded = false;
                 zoneNode.ExpandMode = TreeNodeExpandMode.ServerSide;
                 zoneNode.Attributes.Add("type", "OnDemand");
                 zoneNode.PostBack = true;
                 zoneNode.Checkable = false;
                 node.Nodes.Add(zoneNode);
             }
</code>


<code>
//This is where the e.Node.Attributes.Count = 0;
protected void DPTTreeView_NodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
        {
             switch (e.Node.Attributes["type"])
             {
...snip....
}
}
</code>
Yana
Telerik team
 answered on 05 Oct 2009
1 answer
64 views
I would like to use an custom ToolsFile.xml to handel the css style classes showed in RadHtmlField control. I have changes to ToolsFile.xml. I added the following lines to the end after </tools> tag.

</tools>
  <classes>
    <class name="Clear Class" value="" />
    <class name="Links Class" value="a.link" />
    <class name="Images Class" value=".img" />
    <class name="My Red Text" value=".redText" />
  </classes>

But now when I go to the edit mode of the page there is only the Clear Class in the menu. Nothing more.

What I'm I doing wrong? What is the best way to have you own css classes in the drop down menu? So that nothing else than your own classes are shown.
Stanimir
Telerik team
 answered on 05 Oct 2009
1 answer
147 views
Hi,

is there a way to check if gridtableview is in edit mode?

Thnx
Shinu
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
114 views
Hi,
My Scenario is , I want to delete the selected items( selected using checkbox)  in the grid by clicking on the delete link button using code-behind in vb.Please help me
Shinu
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
99 views
 
hi
I would like to implement alert notification functionality like Outlook's reminder using ASP.NET. & Telerik Web Controls

Do anyone having any idea/sample to adress my needs

Please provide me with sample code.

Regards,

Kadar
Princy
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
84 views
Hi everybody,

Im looking for some dropdown-checkbox. Is there opion to create RadComboBox with checkboxes for each option?

I need inline control with multiple choices.

Thanks.
Princy
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
98 views
Hi,
how to get the row values of the selected item in the  grid with  multirowselection using checkboxes.
Shinu
Top achievements
Rank 2
 answered on 05 Oct 2009
2 answers
278 views
I hope this question hasn't been asked/answered before..

On a page we have a div that is filled with dynamic content; it's populated via a JavaScript AJAX method so we can set a refresh timer, refreshing the data every 3 minutes.  The initial load of this div is called from Page_Load but not on PostBack.  There are User Controls on the page that when used can require the div to update it's content, in these cases the User Control will add to Response Scripts a call to the JavaScript AJAX method.  To keep the update seemless we added a RadAjaxManager to link those User Controls to the div.

<telerik:AjaxSetting AjaxControlID="UserControl">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="UserControl" />
        <telerik:AjaxUpdatedControl ControlID="dynDiv" />
    </UpdatedControls>
</telerik:AjaxSetting>

The problem is that the User Controls won't _always_ require the div to update its content and in the cases where it shouldn't it won't add the JavaScript call to Response Scripts, but the RadAjaxManager will still update the div, refreshing it to it's initial state (a loading gif).

I've tried programmatically adding AjaxSettings for the specific buttons in the User Control that may update the div.  This was in the code behind of the User Control using a reference to the main pages RadAjaxManager, but those buttons won't always update the div so it'll still cause the problem, just in fewer circumstances.

I hope I explained the situation well enough and hopefully someone has some help to offer :)

Mike.
Mike
Top achievements
Rank 1
 answered on 05 Oct 2009
5 answers
192 views
<head runat="server"> 
    <title></title> 
    <style> 
html,body { 
    margin:0; 
    padding:0; 
    height:100%; /* needed for container min-height */ 
} 
    </style> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <div style="height:100%;">  
                <telerik:RadSplitter ID="RadSplitter_Main" runat="server" Orientation="Vertical" Height="100%" Width ="100%" Skin="Office2007"> 
                    <telerik:RadPane ID="RadPane_left" runat="server" Scrolling="None" Width="100%"> 
                                     4444444444444444444444444444444444444444444 
                    </telerik:RadPane> 
                    <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode ="None"    /> 
                    <telerik:RadPane ID="RadPane_menu" runat="server" Scrolling="None" Width="50px"> 
                        <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" ExpandedPaneId="RadSlidingPane1" SlideDirection="Left"> 
                            <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server" Title="Menu1" Scrolling="None" EnableDock ="true" > 
                                <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Office2007"> 
                                    <Items> 
                                        <telerik:RadPanelItem runat="server" Text="Root RadPanelItem1"> 
                                        <Items > 
                                        <telerik:RadPanelItem  Text ="123" ></telerik:RadPanelItem> 
                                        </Items> 
                                        </telerik:RadPanelItem> 
                                        <telerik:RadPanelItem runat="server" Text="Root RadPanelItem2"> 
                                        </telerik:RadPanelItem> 
                                        <telerik:RadPanelItem runat="server" Text="Root RadPanelItem3"> 
                                        </telerik:RadPanelItem> 
                                        <telerik:RadPanelItem runat="server" Text="Root RadPanelItem4"> 
                                        </telerik:RadPanelItem> 
                                        <telerik:RadPanelItem runat="server" Text="Root RadPanelItem5"> 
                                        </telerik:RadPanelItem> 
                                    </Items> 
                                </telerik:RadPanelBar> 
                            </telerik:RadSlidingPane> 
                            <telerik:RadSlidingPane ID="RadSlidingPane2" runat="server" Title="Menu2" Scrolling="None"> 
                            </telerik:RadSlidingPane> 
                        </telerik:RadSlidingZone> 
                    </telerik:RadPane> 
                </telerik:RadSplitter> 
    </div> 
    </form> 
</body> 
</html> 
 
1-  hi telerik
in first view my panel is not docket to right edge of my browser
but if i click in dock it will be docket to right

can u help me?
2-does this splitter suporrts rtl mode?

tnx
Ali Rad
Top achievements
Rank 1
 answered on 04 Oct 2009
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?