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

 I would like to know how to retain the selected item in the grid after the filtering operation had done.

Help me.

Unni
unnikkannan m
Top achievements
Rank 1
 answered on 10 Sep 2009
3 answers
199 views
I have a grid with a single Detail Table into it. 
Basically, master table is category which just displays category name and detail table displays records for that related parent category. 
Detail table has 5 columns. Evenrything is fine but paging in detail table is not working. 
Even though each category has more than 2 records with PageSize=2; it doesn't display more than 1 page in paging control.
What seems to be wrong here? Appreciate any help!!
~Narendra

ASPX:
<telerik:RadGrid ID="RadGridParent" runat="server" EnableAJAX="True" GridLines="None"  
            ShowGroupPanel="True" Skin="Office2007" AutoGenerateColumns="False" Description="Messages"  
            ShowStatusBar="True" Subtitle="Messages" Title="Messages" Width="98%"  
            OnItemCommand="RadGridParent_ItemCommand" ShowHeader="False" 
            PagerStyle-AlwaysVisible="False" AllowPaging="True" PageSize="2"  
            OnDetailTableDataBind="RadGridParent_DetailTableDataBind"  
            onitemdatabound="RadGridParent_ItemDataBound"  
            onneeddatasource="RadGridParent_NeedDataSource" 
            onprerender="RadGridParent_PreRender" AllowSorting="True"  
            AllowMultiRowSelection="True"> 
        <MasterTableView DataKeyNames="CategoryID" CommandItemDisplay="Top"> 
            <DetailTables> 
                <telerik:GridTableView runat="server" DataKeyNames="CategoryID"  
                        AutoGenerateColumns="False" GridLines="Both"  
                        CommandItemDisplay="Bottom" AllowAutomaticInserts="false" AllowAutomaticUpdates="false"  
                        HierarchyLoadMode="ServerOnDemand" ShowHeader="True"  
                    PagerStyle-AlwaysVisible="True" AllowCustomPaging="True" 
                    BorderStyle="Ridge" Width="100%" 
                        NoDetailRecordsText="There are no messages." > 
                    <ParentTableRelation> 
                        <telerik:GridRelationFields DetailKeyField="CategoryID" MasterKeyField="CategoryID"  /> 
                    </ParentTableRelation> 
                    <RowIndicatorColumn Visible="false"> 
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn Resizable="False"> 
                        <HeaderStyle Width="20px" />                             
                    </ExpandCollapseColumn> 
                    <PagerStyle Mode="NumericPages"></PagerStyle> 
                     <CommandItemTemplate> 
                        <div> 
                          <table border=0 cellspacing=0 cellpadding=0 width="100%"> 
                            <tr> 
                                <td width="40%"> 
                                    <div style="float:left;"> 
                                    <asp:LinkButton ID="btnDeleteMessage" ConfirmText="Sure?" runat="server" Text="Delete Selected" CommandName="MessageDelete" OnClientClick="return ConfirmDelete(this);" SkinId="swGridDeleteSelectedLinkButton"> </asp:LinkButton> 
                                    </div> 
                                </td> 
                                <td width="20%"> 
                                    <div style="float:left;"> 
                                        <asp:LinkButton ID="btnMessageMarkAsRead" runat="server" Text="Mark Selected as Read" CommandName="MessageMarkRead" SkinId="swGridMarkMessageReadLinkButton"> </asp:LinkButton> 
                                    </div> 
                                </td> 
                                <td width="40%"> 
                                    <div style="float:right;"> 
                                        <asp:LinkButton ID="btnMessageMarkAsUnread" runat="server" Text="Mark Selected as Unread" CommandName="MessageMarkUnread" SkinId="swGridMarkMessageUnreadLinkButton"></asp:LinkButton> 
                                    </div> 
                                </td> 
                            </tr> 
                          </table> 
                        </div> 
                    </CommandItemTemplate>         
                    <Columns> 
                     
                    <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn"  HeaderText="Select All"> 
                    <HeaderStyle Width="10px" /> 
                    </telerik:GridClientSelectColumn> 
                        <telerik:GridBoundColumn DataField="IsRead" DataType="System.String" HeaderText=""  Groupable="false"  
                                SortExpression="IsRead" UniqueName="MessageReadIcon" Visible="True"> 
                                <HeaderStyle Width="10px" /> 
                                <ItemStyle Width="10px" /> 
                        </telerik:GridBoundColumn> 
 
                        <telerik:GridBoundColumn DataField="CategoryID" DataType="System.Int32"  Groupable="false"  
                                ReadOnly="True" SortExpression="NotificationMsgID" UniqueName="NotificationMsgID" Visible="False">                     
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="NotificationMsgUserID" DataType="System.Int32"  Groupable="false"  
                                ReadOnly="True" SortExpression="NotificationMsgUserID" UniqueName="NotificationMsgUserID" Visible="False">    
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="RVNotificationMsgUser" DataType="System.Int32"  Groupable="false"  
                                ReadOnly="True" UniqueName="RVNotificationMsgUser" Visible="False">    
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Topic" HeaderText="Topic" DataType="System.String" Groupable="false"  
                                SortExpression="Topic" UniqueName="Topic">                     
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="SendDate" DataType="System.DateTime"  Groupable="false"  
                                HeaderText="Date" SortExpression="SendDate" UniqueName="SendDate">                     
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Sender" DataType="System.String" HeaderText="From"  Groupable="false"  
                                SortExpression="Sender" UniqueName="Sender"> 
                            <ItemStyle Width="140px" /> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="MessageText" DataType="System.String" HeaderText="Message" Groupable="false" SortExpression="MessageText"  
                                UniqueName="MessageText">                     
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="SenderUserLastName" UniqueName="SenderUserLastName" Groupable="false" Visible="False">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="SenderUserFirstName" UniqueName="SenderUserFirstName" Groupable="false" Visible="False">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="SenderUserMiddleName" UniqueName="SenderUserMiddleName" Groupable="false" Visible="False">  
                        </telerik:GridBoundColumn> 
                    </Columns>      
                    <editformsettings> 
                        <popupsettings scrollbars="None" /> 
                    </editformsettings> 
                </telerik:GridTableView> 
            </DetailTables> 
             
            <editformsettings> 
                <popupsettings scrollbars="None" /> 
            </editformsettings> 
             
            <CommandItemTemplate> 
                <div style="float:right;text-align:right"> 
                    <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid" 
                            SkinID="swGridRefreshLinkButton" Text="Refresh" ToolTip="Refresh"> </asp:LinkButton> 
                </div> 
            </CommandItemTemplate> 
            <RowIndicatorColumn Visible="False"> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn>  
            <ExpandCollapseColumn Visible="true" Resizable="False"> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridBoundColumn DataField="MessageDescription" HeaderText="Messages"  
                    SortExpression="MessageDescription" UniqueName="MessageDescription"  
                    ItemStyle-Font-Bold="true" Groupable="false">                     
                    <ItemStyle Font-Bold="True" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="CategoryID" UniqueName="CategoryID" HeaderText="" Visible="False"> 
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <GroupPanel ID="SystemWorksStandardGridGroupPanel" Text="Notifications"> 
          <PanelStyle Width="100%" Height="20px" /> 
        </GroupPanel> 
        <ClientSettings AllowColumnsReorder="False" AllowDragToGroup="True" ReorderColumnsOnClient="False"> 
            <Selecting AllowRowSelect="True" /> 
            <Scrolling AllowScroll="false" UseStaticHeaders="false" /> 
        </ClientSettings> 
        <PagerStyle Mode="NumericPages"></PagerStyle> 
