Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
171 views
I have a RadTextBox that is having its value attribute set via javascript/ajax call $telerik.$.get. This works great except that when the control receives focus, the text is erased??? How can I turn this off? There is no code set for the onfocus event.
Kevin Price
Top achievements
Rank 1
 answered on 16 Dec 2010
3 answers
314 views
Hi guys,

I have a RadGrid which is populated dynamically by SQL queries at runtime.  I would like to add a total field for numeric columns in the footer, but since the column can be anything potentially, how do I programmatically determine the type of this column at runtime?  I'm aggregating the total in the RadGrid's ItemDataBound event and looking to potentially storing the total for each relevant column in a hash table (using the column name as the key).

Cheers,
Norman
Veli
Telerik team
 answered on 16 Dec 2010
1 answer
43 views
Hi,

i've made change in radgrid javascript events to overcome limitations of dealing with ID="data field name" and it works nice for initial load:
<asp:HyperLink runat="server" Text="{Name}" bindfield="Name,ID" exportformats="html" OnPreRender="hlName_PreRender" />
<asp:Label runat="server" Text="{Name} for PDF" exportformats="pdf" bindfield="Name" />
<asp:Label runat="server" Text="{Name} for Excel" exportformats="excel" bindfield="Name" />
As you can see, i need more flexible way to manage fields. In your case, I cannot created 2 fields referencing the same datafield in the same ItemTemplate. Here I am having separate field sets for exporting into various formats. { } stands for Eval :)

I wonder why you have not used any custom attribute for WebControl, which would stand for DataField - you may add any - but instead sticked to ID and made serious usability limitations... :(

Anyway, now i have the problem with this: if I use ID="data field name" - sorting works as expected, but if I use my approach, without ID, correct data is returned from webmethod as before and dataSource is ok, but the grid is NOT sorted. Please, tell me what should i change in order it did sorting! :) I need it very much, but I don't have idea,  where in the code you check for ID to use it somehow for sorting...
Alexander
Top achievements
Rank 1
 answered on 16 Dec 2010
1 answer
366 views
I ve the following code for displaying multi column combobox.
1) I want the table to get automatically resize instead of me setting the width. What should I do to make the table automatically resizable?
2) Also if I make the width to get the horizontal scrollbar appear, it just moves the data in the table and not the header. What should I do to have the header move?
<telerik:RadComboBox ID="rcbCategory" Runat="server" DataSourceID="dsCategories" DataTextField="Description" DataValueField="Code" AppendDataBoundItems="true" EmptyMessage="Select category..."Width="200px" DropDownWidth="500px" EnableVirtualScrolling="true" HighlightTemplatedItems="true" MarkFirstMatch="true">
<HeaderTemplate>
<table style="width: 480px" cellspacing="0" cellpadding="0">
<tr>
<th style="width: 100px;">Code</th>
<th style="width: 100px;">Description</th>
<th style="width: 100px;">Division</th>
<th style="width: 180px;">Department</th>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 480px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 100px;"> <%#DataBinder.Eval(Container.DataItem, "Code")%></td>
<td style="width: 100px;"> <%#DataBinder.Eval(Container.DataItem, "Description")%> </td>
<td style="width: 100px;"> <%#DataBinder.Eval(Container.DataItem, "Division")%> </td>
<td style="width: 180px;"> <%#DataBinder.Eval(Container.DataItem, "Dept")%> </td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>

 

Kalina
Telerik team
 answered on 16 Dec 2010
4 answers
104 views
Hi,

For a page with a scheduler control on it, I would like to have a refresh function. The scheduler gets it's data from a WCF webservice. I would like to use that to read appointments again and to prevent a postback begin fired. What clientside JS method is available for reading / refreshing all appointments on the current timeframe of the scheduler control?
Nikolay Tsenkov
Telerik team
 answered on 16 Dec 2010
1 answer
50 views
how to increase width for radDropDowncolumn in radgrid
Shinu
Top achievements
Rank 2
 answered on 16 Dec 2010
4 answers
334 views
I have a dynamically built radgrid which outputs a list of products and their unit price. 
I have also created a template column for the grid which puts a textbox on each row so that a user can enter a quantity.

What I need to do is have some javascript so that when a user enters the quantity into the textbox for a given row, the cost of the unit price multiplied by the quantity is displayed on the row in another column, under the header text "Line Total", and the total of these for all of the rows is displayed at the bottom of the grid.

I also need to be able to have several of these grids on the same page and have the total for all grids displayed at the bottom of the page.

I have managed to get the grids all built ok and have the textboxes output but am really stumped as to how to proceed.

ANY help would be appreciated...

Thanks in advance,
Karl

Karl
Top achievements
Rank 1
 answered on 16 Dec 2010
3 answers
100 views
I'm using Telerik.Style.Version 2009.3.1103. In my Telerik.skin file I have the following:

