Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
506 views
Dear all 

I follow this demo, to buiuld a Multi Column RadComboBox and It works.
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultcs.aspx


But now I want to apply Multiple Select with Multi Column RadComboBox

Can anyone help me in that issue ?

Best Regards
Simon
Telerik team
 answered on 18 Nov 2010
1 answer
80 views
I want to handle when the user pushes the enter key.

I have got the following code

<ConfirmTemplate >
                <div class="rwDialogPopup radconfirm">   
                    <div class="rwDialogText">
                    {1}    
                    </div>      
                    <div>
                    <a onclick="$find('{0}').close(true);"  class="rwPopupButton" href="javascript:void(0);" ><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[Yes]##</span></span></a>
                    <a onclick="$find('{0}').close(false);" class="rwPopupButton"  href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[No]##</span></span></a>
                    </div>
                </div>
                    <script language="javascript" type="text/javascript">
            function pageLoad() {
                document.onkeypress = KeyPressHappened;
            }
            function KeyPressHappened(e) {
                if (!$find('{0}')) return;
                if (!e) e = window.event;
                if ((e.keyCode >= 0) && (e.keyCode <= 127))
                    $find('{0}').close(true);
            }
            
            pageLoad();//Wrong place to call this! but where do i put it?
 
    </script>
            </ConfirmTemplate>

Where i call the function pageLoad(); its currently being called when the entire page loads, how do i set it up so that it will be called when the window loads so that it only tracks key events for the radwindow and not the entire page that the window is declared in?
Georgi Tunev
Telerik team
 answered on 18 Nov 2010
1 answer
66 views
I have a RadGrid, a textbox and submit button on my form.  The textbox will only allow numbers.  My grid is populated with data.  What I need to do is to take what the user entered in the textbox, take that value and get a random number out of it and then fill up one of the columns in the table with these random numbers.  So if I have 50 rows, I would be filling it with 50 random numbers.  Which event would I need to handle to accomplish this?  Thanks.
Veli
Telerik team
 answered on 18 Nov 2010
1 answer
47 views
Hi,

How to read the radgrid values to datatable and rebind the  modified table values to Radgrid from client side(javascript).

With Best Regards,
Thippa reddy
Veli
Telerik team
 answered on 18 Nov 2010
2 answers
61 views

Hi,

I've been experiencing a strange paging problem with an autogenerated hierarchy RadGrid...

I have 2 DataTables, let's say MonthDataTable and DayDataTable, these 2 tables are related by a DataRelation linking a key column in the MonthDataTable to a column of the DayDataTable. Everything is in a Dataset, which is the actual DataSource of my RadGrid.

I set the AutoGenerateHierarchy property of the RadGrid to "true" and it works. The resulting RadGrid displays a data row for each month with the corresponding data, and I can deploy these lines to see the data for each day for the matching month. I checked with the DataSource in debug mode, all the data are handed to the RadGrid, nothing is missing.

However, when it comes to paging in the DetailTable (DayDataTable), the number of pages is not correct. For example, I have 28 days to be displayed in the DetailTable, with a page size set to 10 -> the first page displays no child records, the second page displays 8 rows, the third page displays 10 rows and fourth one displays 10 rows. And I have 10 pages I can click on with nothing in the 1st page and on the fifth-to-tenth pages.

Here is the starter to may be understand the problem:

I have 4 rows in my MonthDataTable each corresponding to 12 rows in my DayDataTable. As a result, I have 48 rows in the DayDataTable... The resulting Grid displays 4 rows (1 for each month) that I can deploy to see the details on a daly basis.
When I allow paging in the DetailTable, all of the DetailTables display 5 pages available instead of 2 pages. Inside of these 5 pages, I find my 12 records corresponding to the matching month, as expected but in various pages and with no real logic (1st page void for example, then 8 records on the 2nd page, then 4 more records on the 3rd page...)

Plus, when I us the PagerTextFormat in the DetailTables, the value of "{4} {5}" always displays the total number of days (48), in all of the DetailTables.

I believe that the persisting 5 clickable pages on each DetailTable are there because the DetailTables always think they have the whole 48 records, while they only have 12 each...

Do you have an idea why the paging macanism could be wrong and base itself on the whole set of records, while only 12 records are present in each DetailTable ?

Thank you for your help!

