Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
73 views
Hi, I have a strange behaviour in a scrolled radgrid, using server-side selection.

Markup:
<telerik:RadGrid ID="rgCT" runat="server" Width="345" OnNeedDataSource="rgCT_NeedDataSource" 
                             AutoGenerateColumns="false" EnableAjaxSkinRendering="true" AllowMultiRowSelection="true"
                <PagerStyle Mode="NextPrevAndNumeric" /> 
                <SelectedItemStyle BackColor="Gray" ForeColor="White" /> 
                <EditItemStyle BackColor="#F7BD02" ForeColor="Black" /> 
                <MasterTableView TableLayout="Fixed" CommandItemDisplay="None" DataKeyNames="CT_ID"
                    <Columns> 
                        <telerik:GridTemplateColumn UniqueName="Selection" HeaderStyle-Width="10%"
                            <ItemTemplate> 
                                <asp:CheckBox ID="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" 
                                    runat="server"></asp:CheckBox> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridBoundColumn UniqueName="CT_ID" DataField="CT_ID" Visible="false" /> 
                        <telerik:GridBoundColumn UniqueName="CT_NAME" DataField="CT_NAME" HeaderText="CT" HeaderStyle-Width="89%"/> 
                    </Columns> 
                </MasterTableView> 
                <ClientSettings> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" 
                               ScrollHeight="200px"  /> 
                </ClientSettings> 
            </telerik:RadGrid> 

Code-behind:
        protected void ToggleRowSelection(object sender, EventArgs e) 
        { 
            ((sender as CheckBox).Parent.Parent as GridItem).Selected = (sender as CheckBox).Checked; 
        } 

