Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
117 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
108 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
276 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
262 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
269 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
177 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
160 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
297 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
191 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
0 answers
160 views
Hi,

I have an update panel in that i have "RadScheduler" and other controls...

I have added one Appointment with "Reminder" of 5 min. as well as daily "Recurrence" as every 1 day...

Now "Reminder dialog" displayed and i press "Dismiss" it will trigger ReminderDismiss event than AppointmentUpdate and finally AppointmentInsert events

In dismiss event i have just add code that update Reminder field in database...
In AppointmentUpdate event i have just updated RecurrenceRule with Exceptions Date that will add "SU EXDATE" to RecurrenceRule...
In AppointmentInsert event i just add new Simple Appointment same as previously added appointment but with no RecurrenceRule. So the Recurrence start from next day and today will be excluded.

For Rebinding Appointments from database, In AppointmentInsert event i added the code to Rebind data. But, it will not effect on RadScheduler and when click on edit/delete it ask for "this occurrence or series to Edit/Delete?". However when i click other linkbutton or button from the page, it will Rebind RadScheduler and Scheduler and updated as i want.

I have tried Response.Redirect in AppointmentInsert event but it shows me error because of CallBack event. So i thought that if it is CallBack event RadScheduler can not able to rebind. Even i can not change any element of aspx page.

So if possible i want to know after all event Called (ReminderDismiss->AppointmentUpdate->AppointmentInsert) when dismiss pressed, In which event i suppose to do Response.Redirect or RadScheduler Rebind() / Databind() ... ?
umesh prajapati
Top achievements
Rank 1
 asked on 27 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?