Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
173 views
Hi,

I have a requirement to develop a HTML Grid/Table that display data in the following format:

                                                                                                Col 1    Col 2    Col 3    Col 4
-----------------------------------------------------------------------------------------------------------------
- Row 1                                                                                    100          25        25        50
   - Row 11                                                                                 30          10        10        10  
        - Row 12                                                                            40          15        20        5
            - Row 13                                                                        90          30        30        30
+ Row 2
+ Row 3

Can this format be possible in the RAD Grid using Hierarchical option. If there is any sample code or reference, please let me know.
Column values calculation is not needed. I am looking for the col and row format.

regards,

Parimal

    
Shinu
Top achievements
Rank 2
 answered on 25 Nov 2008
2 answers
134 views
Hi,

VB - Q3

I am binding the tree to an hierarchical table which also has a field called 'imagePath.' I use the image path in the NodeDataBound event to show the different icons for each node.
However, for the root nodes, I only seem to be able to use the 'ImageURL' and SelectedImageURL' for these icons.

 Can I assign these custom images from the DB field 'imagePath' ?

Many thanks,

Jon 
Jon
Top achievements
Rank 1
 answered on 25 Nov 2008
1 answer
144 views

I've got a radGrid that I've put into edit mode for all rows using the PreRender method (by setting the editableitem.edit property).

It works well...all the rows in the grid are in edit mode...except all the rows are highlighted in the Skin's color (in my case, the Vista skin, so the rows are light blue).  All I I want to do is have them show up without the highlight.

 

So, I've tried editableItem.selected = false, but this does not un-highlight the rows.  I've also tried setting the editableItem.style property, all to no avail.  What am I missing?

 

Any advice is appreciated.

Princy
Top achievements
Rank 2
 answered on 25 Nov 2008
1 answer
213 views
Hi,

Currently, I am using GroupByExpressions in the RadGrid as follows:
<GroupByExpressions>
     <telerik:GridGroupByExpression>
       <SelectFields>
          <telerik:GridGroupByField
            FieldName="UnitPrice"
            HeaderText="Price"/>
          <telerik:GridGroupByField
            FieldName="UnitsInStock"
            HeaderText="Units at this price"
            Aggregate="Sum" />
       </SelectFields>
       <GroupByFields>
          <telerik:GridGroupByField
             FieldName="UnitPrice"
             SortOrder="Descending" />
       </GroupByFields>
     </telerik:GridGroupByExpression>
   </GroupByExpressions>


The result looks like:
My Country: Canada; My Items: 3; Group Total : $55,329.30

I would like to ask if it is possible to separate each item using character other than semicolon (;).


Thanks & Regards,

Erwin








Shinu
Top achievements
Rank 2
 answered on 25 Nov 2008
2 answers
100 views
When I drag a dock from one zone to another, how do I capture the ID of the zone the dock is being dragged to within the DockPositionChanged event?

Thanks.
Robb Blacquiere
Top achievements
Rank 1
 answered on 25 Nov 2008
2 answers
147 views
I'd like to change the value of a RadNumericTextBox clientside by clicking another page control:

By control:
<telerik:RadNumericTextBox id="txtQtyPoster" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" runat="server" Type="Number" Skin="Vista" Width="30" Value="0" TabIndex="0"></telerik:RadNumericTextBox>

Rendered to:
<span id="ctl00_cph_cnt_txtQtyPoster_wrapper" class="radInput_Vista" style="white-space:nowrap;"><input type="text" id="ctl00_cph_cnt_txtQtyPoster_text" name="ctl00_cph_cnt_txtQtyPoster_text" class="radEnabledCss_Vista  inputCell" style="width:30px;" /><input style="visibility:hidden;margin:-18px 0 0 0;width:1px;height:1px;overflow:hidden;border:0;padding:0;" id="ctl00_cph_cnt_txtQtyPoster" value="" type="text" /><input style="visibility:hidden;margin:-18px 0 0 0;width:1px;height:1px;overflow:hidden;border:0;padding:0;" id="ctl00_cph_cnt_txtQtyPoster_Value" name="ctl00$cph_cnt$txtQtyPoster" value="" type="text" /><input id="ctl00_cph_cnt_txtQtyPoster_ClientState" name="ctl00_cph_cnt_txtQtyPoster_ClientState" type="hidden" /></span>