Veli
Telerik team
 answered on 18 Nov 2010
4 answers
137 views
Hi Guy's,

I have RadGrid with "Add new Record" option,"Edit" option also for already added records.
when i click on "Add new Record" option "Grid" is expanding with the input controls and if i click on "Edit" option same controls are displaying with the "rowdata" but ,

for example plz refer this url http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx

My Requirement is,
 
When i click on "Add new Record" option system would display input controls (like textbox's,ddl...s e.t.c),
and if i click on "Edit" button Above controls (the controls which are visibled when we click on "Add new Record" option) should be visible false and seleted row will be appear in Edited form

plz provide sloution (refer above mentioned url).....!

Thanks in advance

Chandra.Y








Alon
Top achievements
Rank 1
 answered on 18 Nov 2010
1 answer
81 views

Hi, I have one telerik rad grid.Using a method i am filling the grid.I have enabled paging property.I have used itemtemplate-->ImageButton for delete and edit options.I have set page size as 10.Page load time it is working properly and populating the grid.After inserting 11 th row the pagination starts and it will show in next page with one record.But when i am deleting the 11th row the grid become blank.I have used dataset to bind the records. radgrid.DataBind(); dsDataset.Dispose();. But its item.count is 0. What is the reason?

protected void Page_Load(object sender, EventArgs e)
   
{
       
try
       
{
           
if (!IsPostBack)
           
{
               
PopulatePackage();
           
}
       
}
       
catch (Exception ex)
       
{
            lblMessage
.Text = objUtl.GetErrorMessage(ex, this);
            lblMessage
.Visible = true;


protected void gvPackage_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
   
{
       
try
       
{
           
SqlHelper objSQL = new SqlHelper();
           
DataSet dsPackage = new DataSet();
            dsPackage
= objSQL.ExecuteDataset("AL_PackageType_List_Retrieve",
                                             objUtl
.NumericEntry(Session["LocationId"].ToString()));
            gvPackage
.DataSource = dsPackage.Tables[0];
            dsPackage
.Dispose();
           
//PopulatePackage();
       
}
       
catch (Exception ex)
       
{
            lblMessage
.Text = objUtl.GetErrorMessage(ex, this);
            lblMessage
.Visible = true;
       
}
   
}





private void PopulatePackage()
   
{
       
try
       
{
            lblMessage
.Text = string.Empty;
           
SqlHelper objSQL = new SqlHelper();
           
DataSet dsPackage = new DataSet();
            dsPackage
= objSQL.ExecuteDataset("AL_PackageType_List_Retrieve",
                                             objUtl
.NumericEntry(Session["LocationId"].ToString()));
            gvPackage
.DataSource = null;
            gvPackage
.DataSource = dsPackage.Tables[0];
            gvPackage
.DataBind();
           
//dsPackage.Dispose();
           
if (gvPackage.Items.Count <= 0)
           
{
                lblMessage
.Text = "No Package Details Found...";
                gvPackage
.Visible = false;
           
}
           
else
           
{
                gvPackage
.Visible = true;
           
}
       
}
       
catch (Exception ex)
       
{
            lblMessage
.Text = objUtl.GetErrorMessage(ex, this);
            lblMessage
.Visible = true;
       
}
   
}
Tsvetina
Telerik team
 answered on 18 Nov 2010
1 answer
145 views
this control is kewl!

We are planning to use this, before that, have few questions....please help me

1) Can we have custom headers & footer?
2) Column freezing?
3) Do we have different kind of binding modes like we do with RadGrid?
4) is there any differnce between beith WEB & WPF control in the functionality wise?

Thanks,
1) can we have custom headers & footers?
2) column freezing?
3) do we have different kind of data bindings like we do in case of RadGrid?
4) is there any difference between WEB & WPF control in the functionality wise?
5) can we have a feature comparison report between RadGrid & Treelist?

Thanks,
Suman
Veli
Telerik team
 answered on 18 Nov 2010
2 answers
461 views

I have a RadListBox showing selected filter rules. I can add items to this ListBox by transferring from other ListBoxes or by creating from other controls' data using client-side javascript. When I add or remove items, I update RadGrid asynchronously using RadAjaxManager. In javascript always when I add or remove items to the ListBox, I call a function to make RadAjaxManager to update RadGrid.


