Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
251 views
Hi,
    I'm probably trying to do something that is achieved in a better way but this is what I'm trying to do.

I have a page with several controls and grids that is used for an edit for something else. The page is populated with data from a business object and certain properties are data bound. What I'm trying to do is making changes on the page and then hit a save button which will then postback and I'll read all the data from the controls and save in one hit.

The issue I have is the grid. I'm able to remove the items in the grid client side
        function butConditionRemove_OnClick(grid) {
  
//grid is the clientid of the grid
            var MyGrid = $find(grid);
            var MasterTable = MyGrid.get_masterTableView();
            var selectedRows = MasterTable.get_selectedItems();
            for (var i = 0; i < selectedRows.length; i++) {
                var row = selectedRows[i];
                if (confirm("Are you sure you want to delete the selected entry?")) {
  
                    var table = MasterTable.get_element();
                    var rowtmp = table.rows[row.get_element().rowIndex]
                    table.deleteRow(row.get_element().rowIndex)
  
                               var dataItem = $find(rowtmp.id);
                              if (dataItem) {
                                   dataItem.dispose();
                                   Array.remove($find(grid).get_masterTableView()._dataItems, dataItem);
                            }
                               MyGrid.repaint();
  
                  
                  
                }
  
           
            }
  
         
        }

This works fine but when I click on the save button which is just posting back the grid object on the server side still has the objects I have deleted in it. Other controls on the page which I'm changing as well have the updated values so it's just the grid that does not reflect the changes I make client side.

So is there a way I can make the grid pass it's client side state back in the same way other controls do.
Nikolay Rusev
Telerik team
 answered on 04 Aug 2010
1 answer
129 views
I have a RadGrid on my page which pulls in an image name and a date related to the image.

I have also added a filter to the date field.

What I would like to do is have my Rotator display images from the RadGrid depending on what is shown.

So If someone filters the images by a date only those images will show in the RadRotator.

Is this at all possible and if so could someone help me out with a VB example preferably.

Thanks
Fiko
Telerik team
 answered on 04 Aug 2010
2 answers
566 views
Hi there,

How can i display the total grid rows in the footer ?

here is my grid, You can see there is a column "Department" I want to display the total grid rows in the footer of department column,

 

<telerik:RadGrid ID="RadGrid1" ShowFooter="true"

 

 

Width="99%" EnableLinqExpressions="false" FooterStyle-CssClass="GridColHeadNormal"

 

 

AllowSorting="True" runat="server">

 

 

 

<MasterTableView ClientDataKeyNames="KEYID">

 

 

<Columns>

 

 

 

 

<telerik:GridBoundColumn HeaderText="Employee Name" DataField="Name" UniqueName="Name"

 

 

SortExpression="Name" FilterControlWidth="130" AutoPostBackOnFilter="true"

 

 

CurrentFilterFunction="contains" ShowFilterIcon="false" />

 

 

 

<telerik:GridBoundColumn HeaderText="SSN" DataField="EMP_SSN"

 

 

UniqueName="SSN" SortExpression="EMP_SSN" FilterControlWidth="100" AutoPostBackOnFilter="true"

 

 

CurrentFilterFunction="contains" ShowFilterIcon="false" />

 

 

 

<telerik:GridBoundColumn HeaderText="Pay Period" DataField="CODE" SortExpression="CODE"

 

 

UniqueName="CODE" AutoPostBackOnFilter="true">

 

 

<FilterTemplate>

 

 

<telerik:RadComboBox ID="RadComboBoxPP" DataSourceID="SqlDataSourcePP" DataTextField="Code" Width="100"

 

 

DataValueField="Code" Height="100px" AppendDataBoundItems="true" OnClientSelectedIndexChanged="SelectedIndexChanged"

 

 

SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("Code").CurrentFilterValue %>'

 

 

runat="server">

 

 

<Items>

 

 

<telerik:RadComboBoxItem Text="All" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

 

 

<script type="text/javascript">

 

 

function SelectedIndexChanged(sender,args) {

 

 

var tableView=$find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");

 

sender.value= args.get_item().get_value();

tableView.filter(

"CODE",args.get_item().get_value(),"EqualTo");

 

}

 

</script>

 

 

</telerik:RadScriptBlock>

 

 

</FilterTemplate>

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Department" DataField="Department" SortExpression="Department"

 

 

UniqueName="Department" AutoPostBackOnFilter="true">

 

 

 

<FilterTemplate>

 

 

<telerik:RadComboBox ID="RadComboBoxDep" DataSourceID="SqlDataSourceDepartment" DataTextField="Department"

 

 

DataValueField="Department" Height="100px" AppendDataBoundItems="true" OnClientSelectedIndexChanged="SelectedIndexChanged2"

 

 

SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("Department").CurrentFilterValue %>'

 

 

runat="server">

 

 

<Items>

 

 

<telerik:RadComboBoxItem Text="All" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

<telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">

 

 

<script type="text/javascript">

 

 

