Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
144 views
Hi All --

I've implemented a solution very, very similar to this one:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectrowwithcheckbox/defaultcs.aspx

With a few exceptions, such as I removed the header Select All and the select/unselect command buttons.  And I'm using client scrolling instead of paging, but I am still loading all (50 or so) records at once -- no virtual scrolling or anything.

This all works perfectly as advertised...Until... I move the scroll bar on the grid up or down (even just a little) -- and on my next postback (like clicking the checkbox), I've lost all the previously selected items and only the one I just selected remains selected.

I can select all the items that are in my current scroll window just fine, but the minute I move the scroll bar, they're gone on postback.

This doesn't happen if I remove the code below:

<

 

ClientSettings>

 

 

<Scrolling AllowScroll="True" ScrollHeight="400px" UseStaticHeaders="true">

 

 

</ClientSettings>

 


And let the grid grow.

Any suggestions?

Thanks

Troy
Shinu
Top achievements
Rank 2
 answered on 22 Jun 2009
0 answers
130 views
Hi , 
       i have one buton in panel items.

<

asp:Button ID="btn1" runat="server" Text="Click me" OnClientClick="return Valdate();"  OnClick="btn1_Click" />

 


When i click on button it goes to client side function and validate the fields.
My function returns true and false depends upon the validation.
if i retrun True it it dosent fires to severside
 btn1_Click event.
if i put the button outside the panel it works fine.
here is sample code 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="100%">

 

 

<telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="100%" >

 

 

<Items>

 

 

<telerik:RadPanelItem Expanded="True" Value="RegistrationInformation1" style="font-weight:bold" Text="Step 1: User Information" runat="server" Selected="true">

 

 

<Items>

 

 

<telerik:RadPanelItem Value="RegistrationInformation" runat="server">

 

 

<ItemTemplate>

 

 

<asp:Table ID="tblRegistration" BackColor="#eeeeee" Width="100%" runat="server" >

 

 

 

</asp:Table>

 

 

<table width="100%">

 

 

<tr>

 

 

<td align="right">

 

 

<asp:Button ID="btn1" runat="server" Text="Click me" OnClientClick="return Valdate();" OnClick="btn1_Click" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

 

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

<CollapseAnimation Duration="100" Type="None" />

 

 

<ExpandAnimation Duration="100" Type="None" />

 

 

</telerik:RadPanelBar>

 

I am reffering same example .Here is following link.

http://demos.telerik.com/aspnet-ajax/panelbar/examples/applicationscenarios/accessingnestedcontrols/defaultcs.aspx

Thanks
Shrirang


Shrirang
Top achievements
Rank 1
 asked on 22 Jun 2009
1 answer
91 views

Hi,

How i can able to display the title of the rad sliding pane as mention below.

M
O
N
T
H

Righ now i cant able to display the title like this. Can any one help me to tell how i can able to achieve this.?

Thanks and Regards,
Sushanth Mathew
Svetlina Anati
Telerik team
 answered on 22 Jun 2009
1 answer
71 views
As the topic says I want to find a way to have only one opened node at every level.
Any ideas guys?
Thank you very much!
Stavros
Top achievements
Rank 1
 answered on 22 Jun 2009
1 answer
61 views
Hi all,

I am using soe paging. and using item template to simulate listview. the porblem is that when change page from the initial page the layout will change the width become small. actaully for the initial page: page.aspx and page.aspx?page=1 will display different width. 

any suggestion?

TIA

Jerry
 
Pavlina
Telerik team
 answered on 22 Jun 2009