</telerik:RadGrid> 
 

CS
protected void RadGridMessages_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
        { 
            if (!e.IsFromDetailTable) 
            { 
                LoadParentData(); 
            } 
        } 
 
 
        private void LoadParentData() 
        { 
            Category[] cats = new Category[2]; 
 
            Category cat1= new Category(); 
            cat1.MessageTypeID = 1; 
            cat1.MessageDescription = "Catorogy 1"; 
            cats [0] = cat1 ; 
 
            cat1.MessageTypeID = 2; 
            cat1.MessageDescription = "Category 2"; 
            cats[1] = cat1; 
 
            RadGridParent.MasterTableView.DataSource = cats; 
        } 
 
        protected void RadGridParent_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e) 
        { 
            childDataSource[] childDS; 
 
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem; 
            int catId = Int32.Parse(dataItem.GetDataKeyValue("CategoryID").ToString()); 
 
            childDS = GetChildDataSourceByCategory(catId); 
             
        e.DetailTableView.DataSource = childDS; 
        } 
 
 


Anil Sahu
Top achievements
Rank 1
 answered on 10 Sep 2009
8 answers
131 views
Hi,

How can I add more than one AutoCompleteSeparator character ? E.g ';' and ','

Because, when I set up AutoCompleteSeparator=";,", it does not work properly. The text isn't autocompleted when the ',' is pressed.

Thanks in advance,
Michal
Top achievements
Rank 1
 answered on 10 Sep 2009
2 answers
146 views
Dear Sirs,

i need to count the selected nodes on my treeview.
can you show me an example using VB code, please?
many thanks in advance

Luca
 
Luca Fumagalli
Top achievements
Rank 1
 answered on 10 Sep 2009
1 answer
108 views
hai!

I can not get correct subtotals of each column field.. subtotals is very long.....And also I have another issue...when view report through report viewer control the below error comes..

An error has occured while processing TextBox 'salesOrPurchaseDescDataTextBox':
The expression contains object 'SalesOrPurchaseDesc' that is not defined in the current context.

I have get data from xml......

that xml file is

<?

xml version="1.0" encoding="utf-8" ?>

 

 

<

NewDataSet>

 

<

BillItemLine>

 

<

ItemLineAmount>844.35</ItemLineAmount>

 

<

ItemLineItemRefListID>350000-1247582799</ItemLineItemRefListID>

 

<