<telerik:RadComboBox

 

 

SkinID="RadCombobox_MultiSelect_Standard"

 

 

runat="server"

 

 

AllowCustomText="true"

 

 

HighlightTemplatedItems="true"

 

 

ChangeTextOnKeyBoardNavigation="False"

 

 

MarkFirstMatch="true"

 

 

Mode="MultiMode"

 

 

Width="100%"

 

 

MaxHeight="150px"

 

/>

 



 


In my ASPX file for my RadComboBox I have the following:

<

 

div class="small">

 

 

<p>

 

 

<aca:RefDataLabel ID="lblStatus" runat="server"></aca:RefDataLabel></p>

 

 

<afs:RadComboBox runat="server" ID="rcbStatus" SkinID="RadCombobox_MultiSelect_Standard"

 

 

DisplayType="Value">

 

 

</afs:RadComboBox>

 

 

</div>

 

When I run my page in IE 8 with compatible mode 'On', I'm able to see my combo box normally. If I turn 'Off' the compatible mode, the combobox basically shows only the arrow to click. So, its size is reduced to zero.

I have seen some issue related to the size of radcombobox being increased instead of decreased for the same scenario I described above. But, even for that I didn't find a solution provided officially by Telerik.

Thank you in advance for your time.

Kind Regards,
Gent

 

 

 

 

 

 

Yana
Telerik team
 answered on 16 Dec 2010
1 answer
96 views
I am having following markup for radCombo

<telerik:RadComboBox ID="rcbNewCategory" runat="server" Width="250px" Height="100px" Skin="Office2007"
                   AllowCustomText="true" ShowToggleImage="true" ShowMoreResultsBox="True" DataTextField="CategoryName" DataValueField="ID"
                    EnableLoadOnDemand="true"
                      EnableVirtualScrolling="true" HighlightTemplatedItems="true"  
                     Visible='<%# FillCategory(DataBinder.Eval( Container, "DataItem.ID")) %>' >
                    <ItemTemplate>
                        <div>
                        <asp:UpdatePanel ID="pnl2" runat="server">
                        <ContentTemplate>
                        <div onclick="stopPropagation(event)" >
                            <asp:CheckBox runat="server" ID="chkCat" Checked="false" OnCheckedChanged="chkCat_Changed"
                            ToolTip='<%# DataBinder.Eval(Container,"DataItem.CategoryName") %>' AutoPostBack="true"/>
                            <asp:Label runat="server" ID="Label2" Text='<%# DataBinder.Eval(Container,"DataItem.CategoryName") %>'>                                   
                            </asp:Label>
                            </div>
                            </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </ItemTemplate>
                </telerik:RadComboBox>

It works fine. Even if i click inside checkbox, I can update the combobox Text with ";" seprated values.

But if i have to use ItemRequested event to show only 10 items at a time,
//OnItemsRequested="rcbNewCategory_ItemsRequested"
It fails on checkbox selection change event.
Reason:   ItemCount for combobox is always 0 at the server side.

Please can you tell me the quick solution. Do i am missing some property.
I was thinking to bind the control again at the page load. But how i will know the items that were bound before. Do i have to maintain status for it in viewstate or hidden field?
Dimitar Terziev
Telerik team
 answered on 16 Dec 2010
3 answers
937 views
Hi,
   im using

CommandItemDisplay

="TopAndBottom"

 option to allow automatic insertion of records in the grid. When i place this property "Add New Record" link is displayed in the top and bottom of the grid.
and in the

oninsertcommand

="RadGroupsGrid_InsertCommand"

i wrote the code as follows:

protected void RadGroupsGrid_InsertCommand(object source, GridCommandEventArgs e)

{

GridEditFormInsertItem insertItem = (GridEditFormInsertItem)e.Item;

string GroupName = (insertItem["Group_Name"].Controls[0] as TextBox).Text;

string GroupDesc = (insertItem["Group_desc"].Controls[0] as TextBox).Text;

SqlCommand cmdNewGroup = new SqlCommand();

cmdNewGroup.Connection = con;

con.Open();

cmdNewGroup.CommandType =

CommandType.StoredProcedure;

cmdNewGroup.CommandText =

"Groups_Insert";

cmdNewGroup.Parameters.AddWithValue(

"@Group_Name", GroupName);

cmdNewGroup.Parameters.AddWithValue(

"@Group_desc", GroupDesc);

cmdNewGroup.Parameters.AddWithValue(

"@Case_Id", 3);

cmdNewGroup.ExecuteNonQuery();

}

But when i click the "Add New Record" link the event is not gettign fired and the pop-up for inserting new record is not getting displayed.
Do we need to create the controls for the insert pop-up or will it generate automatically like Edit pop-up?
Can u please tell me how to open a pop-up to insert new record automatically.

Thank you,
sirisha

Shinu
Top achievements
Rank 2
 answered on 16 Dec 2010
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?