When I touch the vertical scrollbar (even if I don't really "scroll") the selection get cleared.
I see this in the onclick of a button, checking the SelectedIndexes.Count property of the Grid.
When I don't touch the scrollbar all selections are preserved, when I touch it the SelectedIndexes.Count is 0.

Any clue?

Thanks in advance for your help.






Shinu
Top achievements
Rank 2
 answered on 24 Jun 2009
4 answers
163 views
hi 
when i use EnableClientKeyValues="true" in radgrid , i give a error with this content:
this property is not member of radgrid in clientsettings
should set something in web.config???????? or any thing please help me

i use radgrid 2008 and mayradgrid has not this property

very thanks
ali
Top achievements
Rank 1
 answered on 24 Jun 2009
4 answers
88 views
I have figured out how to hide the filter textbox for a column by doing the following:

If TypeOf e.Item Is GridFilteringItem Then 
 
            Dim filteringItem As GridFilteringItem = CType(e.Item, GridFilteringItem) 
            'set dimensions for the filter textbox 
            Dim box As TextBox = CType(filteringItem("CheckBoxTemplateColumn").Controls(0), TextBox) 
            box.Visible = False 

But...

1. how do I hide the filter icon that is next to each text box?

2. how can I add my own custom text in place of it if I want to?

3. how can I hide the filter options I do not want? for instance on a numeric column named "points" I only want "GreaterThan" and GreaterThanEqualTo".

Thanks!
Ramesh
Top achievements
Rank 1
 answered on 24 Jun 2009
2 answers
175 views
Hi,

I create a web server control which contains a radGrid and radAjaxManager, in the same time I add some client capabilities to this web server control reference ASP.NET AJAX tutorials: Adding Client Capabilities to a Web Server Control
I add two client properties:
protected virtual IEnumerable<ScriptDescriptor> GetScriptDescriptors() 
        { 
            ScriptControlDescriptor descriptor = new ScriptControlDescriptor("Unigestion.Web.UI.HTMLGrid"this.ClientID); 
            descriptor.AddProperty("gridClientID"this._radGrid.ClientID); 
            descriptor.AddProperty("ajaxManagerClientID"this._radAjaxManager.ClientID); 
 
            return new ScriptDescriptor[] { descriptor }; 
        } 
 

And in the control's client script, I will get RadGrid and RadAjaxManager object:
Unigestion.Web.UI.HTMLGrid.prototype = { 
 
    initialize: function() { 
        this.$grid = $find(this.gridClientID); 
        this.$ajax = $find(this.ajaxManagerClientID); 
    } 

But when open this page, the client object's $grid and $ajax is null, I checked the page's source find that my control's descriptor js codes is before the radGrid and radAjaxManager:
<script type="text/javascript"
//<![CDATA[ 
Sys.Application.initialize(); 
Sys.Application.add_init(function() { 
    $create(Unigestion.Web.UI.HTMLGrid, {"ajaxManagerClientID":"AjaxManager","gridClientID":"innergrid"}, nullnull, $get("radGrid")); 
}); 
Sys.Application.add_init(function() { 
    $create(Telerik.Web.UI.RadAjaxManager, {"_updatePanels":"","ajaxSettings":[{InitControlID : "AjaxManager",UpdatedControls : [{ControlID:"innergrid",PanelID:""}]},{InitControlID : "AjaxManager",UpdatedControls : [{ControlID:"gridmenu",PanelID:""}]},{InitControlID : "innergrid",UpdatedControls : [{ControlID:"innergrid",PanelID:""}]}],"clientEvents":{OnRequestStart:"OnRequestStart",OnResponseEnd:"OnResponseEnd"},"defaultLoadingPanelID":"","enableAJAX":true,"enableHistory":false,"links":[],"styles":[],"uniqueID":"AjaxManager","updatePanelsRenderMode":0}, nullnull, $get("AjaxManager")); 
}); 
Sys.Application.add_init(function() { 
    $create(Telerik.Web.UI.RadGrid, {"ClientID":"innergrid","ClientSettings":{"AllowAutoScrollOnDragDrop":true,"AllowColumnsReorder":true,"ColumnsReorderMethod":1,"ShouldCreateRows":true,"ReorderColumnsOnClient":true,"DataBinding":{},"KeyMappings":{"ExitEditInsertModeKey":27,"UpdateInsertItemKey":13},"Selecting":{"AllowRowSelect":true,"EnableDragToSelectRows":true},"Scrolling":{"AllowScroll":true,"SaveScrollPosition":true,"ScrollHeight":"300px","UseStaticHeaders":true},"Resizing":{"AllowColumnResize":true,"ClipCellContentOnResize":true,"EnableRealTimeResize":true,"ResizeGridOnColumnResize":true},"ClientMessages":{"PagerTooltipFormatString":"Page \u003cstrong\u003e{0}\u003c/strong\u003e of \u003cstrong\u003e{1}\u003c/strong\u003e"},"KeyboardNavigationSettings":{"AllowActiveRowCycle":false,"FocusKey":89}},"Skin":"Unigestion","UniqueID":"innergrid","_activeRowIndex":"","_controlToFocus":"","_currentPageIndex":0,"_editIndexes":"[]","_embeddedSkin":false,"_gridTableViewsData":"[{\"ClientID\":\"innergrid_ctl00\",\"UniqueID\":\"innergrid$ctl00\",\"PageSize\":10,\"PageCount\":1,\"EditMode\":\"EditForms\",\"CurrentPageIndex\":0,\"VirtualItemCount\":0,\"AllowMultiColumnSorting\":false,\"IsItemInserted\":false,\"clientDataKeyNames\":[],\"_dataBindTemplates\":false,\"_selectedItemStyle\":\"\",\"_selectedItemStyleClass\":\"rgSelectedRow\",\"_columnsData\":[{\"UniqueName\":\"515156\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"FilteringColumn\",\"DataFormatString\":\"{0:#,##0.00}\",\"Display\":true},{\"UniqueName\":\"515154\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"FilteringColumn\",\"DataFormatString\":\"{0:#,##0.00}\",\"Display\":true},{\"UniqueName\":\"515153\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"FilteringColumn\",\"DataFormatString\":\"{0:#,##0.00}\",\"Display\":true}]}]","_groupingSettings":{"GroupContinuesFormatString":" Group continues on the next page.","GroupContinuedFormatString":"... group continued from the previous page. ","GroupSplitDisplayFormat":"Showing {0} of {1} items.","GroupSplitFormat":" ({0})","GroupByFieldsSeparator":"; ","CaseSensitive":false,"ExpandTooltip":"Expand group","CollapseTooltip":"Collapse group","UnGroupTooltip":"Drag out of the bar to ungroup","UnGroupButtonTooltip":"Click here to ungroup","ShowUnGroupButton":false,"ViewState":{}},"_masterClientID":"innergrid_ctl00","allowMultiRowSelection":true,"clientStateFieldID":"innergrid_ClientState"}, {"columnSwapped":OnColumnSwapped,"groupCollapsed":OnGroupCollapsed,"groupExpanded":OnGroupExpanded,"rowContextMenu":OnRowContextMenu}, null, $get("innergrid")); 
}); 
//]]> 
</script> 

How to change these descriptors order?

Thanks,
LP


Liu Peng
Top achievements
Rank 1
 answered on 24 Jun 2009
12 answers
761 views

What is the best way to ensure that there is no default selection in my combo box? I can clear it client side with:

            var combo = $find("<%= RadComboBox1.ClientID %>");  
            combo.clearSelection(); 

but I'd prefer to be able to clear it server side or even better just tell it not to select anything by default in the first place. I've tried the server side .ClearSelection() but I can't seem to get it to work. No matter where I call it (onload, after databind, etc) the first item in the list is still selected.
J
Top achievements
Rank 1
 answered on 24 Jun 2009
1 answer
79 views
I am binding a PanelBar to a XMLDataSource, which works great. Except all XML starts with "root node". Although I do not want the root node shown, I want the "root items" to be the children of the root node. I've tried playing around with it and searching this forum. Anyone have any ideas?

Thanks!
James
Top achievements
Rank 1
 answered on 23 Jun 2009
3 answers
178 views
Hello All

Am having a very bizzare problem with RadNumericTextBox, in fact, am using Ajax 3Q 2008, howver, if i type any given number on this input, it works fine at the first moment, but after i click on any other button the number automatically disapper, however, i again reused the 2006 control, it was fine, until today, the same thing happened even with the 2006.

Am really confused,,,

Hope u can help

Thanks in advanced
Daniel
Telerik team
 answered on 23 Jun 2009
7 answers
301 views

I just downloaded the Q1 2009.  I uninstalled my eval and installed the Q1 2009.  I moved the appropriate DLLs to my project and referenced them.  My website runs fine but the design view is having problems finding RadComboboxes, RadSliders, RadGrids and RadDatePickers.  The RadTextboxes render fine.  I made sure to reference the new Telerik.Web.Design but to no avail.  I thought maybe there was some disconnect because of the split of design.dll (and still do) so I drag and dropped a control to see if this would right the wrong but the dropped control also had the error creating control.

The error reads: "Could not load file or assembly 'Telerik.Web.UI, Version=2009.1.311.35, Culture=...' or one of its dependencies..." Which tells me that it's looking in the wrong DLL it should be looking in Telerik.Web.Design.  I don't know how to tell it where to look though.  Are the RadTextBoxes still rendered (Design) from the Telerik.Web.UI?

Thanks,
Doug

Ravinder
Top achievements
Rank 1
 answered on 23 Jun 2009
1 answer
86 views
If I have a data source delivering columns A, B and C and I want to have the grid display two columns, the first with the contents of A and the second with some function of B & C (assume not achievable via plain SQL), do I have to create invisible gridboundcolumns for B & C and a new gridboundcolumn D and then set D = fn(B,C) etc in the grid's ItemDataBound event? Is this better than referencing the underlying data set in that event? Can anyone point me at some examples of this?

Thanks,
M
Mark H
Top achievements
Rank 1
 answered on 23 Jun 2009
2 answers
49 views
Hi,

I don't know if this is a problem specific to the RadGrid documentation or a problem with the viewer in general but I can't get to a topic 5 levels deep.

Start with this page:
http://www.telerik.com/help/aspnet-ajax/grdbindablepropertytypes.html

And then try to open "Understanding Databinding" then try opening "Telerik RadGrid Binding basics" I'm unable to pull this page up on IE and FF.

Let me know if you need any more info to reproduce the problem.

Thanks,
Jeff



Jeff
Top achievements
Rank 1
 answered on 23 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?