My javascript:
var Poster = document.getElementById("<%= txtQtyPoster.ClientID  %>");
Poster.value == "0";

Triying the code below I dont get the RadNumericTextBox object:
var poster = $find("<%= txtQtyPoster.ClientID %>");
Poster.value == "0";

Also,
- when to use document.getElementById and $find?
- what (if any) are the requirements of using $find?

Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 25 Nov 2008
1 answer
160 views
Guys, I'm running into an aesthetic problem that I would like to figure out how to fix.  Basically my docks "appear" after the dockzones themselves have been drawn on the screen.  In a scenario where a lot of docks are on the screen, a second or more may pass before all docks appear in their zones.  I believe I know why this is happening, but I would like to see if there is an architectural solution that will fix this problem as it's rather unpleasing (and confusing) to my users. 

The reason I believe this is happening is because the MyPortal solution sample code adds all dock controls to a single control container (e.g. an updatepanel) that's hidden on the page from the user (invisible).  The docks are docked into their proper zones using javascript, which runs as one of the last operations of the page (multiple calls to the .dock() command).  Basically the entire page gets drawn (including the empty raddockzones themselves) before the docks are added to their proper zones using JavaScript.  This is the solution as coded in the MyPortal example in the code examples page.  When one panel at a time is added to the page this is not that big of a deal, however when multiple panels are added/drawn all at once after the user has chosen a dock configuration and it has been persisted to the database and redrawn for the first time (e.g. on first page load) this problem shows up.

In my implementation, I have created a fully dynamic Portal page that runs off of a Telerik TabStrip and RadLayout complete with RadDockZones and RadDock's.  Basically the user can choose to create tabs (which I then save to an XML Template and create tabs on the Portal page which will contain "Docks" of the user's choosing) that I dynamically add to a RadTabStrip with a MultiPageView.  The user can then choose to add new docks to the page (from a stylized dropdownlist that shows a preview of the control, which I use a RadComboBox for).  I save information about each dock (I call them "Gadgets" a la Windows Vista) into a Gadget option that I serialize into XML.  The Gadget collection belongs to a Tab which lives in a Tabs collection, which lives in a Template XML node.  The tabs render Pages in the MultiPageView which I add Layouts to, which contain Zones that I can dock the gadgets into.

My users can choose dynamic layouts (I have user controls that define RadDockZones in different configurations, e.g. Two Columns, Three Columns, 4 Columns, etc).  I subclass the RadDockLayout and load an inner control with these raddockzones at the proper time in the page lifecycle so that the RegisteredZones collection is built correctly in the Layout.  I also add the Gadgets the user has chosen into the correct zones using javascript (dock() commands given the Zone name the user defines).  I intercept the DockPositionChanged event and make sure that all properties about my Gadgets.  Basically 100% of the page is dynamic, from the tabstrip to the layout, to the dockzones, to the docks themselves.

