Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
78 views
Hi, How can I persist grid selection using client-side API.
I've tried http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html but doesnt work for me, I think is because im using radbutton in templates columns like this. Im doing server-side binding. But when I change page, and back im loosing selection

<Columns>
<Telerik:GridTemplateColumn UniqueName="Assigned" HeaderText="Assigned">
<ItemTemplate>
<Telerik:RadButton ID="rbAssigned" runat="server" ToggleType="CheckBox" ButtonType="ToggleButton"
AutoPostBack="false" Skin="Forest" EnableEmbeddedSkins="true" EnableEmbeddedBaseStylesheet="true"
OnClientLoad="ButtonLoad">
<ToggleStates>
<Telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleCheckboxChecked" Selected="true" />
<Telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleCheckbox" />
</ToggleStates>
</Telerik:RadButton>
</ItemTemplate>
<ItemStyle Width="50px" />
</Telerik:GridTemplateColumn>
Martin
Top achievements
Rank 1
 asked on 27 Sep 2011
2 answers
100 views
I have an array bound to RadGrid.
I can use the <%#Eval method to get the values in the root of the array in the aspx file. However, there is one particular value which is inside an array where I do not know how to get it.

eg of the array structure
customername   Michael
    customerdetails
         specialremarks   xxxxxxxx
  
How can I get the value for specialremarks ?

I tried the itemdatabound but to no avail.

Any help is much appreciated

Thank you
vincent
Top achievements
Rank 1
 answered on 27 Sep 2011
1 answer
79 views

 

on clicking GridEditCommandColumn postback occours but not able to perform inline editing..what methods i need to implement,i want to bind dropdown on editing that too from code behind,so where should i write that method

 

Princy
Top achievements
Rank 2
 answered on 27 Sep 2011
1 answer
219 views
Hi Team,

I have a radGrid with a nested table which contains radList View and I have to style it as shown in the attachment(Nested_Table.jpg), here i can have multiple rows selected/active/expanded at one point of time.
I am facing 2 issues right now
1. I am a able to use rgSelected class to style the selected row but dont know how style the row which is nested below as shown in(Nested_Table_1.jpg)
2. When multiple rows are expanded if i select a row manually the other two rows are losing the style as shown in (Nested_Table_2.jpg)

the skin i am using for this is
<rad:RadGrid runat="server"
    SkinID="CSFSelectionGrid"  
    HeaderStyle-Wrap="true"
    ItemStyle-Wrap="true"
    AlternatingItemStyle-Wrap="true"
    AllowFilteringByColumn="false"
    EnableEmbeddedSkins="false"
    EnableEmbeddedBaseStylesheet="false"
    GroupingSettings-CaseSensitive="false"
    CssClass="SimpleGrid"
    ImagesPath="~/Skins/Plain/Grid"
    AllowMultiRowSelection="true" >           
        <ClientSettings AllowColumnsReorder="False" ReorderColumnsOnClient="False" AllowExpandCollapse="True">
                        <Selecting AllowRowSelect="True"/>
                        <Scrolling AllowScroll="false" UseStaticHeaders="True"/>
        </ClientSettings>
        <MasterTableView AllowNaturalSort="false" AllowCustomSorting="true" >
             
        </MasterTableView>
</rad:RadGrid>
 and the class changes are
.SimpleGrid .rgSelectedRow td,
.SimpleGrid .rgSelectedRow td.rgSorted
{
    background-color:#b0c5da;
    border-bottom:1px solid #ccc !important;
}
and the server code is
protected void RequestCSFs_ItemCommand(object source, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem)
    {
        ((GridDataItem)e.Item).ChildItem.FindControl(NESTED_VIEW_TEMPLATE_PANEL).Visible = e.Item.Selected = !e.Item.Expanded;
    }
}

Please suggest me how to achieve the desired result.
Thanks,
Preetham
Preetham
Top achievements
Rank 2
 answered on 27 Sep 2011
4 answers
217 views
Hi,