function SelectedIndexChanged2(sender,args) {

 

 

var tableView=$find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");

 

sender.value= args.get_item().get_value();

tableView.filter(

"Department",args.get_item().get_value(),"EqualTo");

 

}

 

</script>

 

 

</telerik:RadScriptBlock>

 

 

 

</FilterTemplate>

 

 

<FooterStyle CssClass="GridColHeadNormal" />

 

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridNumericColumn Aggregate="Count" DataField="KEYID" Display="false"

 

 

UniqueName="KEYID" SortExpression="KEYID" ShowFilterIcon="false" AllowFiltering="false" />

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings >

 

 

 

 

<ClientEvents OnGridCreated="GridCreated" OnRowSelected="RowSelected" />

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

 

Kiran
Top achievements
Rank 1
 answered on 04 Aug 2010
3 answers
327 views
When I click on a date in the scheduler control, I get the "String was not recognized as a valid DateTime" exception. Please see the two images attached for more info. I have tried changing the globalization settings on the web.config and on the IIS to en-GB. Still doesn't work. Please help.

Thanks
Veronica
Telerik team
 answered on 04 Aug 2010
3 answers
194 views
Hi All,

           Thank you very much for the support you people are provoding.Now I am here with another problem of recurrence editor
I want to hide End after  radio button and numeric Text box for entering occurrence and the text 'Occurrence' itself .I was able to hide the radio button and Numeric text box but can't hide the text 'occurrences' .Pls tell me how can I hide the text occurrence its really urgent .hope that U understand the issue .All theses are in the recurrencerange panel of recurrence editor

Thanks and Regards
Vishnu.B.R
Veronica
Telerik team
 answered on 04 Aug 2010
1 answer
132 views

 

dear sir,
RecurrenceRule
rrule = Telerik.Web.UI.RecurrenceRule.TryParse(lvl_recurringsms[0].Recurrenceinfo);

 

 

foreach (DateTime occurrence in rrule.Occurrences)

 

{

 

Console.WriteLine("\t{0}", occurrence);

 

}

 

How to filter the occurences here. Need of syntax and methods (predicate T souce)

 

rrule.Occurrences.Where<T predicate

>

Kind regards.
Arockiasamy.I

 

Veronica
Telerik team
 answered on 04 Aug 2010
1 answer
166 views
I am using two different types of Chart Series in my chart i.e. "Bar" and "Line". The auto generated legend gives the same shape for both these series items (Circle,Square etc.) at a time. Is it possible to have the legends of similar shape as that of the series that they represent instead of a predefined shape? For example , for a series of type "Bar", can we get a legend in shape of bar and for "Line"a legend in shape of a line?
Giuseppe
Telerik team
 answered on 04 Aug 2010
2 answers
96 views
Hello,

Code snipet given on the telerik site is not working. Can you please give the updated snipet ?

Existing code:
function ExpandItem()
{
   var panelbar = <%= RadPanelBar1.ClientID %>;
   var item = panelbar.FindItemByText(text);
   if (item)
   {
       item.Expand();
   }
   else
   {
       alert("Item with text '" + text + "' not found.");
   }
}

link:
http://www.telerik.com/help/aspnet/panelbar/panelbar_client-sideapi.html

Can you please update it ?

I could make a change for the firstline :
var panelbar = $find("<%= RadPanelBarUserInfo.ClientID %>");


But it failed for the second line:
var item = panelbar.FindItemByText("AccountInformation");
prayag ganoje
Top achievements
Rank 1
 answered on 04 Aug 2010
5 answers
875 views
Hi,

I have ASP.NET AJAX Q3 2009 SP2 controls installed on my computer, and they're integrated with VS 2008.
Recently I installed VS 2010 (in addition to VS 2008). Do I need to install a new version of your controls to use them in VS 2010 or can I somehow convince the existing version to work with both environments?

I have a project that uses ASP.NET AJAX Q3 2009 SP2. I would like to move the project to VS 2010, but keep the same version of AJAX controls.

Tank you,
Andreja
Erjan Gavalji
Telerik team
 answered on 04 Aug 2010
1 answer
128 views
hi guys
wanna bind header of TemplateField
<telerik:GridBoundColumn FilterControlWidth="80px" ShowSortIcon="true"
  Groupable="false" DataField="Title" SortExpression="Title" 
  ItemStyle-Width="23%" HeaderStyle-Width="23%" HeaderText="<%# getValue("Title") %>"
   ItemStyle-Font-Names="tahoma" ItemStyle-Font-Size="8"
    HeaderStyle-Font-Size="8" HeaderStyle-Font-Names="tahoma">
<HeaderStyle Font-Names="tahoma" Font-Size="8pt" Width="23%"></HeaderStyle>
<ItemStyle Font-Names="tahoma" Font-Size="8pt" Width="23%"></ItemStyle>
              </telerik:GridBoundColumn>
this code include error
how i can implement that?
Shinu
Top achievements
Rank 2
 answered on 04 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?