EstimateKey>Plan 804-1:804-1-502</EstimateKey>

 

<

Plan>804-1</Plan>

 

<

HouseAddress>3341 West Avenue, Beaumont</HouseAddress>

 

<

EstimateLineAmount>6000</EstimateLineAmount>

 

<

Name>804-1-502</Name>

 

<

SalesOrPurchaseDesc>Foundation Labor</SalesOrPurchaseDesc>

 

</

BillItemLine>

 

<

BillItemLine>

 

<

ItemLineAmount>84.87</ItemLineAmount>

 

<

ItemLineItemRefListID>370000-1247585073</ItemLineItemRefListID>

 

<

EstimateKey>Plan 804-1:804-1-633</EstimateKey>

 

<

Plan>804-1</Plan>

 

<

HouseAddress>3341 West Avenue, Beaumont</HouseAddress>

 

<

EstimateLineAmount>300</EstimateLineAmount>

 

<

Name>804-1-633</Name>

 

<

SalesOrPurchaseDesc>Portalet</SalesOrPurchaseDesc>

 

</

BillItemLine>

 

</

NewDataSet>


can anyone please me?  thx....

 

Priya Priya
Top achievements
Rank 1
 answered on 10 Sep 2009
1 answer
156 views
If we place a .MOV file on a page (i.e. http://stage03.tsunami.aptinet.com/mov_test.aspx)
it does not play properly for users who do not have the QuickTime plug-in.  It simply shows a default QuickTime player that does not play anything

Here's the code

<object type="application/x-oleobject" height="150" width="150" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="FileName" value="../UserControls/Handler.ashx?path=PLKNew/Objects/Media/sample_iTunes.mov"/>
<embed src="../UserControls/Handler.ashx?path=PLKNew/Objects/Media/sample_iTunes.mov" width="150" height="150" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer"></embed>
</object>

Question : IS it possible to change plugin from mediaplayer to quicktime for MOV files.

Thanks,
Shubod






Rumen
Telerik team
 answered on 10 Sep 2009
1 answer
194 views
Hi,

I've got a question regarding grid layout/css:

My client wants the command item bar on top to be a transparent one. Also he wants everything under it to have a border around it (so header, grouping, rows, footers edc) So, except for the command bar, the grid must have a border.

I've tried so, but thecommand bar and the column groups are in the same table, other tr's, the column headers are not in a seperated element, so i can set the left, top an right borders of the columns row.

Regards, Erik
Dimo
Telerik team
 answered on 10 Sep 2009
1 answer
218 views
Hi

I have the following that loads a Javascript function to run on page load:

        Dim MasterBody As HtmlGenericControl = Me.Master.body
        MasterBody.Attributes.Add("onload", "DoDetailsCalc()")

Depending upon the users preferences the javascript to run will either be DoDetailsCalc() as shown or DoTotalsCalc(). This is why I load it from code behind.

When I perform an update to the page, I want it to recalculate, this was working fine, until I put a RadAjaxManager on the page.

The page load is no longer firing in this situation.

How do I re run the javascript?

Andy
Sebastian
Telerik team
 answered on 10 Sep 2009
4 answers
168 views
Hi,

I am populating a Rad TreeView manually for the first level and then using a WCF Service when a user expands a node.
This was all working perfectly until today (1st Sept) when I started recieving the javascript error below.

The data contract type 'Telerik.Web.UI.RadTreeNodeData' cannot be deserialized
because the required data members '_attributes, _enabled, _text, _value,
_contentCssClass, _contextMenuID, _cssClass, _disabledCssClass, _disabledImageUrl,
_expandMode, _expandedImageUrl, _hoveredCssClass, _hoveredImageUrl, _imageUrl,
 _navigateUrl, _postBack, _selectedCssClass' were not found. 

Example post data:

{"node":{"Text":"XYZ","Value":null,"ExpandMode":3,"NavigateUrl":"/Child/XYZ75/","PostBack":true,"DisabledCssClass":null,"SelectedCssClass":null,
"HoveredCssClass":null,"HoveredImageUrl":null,"DisabledImageUrl":null,
"ExpandedImageUrl":null,"ContextMenuID":"BUCtxMenu",
"Attributes":[{"Key":"key","Value":"BU-370"},
{"Key":"A","Value":"False"},{"Key":"SIA","Value":"0"}]},"context":[]} 


Would anyone be able to suggest what might be causing this?

Thanks
Jonathan
Top achievements
Rank 1
 answered on 10 Sep 2009
7 answers
222 views
Hi there,

I have a Grid and I have templated the Footer. The problem is that the footer's content is starting half way. The effect is as if the footer is placing content in the second cell of a table.

<table>
    <tr><td>Can't get my content to align over here.<td>    <td> Content in the template starts here                   </td> </tr>
</table>

The above code is to sort of visual represent the problem I am having. I am not using tables in my template at all. I am just curious why the content isn't able to align left.

Any help would be greatly appreciated, thanks!

Jaime
Princy
Top achievements
Rank 2
 answered on 10 Sep 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?