When I add new items, the items appear in the ListBox client-side and also server-side. But when I remove items, it removes the item client-side and calls the AjaxManager request, but the items are not removed from the server side collection. For example if I add and remove the exactly same item 5 times, then I would have 0 items shown in the client-side ListBox but the same item 5 times in the server-side collection.

 

I am using trackChanges() and commitChanges() functions both when adding or deleting items. The ListBox is not posted back. Why is it so that adding items using these functions works but removing doesn’t?

 

Thanks,

Simo

 


Here are the functions to add and delete the items and call the Ajax manager (alerts for testing purposes):

 

function StateListBoxItemDblClicked() {
     alert("StateListBoxItemDblClicked " + ListboxDestination.get_items().get_count());
     var listBoxSource = $find("<%= UseCaseStateRadListBox.ClientID %>");
     listboxDestination.trackChanges();
     var item = listBoxSource.get_selectedItem();
     listBoxSource.transferToDestination(item);
     listboxDestination.commitChanges();
     UseCaseRadGridRebind();
 }
  
 function DeleteSelectedItemFromDestination() {
     listboxDestination.trackChanges();
     var item = listboxDestination.get_selectedItem();
     listboxDestination.get_items().remove(item);                
     listboxDestination.commitChanges();
     alert("Deleted "+ listboxDestination.get_items().get_count());
     UseCaseRadGridRebind();
 }
  
function UseCaseRadGridRebind() {
    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("UseCaseRadGridRebind");
}

 

Here is the RadAjaxManager, RadGrid inside RadPane and RadListBox inside RadPanelBar.

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    onajaxrequest="RadAjaxManager1_AjaxRequest" EnableViewState="False">
    <AjaxSettings>
         <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="UseCaseRadGrid" LoadingPanelID="LoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
  
  
        <telerik:RadPane runat="server">
            <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Skin="Default">
     </telerik:RadAjaxLoadingPanel>
        <telerik:RadGrid ID="UseCaseRadGrid" runat="server" AutoGenerateColumns="False"
                GridLines="None" Width="440" Visible="true"
                onselectedindexchanged="UseCaseRadGrid_SelectedIndexChanged"
                onitemcommand="UseCaseRadGrid_ItemCommand"
                    onneeddatasource="UseCaseRadGrid_NeedDataSource" >
<ClientSettings EnablePostBackOnRowClick="true">
<Selecting AllowRowSelect="true" />
</ClientSettings>
       <MasterTableView AutoGenerateColumns="False" ShowHeadersWhenNoRecords="True" EnableNoRecordsTemplate="true">
        <Columns>
            ...
        </Columns>
       </MasterTableView>
        </telerik:RadGrid>
        </telerik:RadPane>
  
  
<telerik:RadPanelItem Text="Valitut hakuehdot">
<ContentTemplate>
    <telerik:RadListBox runat="server" ID="RadListBoxDestination" AutoPostBackOnDelete="false"
        Height="200px" Width="500px" AllowAutomaticUpdates="false" OnClientDeleted="DeleteSelectedItemFromDestination"
AllowDelete="True" SelectionMode="Multiple" AllowReorder="False" OnClientItemDoubleClicked="DeleteSelectedItemFromDestination"  />
 </ContentTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelBar>


        protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if (e.Argument == "UseCaseRadGridRebind")
                UseCaseRadGrid.Rebind();
        }
  
RadListBoxItemCollection RadListBoxDestinationItems = RadListBoxDestination.Items;
Simo
Top achievements
Rank 1
 answered on 18 Nov 2010
4 answers
86 views
Hi All,
The HTML rendered out by the radgrid HTMLEditorColumn is NOT the same as that render in the Editor proper. It seems there are a few discrepencies which point to an old renderer being used.
In the HTMLEditorColumn
Line breaks rendered as <BR>
Changes in fonts are rendered as <font ...> font blocks
In the Editor proper
Line breaks rendered as <br />
Changes in fonts are rendered as <span style='font...> span blocks.

Is there a reason for this?  I am having a lot of trouble getting consistency in my rendering layouts because of this. Not to mention having to implement work-arounds to get XHTML compliance for exporting to PDF.
Before I get involved in changing my framework to use and Editor in a templated column, I would like to know if this is a bug or something that is expected.

Thanks,
Steele.
Dobromir
Telerik team
 answered on 18 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?