I have got a problem when using the setActive Javascript function on a RadWindow. The error is :
"Sys.ArgumentNullException: Value cannot be null.Parameter name: element".

I don't understand why the parameter is null. The parameter corresponds to oWnd._popupElement.

May anyone help me fixing this error ?

Below is an extract of the Javascript code that generates the exception :

// 1) User-code file, launched at body:onLoad() event
var oWnd = $find("helpWindow");
oWnd.setSize(400,500);
oWnd.setActive(false);
 
// 2) Telerik code file
setActive:function(c){var f=this._popupElement;
if(!c){Sys.UI.DomElement.addCssClass(f,"rwInactiveWindow"); // f is null
[...]
 
// 3) Microsoft ASP.Net Ajax code file
Sys.UI.DomElement.addCssClass = function Sys$UI$DomElement$addCssClass(element, className) {
    /// <summary locid="M:J#Sys.UI.DomElement.addCssClass" />
    /// <param name="element" domElement="true"></param>
    /// <param name="className" type="String"></param>
    var e = Function._validateParams(arguments, [
        {name: "element", domElement: true},
        {name: "className", type: String}
    ]);
    if (e) throw e; // The exception is thrown here
    if (!Sys.UI.DomElement.containsCssClass(element, className)) {
        if (element.className === '') {
            element.className = className;
        }
        else {
            element.className += ' ' + className;
        }
    }
}

The RadWindow that is used is described in the following aspx code-file :

<telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
    ReloadOnShow="true" runat="server" EnableShadow="true">
    <Windows>
        <telerik:RadWindow ID="HelpWindow" runat="server" NavigateUrl="Help.aspx"
            ReloadOnShow="true" VisibleOnPageLoad="false" ShowContentDuringLoad="false"
            Behaviors="Close, Maximize, Resize" Width="500px" Height="400px" Modal="true"
            Animation="Fade" KeepInScreenBounds="true" RestrictionZoneID="form2" AutoSizeBehaviors="Height">
        </telerik:RadWindow>
WolveFred
Top achievements
Rank 1
 answered on 27 Sep 2011
3 answers
234 views
Hello,

I have checked the choices "auto-generate edit column at runtime" and "auto-generate delete column at runtime" to the "rows drag and drop shipped orders datagrid". i' m trying to write the corresponding events so as to give functionality to the edit and delete link buttons. How could i catch these events (i can't catch them with ItemCreated and ItemCommand events). Could you please give me some help?

Also, when i set to EditMode the value InPlace i can't see the "cancel link button" and a part of "insert link button" when i press the "Add new record" button.

Thank you very much.
Pavlina
Telerik team
 answered on 27 Sep 2011
1 answer
129 views
Hi, I am new to Telerik.  In standard MS treeview, there is a property "Expand Depth".  On the first load, the treeview will expand to the level you set in expand depth.  What is the equivalent property in RadTreeview?  Or how can I achieve that behavior? 

I bind the RadTreeview to a datatable.  I modified my query to to limit the dataset to only first two levels of nodes.  By doing that, however, I lost the little plus sign in front of the low level nodes.  So, I can't expand it via server side load-on-demand. 

Thank you in advance for your help!
Plamen
Telerik team
 answered on 27 Sep 2011
3 answers
131 views
Hi there,
    I have a radgrid with a subgrid in it. I have enabled the client selection and its working fine for me. But here it allows the user to select both the main grid and the sub grid rows. I want to disable the subgrid row selection and only enable main grid row selection. Any idea to do this ? Your help would be highly appreciated. Below is the grid styling code for your reference
<radG:RadGrid ID="radGdCopy" runat="server" AutoGenerateColumns="False" Skin="Office2007"
                                                                                                                            Width="100%" UseEmbeddedScripts="false" GridLines="None" AllowPaging="True" AllowSorting="True"
                                                                                                                            PageSize="10">
                                                                                                                            <MasterTableView CommandItemDisplay="None" Name="ParentGrid">
                                                                                                                                <CommandItemTemplate>
                                                                                                                                    <asp:Label ID="lblHeader" runat="server"></asp:Label>
                                                                                                                                </CommandItemTemplate>
                                                                                                                                <Columns>
                                                                                                                                    <radG:GridClientSelectColumn UniqueName="ClientSelectColumn" >
                                                                                                                                        <HeaderStyle HorizontalAlign="Center" Width="23px" />
                                                                                                                                    </radG:GridClientSelectColumn>
                                                                                                                                    <radG:GridBoundColumn DataField="ID" UniqueName="ID" Visible="False">
                                                                                                                                    </radG:GridBoundColumn>
                                                                                                                                    <radG:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name">
                                                                                                                                    </radG:GridBoundColumn>
                                                                                                                                    </Columns>
                                                                                                                                <DetailTables>
                                                                                                                                    <radG:GridTableView ShowHeadersWhenNoRecords="False" GridLines="None" runat="server"
                                                                                                                                        Name="ChildGrid"  AllowSorting="True">
                                                                                                                                        <Columns>
                                                                                                                                            <radG:GridBoundColumn DataField="subID" HeaderText="subID"
                                                                                                                                                UniqueName="subID">
                                                                                                                                            </radG:GridBoundColumn>
                                                                                                                                            <radG:GridBoundColumn DataField="subName" HeaderText="subName" UniqueName="subName">
                                                                                                                                            </radG:GridBoundColumn>
                                                                                                                                           </Columns>
                                                                                                                                                                                                                                                                         </radG:GridTableView>
                                                                                                                                </DetailTables>
                                                                                                                                <%--  <RowIndicatorColumn>
                                                                                                                                <HeaderStyle Width="20px" />
                                                                                                                            </RowIndicatorColumn>--%>
                                                                                                                                <ExpandCollapseColumn>
                                                                                                                                    <HeaderStyle Width="20px" />
                                                                                                                                </ExpandCollapseColumn>
                                                                                                                            </MasterTableView>
                                                                                                                            <PagerStyle Mode="NextPrevAndNumeric" />
                                                                                                                            <ClientSettings EnableClientKeyValues="true" ApplyStylesOnClient="true">
                                                                                                                                <Selecting AllowRowSelect="True" />
                                                                                                                                <ClientEvents  OnRowSelected="Copy_RowSelected" OnGridCreated="Copy_GridCreated" />
                                                                                                                            </ClientSettings>
                                                                                                                        </radG:RadGrid>

    
Thanks
Shafi
Princy
Top achievements
Rank 2
 answered on 27 Sep 2011
3 answers
240 views
hello,


i am using the export to excel feature of radgrid. i need to add some formats to specific cells which should also be exported:

1. setting back-color of certain cells based on the data -> i want to mark the best %-value of the cells in one row but not in every row.
if i set the backcolor of the cell it has no effect on the export. i found some solutions how the set the style at export but i need this also when viewing the grid online. how can this be accomplished without implementing it twice? where should i put the code and how can i access the data needed to decide whether to set the back color or not.

2. setting a thicker border to certain areas:
i found some old forum posts to alter the border but this has an effect to all borders. i need to set some thick borders around certain areas also based on data/structure. during creating the data for my grid i could save the row and column information i need and later i would like to set the border around rows 2-5 and cell 0-10 for example.
the grid exports the usual grid lines (border=1 and black) which should stay as it is.


hope someone can help me out on that

regards
Mira
Telerik team
 answered on 27 Sep 2011
3 answers
153 views
Hi,

is it possible to display the ExpandedImage of a node, even if the node has no childNodes (is empty)?

At the moment there is a plus sign in front of a node before you expand it.
If you expand a node which is NOT empty there will be a minus sign,
but if you expand a node which is empty there will be no minus sign (only the lines).

Is there any attribute to change this behaviour?

thank you!
Plamen
Telerik team
 answered on 27 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?