2 answers
103 views
Hi I have looked at the code demos and looked at the calendar sample site and would like to know why the function that i'm trying to loosely base on day render function doesn't want to work this is my code
  TableCell currentCell = new TableCell();  
            RadCalendarDay day = new RadCalendarDay(RadCalendar1);  
            MonthView view = new MonthView(RadCalendar1);  
 
            Telerik.Web.UI.Calendar.DayRenderEventArgs e = new Telerik.Web.UI.Calendar.DayRenderEventArgs(currentCell, day,view);  
 
            DateTime CurrentDate = RadCalendar1.SelectedDate;  
            backgroundColor1 = Color.Red.Name;  
            backgroundColor = Color.Green.Name;            
 
            currentCell = e.Cell;  
            currentCell.Style["background-color"] = backgroundColor;  
 
            string Connection = "Data Source=62.197.41.101; Initial Catalog=PilotWebApp; User ID=sa; Pwd=medularis;";  
 
            SqlConnection conn = new SqlConnection(Connection);  
            SqlCommand cmd = new SqlCommand("Slot_sp_EngineerTimeslots_Group", conn);  
            cmd.CommandType = CommandType.StoredProcedure;  
            cmd.Parameters.AddWithValue("@PROPREF", strPropref);  
            cmd.Parameters.AddWithValue("@PRIORITYCODE", PRIORITYCODE);  
            cmd.Parameters.AddWithValue("@JOBLENGTH", "30");  
            cmd.Parameters.AddWithValue("@TIMESLOT", "AT");  
            conn.Open();  
            SqlDataReader reader = cmd.ExecuteReader();  
            DataTable dt = new DataTable();  
            dt.Load(reader);  
            DayOfMonth = DateTime.Today.Day;  
 
            int rows = dt.Rows.Count;  
            endDate = RadCalendar1.SelectedDate.AddDays(rows);  
 
            foreach (DataRow dr1 in dt.Rows)  
            {  
                startDate = DateTime.Parse(dr1["BookedDate"].ToString());  
 
                if (CurrentDate >= startDate.Date && CurrentDate <= endDate.Date)   
                {  
                    Label label = new Label();  
                    label.Text = e.Day.Date.Day.ToString();  
                    label.BackColor = System.Drawing.Color.Green;  
                    e.Cell.Controls.Add(label);  
 
                    // disable the selection for the specific day  
                    RadCalendarDay calendarDay = new RadCalendarDay();  
                    calendarDay.Date = CurrentDate;  
                    calendarDay.IsSelectable = true;  
                    RadCalendar1.SpecialDays.Add(calendarDay);  
                }  
                CurrentDate.AddDays(1);  
            } 

what i need it do do is colour the cells that dont fit into the if statement red is there anything that i can do?
Kevin
Top achievements
Rank 1
 answered on 22 Jun 2009
1 answer
101 views
I have read in RadControlsAJAXCourseware.pdf that I can do text-wrapping manually using style="white-space: normal;" for a node with long text.
How can I do that in the code behind for all nodes (checking with a loop for example every node text if it is beyond a specific length and applying the style).
Thank you very much!
Stavros
Top achievements
Rank 1
 answered on 22 Jun 2009
2 answers
181 views

Hey!

I have a RadGrid that performs a CallBack on Update and Insert. The Code is executed correctly and the Item is updated/inserted in my Collection but on the Client the RadGridItem stays in EditMode. I tried setting item.Edit = "false" at the end of my Insert/Update Method but this did not work and threw an exception.

I'm confused because I thought the default behaviour was for the Item to close after editing. Am I missing something in my RadGrid configuration?