Instead of an updatepanel, I add my gadgets to a regular panel (I call it pnlGadgetDrop).  I tried using an updatepanel however I get  Microsoft AJAX framework javascript errors complaining about the controls already being registered (I don't have the text in front of me, however this is a common javascript error that shows up on the forums and has something to do with adding radcontrols to an updatepanel that themselves contain subcontrols with updatepanels).  I make sure to add the controls into the panel in the correct order each and every time a postback happens (including any "removed" controls) to keep from getting any viewstate problems.

This all runs beautifully and quite fast.  However my raddocks appear to "flash into life" on the screen.  This behavior does not happen if I add the docks directly to their zones (because then the html is generated before the page begins to load in the browser, instead of using the dock() command in javascript to dock the docks into their proper zones).  However I cannot simply add the docks to their correct zones as the solution to my "flashing" problem (using raddockzone.templatecontrol.controls.add of that dockzone).  If I do this then I will run into viewstate problems whenever the user reorders the controls (because I will be forced to add the controls into their new zones when they are reordered, and this will cause viewstate errors since I'm not restoring the control hierarchy).  This is why the MyPortal example adds the controls to a single control (an updatepanel) and uses the dock method to move them into their proper zones.

Do you guys have any suggestions for how to get rid of that "flashing" problem?  The only solution I can come up with is to mask the problem by showing a modal "Loading" screen until all controls are docked.  Not sure if anyone else has gotten this deep into creating a Portal Management System like I'm doing here and encountered this aesthetic issue of the docks "flashing" in, but if not then FYI.  Only real issue I've had so far though, so that's a good sign (-:

thanks,
Joseph
Joseph
Top achievements
Rank 1
 answered on 24 Nov 2008
2 answers
91 views
Hi. I have a grid that is being created entirely in the code behind, and I need to refer to it in the item command handler. Is there a way that I can make something like this work?:

Public

 

Sub EmployeesGrid_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles

 

EmployeesGrid.ItemCommand

 


variable = EmployeesGrid.Items(rowIndex 1)("column").Text
EmployeesGrid.Rebind()

End
Sub

 

 

 

When the grid is created statically this code isn't a problem, but when it's created programmatically, I get an object not set to an instance of an object error.

William
Top achievements
Rank 1
 answered on 24 Nov 2008
1 answer
125 views

I am using a RadGrid with several editor columns, including a CheckBox, DropDownList (RadComboBox style), and a Template column.

When editing, I'm easily able to get a handle on these controls using the following code:

if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
            {  
                RadComboBox list = (e.Item as GridEditableItem)["MethodColumn"].Controls[0] as RadComboBox;  
                Prometheus.SetRadComboBoxHeight(list,_maxComboBoxItems,_pixelsPerComboBoxItem);  
                list.AutoPostBack = true;  
                list.SelectedIndexChanged += MethodRadComboBox_SelectedIndexChanged;  
            } 

This works in both the ItemCreated event as well as in the ItemDataBound event of the grid. I've also gotten it to work using the GetColumnEditor function.

But, when adding (by simply setting the MasterTableView.IsItemInserted value = true in a RadToolBar button click), this same code above  does not work.  The GetColumnEditor function returns null, and the method above (...["ColumnName"].Controls[0]) returns a literal object.  Is there something specific I need to do for an "Add" in order to get a handle on these controls?

I've spent the better part of a day on this and frankly, I'm stumped.

tjans
Top achievements
Rank 1
 answered on 24 Nov 2008
2 answers
177 views
Greetings,

Ok, so here is what's going on.  I'm using a RadGrid with a RadToolBar to display some data.  On the toolbar, I have a button called Deny Membership.  Upon clicking it, it pops up a RadWindow with two labels in it, along with a RadTextbox and an ASP:Button.  Upon clicking the button, the page does some database calls to delete a user out of a table.

Ok, here is the part I'm having trouble with.  Once that is done, at the end of the Click Event, I have a label's (the first one on the page) text set to the following:

lblReason.Text = "<script>RefreshParentPage()</" + "script>"

That works fine, so the page starts that function as follows:

<script type="text/javascript">  
            function GetRadWindow() {  
                var oWindow = null;  
                if (window.radWindow)  
                    oWindow = window.radWindow;  
                else if (window.frameElement.radWindow)  
                    oWindow = window.frameElement.radWindow;  
                return oWindow;  
            }  
 
            function RefreshParentPage()  
            {  
                GetRadWindow().BrowseWindow.location.reload();  
            }  
        </script> 

This is an example that I found on the Telerik site to close out a RadWindow and refresh the parent page.  The problem is, I get a javascript error on GetRadWindow().BrowseWindow, saying it is null or not an object.  I'm unsure what to do with this.  Any ideas?  Thanks.

~ Chad
Chad Johnson
Top achievements
Rank 1
 answered on 24 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?