<telerik:RadGrid ID="gridVariables" runat="server" GridLines="None" AllowPaging="True" 
                            AllowSorting="true" CssClass="evaluation_grid" AllowMultiRowEdit="false" 
                            meta:resourcekey="gridVariables" 
                            onneeddatasource="gridVariables_NeedDataSource"   
                            Skin="<%# RadSkin %>" 
                            onupdatecommand="gridVariables_UpdateCommand" 
                            OnItemDataBound="gridVariables_ItemDataBound" 
                            ondeletecommand="gridVariables_DeleteCommand" 
                            oninsertcommand="gridVariables_InsertCommand" 
                            oncancelcommand="gridVariables_CancelCommand" 
                            AllowAutomaticUpdates="true" AllowAutomaticInserts="true" AllowAutomaticDeletes="true" 
                            PageSize="10" > 
                        <PagerStyle Mode="NextPrevAndNumeric" /> 
                        <ValidationSettings EnableValidation="false" /> 
                        <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" TableLayout="Fixed" DataKeyNames="Id" ClientDataKeyNames="Id, Shortname" CommandItemDisplay="Top">  
                            <Columns> 
                                <telerik:GridBoundColumn UniqueName="Id"  DataField="Id" Visible="false">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="ShortnameColumn"  DataField="Shortname"   
                                        meta:resourcekey="gbcShortname">  
                                        <HeaderStyle Width="70px"/>  
                                </telerik:GridBoundColumn> 
                                <telerik:GridTemplateColumn UniqueName="NameColumn"    
                                        meta:resourcekey="gbcName">  
                                    <ItemTemplate> 
                                        <p> 
                                            <%# Eval("Name")%> 
                                        </p> 
                                    </ItemTemplate> 
                                    <EditItemTemplate> 
                                        <asp:TextBox ID="txtName" Width="90%" Enabled="false" runat="server" Text='<%# Bind("Name") %>' /> 
                                    </EditItemTemplate> 
                                </telerik:GridTemplateColumn> 
                                <telerik:GridBoundColumn UniqueName="DescriptionColumn"  DataField="Description"   
                                        meta:resourcekey="gbcDescription">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="UnitColumn" DataField="Unit"   
                                        meta:resourcekey="gbcUnit">  
                                        <HeaderStyle Width="70px"/>  
                                </telerik:GridBoundColumn> 
                                <telerik:GridTemplateColumn UniqueName="ChangeAttributeColumn">  
                                    <HeaderStyle Width="30px"/>  
                                    <ItemTemplate> 
                                        <asp:ImageButton ID="btnChangeAttribute" runat="server" BorderWidth="1" CommandArgument='<%# Eval("Shortname") %>' ImageUrl="~/Img/change.gif" meta:resourcekey="btnChangeAttribute" OnPreRender="btnChangeAttribute_PreRender" /> 
                                    </ItemTemplate> 
                                    <EditItemTemplate> 
                                          
                                    </EditItemTemplate> 
                                </telerik:GridTemplateColumn> 
                                <telerik:GridEditCommandColumn CancelImageUrl="~/Img/Cancel_red.gif"   
                                EditImageUrl="~/Img/Edit.gif" 
                                UniqueName="EditColumn"   
                                UpdateImageUrl="~/Img/Update.gif"   
                                ButtonType="ImageButton" 
                                meta:resourcekey="vrEditColumn">  
                                <HeaderStyle Width="50px" /> 
                                </telerik:GridEditCommandColumn> 
                                <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" ButtonType="ImageButton">  
                                    <HeaderStyle Width="30px"/>  
                                </telerik:GridButtonColumn> 
                            </Columns> 
                            <CommandItemTemplate> 
                                <div style="padding:10px 0px;">  
                                    <asp:ImageButton Text="Neu" meta:resourcekey="newValueColumn" 
                                        ID="btnNew" runat="server" CommandName="InitInsert" ImageAlign="Left" ImageUrl="~/Img/New.gif" 
                                        CausesValidation="false" OnPreRender="btnNew_PreRender" 
                                        Visible='<%# !gridVariables.MasterTableView.IsItemInserted %>' /> 
                                    <asp:LinkButton ID="btnNewVariable" CommandName="InitInsert" OnPreRender="btnNewVariable_PreRender" Visible='<%# !gridVariables.MasterTableView.IsItemInserted %>' CausesValidation="false" runat="server" Height="18px" meta:resourcekey="newValueColumn" /> 
                                </div> 
                            </CommandItemTemplate> 
                        </MasterTableView> 
                        <ClientSettings>    
                            <ClientEvents OnRowDblClick="rowDoubleClick" />    
                            <Selecting AllowRowSelect="True"></Selecting> 
                        </ClientSettings> 
                    </telerik:RadGrid> 
Peter
Top achievements
Rank 1
 answered on 22 Jun 2009
2 answers
70 views
Hello,

My code has not changed and I have just noticed a pb appeared since v 527 clientside:
when I do a select in the tree inside combo, the selected value goes normally in combo and combo close its panel, but if I try to open again the combo, there is no treeview displayed. Gone ?
The selected value is still Ok....but users have only one try, no morechance to change their mind .....very selective.

Thanks for a solution.

CS
CSurieux
Top achievements
Rank 2
 answered on 22 Jun 2009
1 answer
98 views
Hi.

First at all i describe my scenario.

I have a rad tabstrip with 2 tabs tied to a multipage control with 2 pages.

In the multiplage control i have:

in page 1 is contained a rad grid with sorting and paging but using onneed_datasource event handler and a 100 records page limit

in page 2 i have a html table with a button.

The problem.
when the page first load, i can see both the grid in page1 and the table in page2 when i click each tab in the parent control, but ......

if i click in the grid's pager the "4" to go to the grid's page 4,   ( record 301 to 400),
the grid show accurately its 4th page  ( record 301 to 400) but the multipage control loses the table and button in its page2,
instead of it i see again the grid, i mean doesnt matter what tab i click, i always see the grid

Any lead of solution for this ?.

Thx

Lester

Paul
Telerik team
 answered on 22 Jun 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?