Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
327 views
How can I move the scrollbar all the way to the bottom of a RadGrid after doing a postback?

Thank You in Advance!
Pavlina
Telerik team
 answered on 29 Mar 2013
1 answer
59 views
hi master

I meet a problem. please help me.

I using radgrid and bind data with client
I next page 4 and delete row. that have index 4 with ajax. after delete sucess.
I next page 5. Data is page 5 but current page in footer show page 1

i hope every will help me

Thanks very much
Andrey
Telerik team
 answered on 29 Mar 2013
1 answer
128 views
Hi,

In a certain situation I would like to use a SearchBox as a control parameter for an SQLDataSource.
But what property name should I use for that to work ? I coulnd't find properties like Text or Value or SelectedValue...

<asp:ControlParameter ControlID="RadSearchBoxEvt" Name="evt" PropertyName="Value" Type="String" />

Bozhidar
Telerik team
 answered on 29 Mar 2013
4 answers
917 views
How to modify this sample http://demos.telerik.com/aspnet-ajax/splitter/examples/sp_enableresizedock/defaultcs.aspx to disable resizing then no sliding panes are docked/expanded ???
Pankratov
Top achievements
Rank 1
 answered on 29 Mar 2013
2 answers
158 views
Hello,

I have added RadGrid on ASPX page and I want to add columns dynamically to this RadGrid.
I am facing problem like if page gets refreshed it creates some extra columns at the end. It should maintain same columns if i sort/change page or any postback occurs  because of asp.net controls.
Here is the code that I am using.

ZZZ.BL.ReportsBL reportBl = newZZZ.BL.ReportsBL();
       protected void Page_Init(object source, System.EventArgs e)
       {
               RadGrid1.MasterTableView.Columns.Clear();
               BuildGridColumns();
        
       }
       protected void Page_Load(object sender, EventArgs e)
       {
           if (!IsPostBack)
           {
               drpBillingCycles.DataSource = reportBl.GetBillingCycles(37);
               drpBillingCycles.DataBind();
           }
       }
       protected void drpBillingCycles_SelectedIndexChanged(object sender, EventArgs e)
       {
           int PageCount = 0;
           System.Data.DataTable cd = new System.Data.DataTable();
           RadGrid1.VirtualItemCount = PageCount;
           RadGrid1.DataSource = reportBl.GetReportData("325012", 37, RadGrid1.CurrentPageIndex, RadGrid1.PageSize, out PageCount);
           RadGrid1.DataBind();
       }
       protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
       {
           int PageCount = 0;
            RadGrid1.VirtualItemCount = PageCount;
           RadGrid1.DataSource = reportBl.("325012", 37, RadGrid1.CurrentPageIndex, RadGrid1.PageSize, out PageCount);
           //RadGrid1.DataBind();
       }
       private void BuildGridColumns()
       {
           RadGrid1.MasterTableView.Columns.Add(GetGridBoundColumn("PhoneNumber","Phone Number"));
           RadGrid1.MasterTableView.Columns.Add(GetGridBoundColumn("UserName", "Phone User Name"));
           RadGrid1.MasterTableView.Columns.Add(GetGridBoundColumn("EmpId", "Employee Id"));
           RadGrid1.MasterTableView.Columns.Add(GetGridBoundColumn("Department", "Radio Number"));
           
       }
       private GridBoundColumn GetGridBoundColumn(string DataField,string HeaderText)
       {
           GridBoundColumn boundColumn1 = new GridBoundColumn();
           boundColumn1.DataField = DataField;
           boundColumn1.UniqueName = DataField;
           boundColumn1.SortExpression = DataField;
           boundColumn1.HeaderText = HeaderText;
           return boundColumn1;
       }

Chetan
Top achievements
Rank 1
 answered on 29 Mar 2013
1 answer
122 views
When I have grouped a grid, with nested table, in columns and in the prerender event i hided some of gruped results happen that remain a spaces in the grid.
I'm try in all ways to remove that spaces but without success.
I see that the spaces disappear when I open and collapse a grouped row.
In the attached file can you see the result's grid.
This is the code.

For Each item As GridGroupHeaderItem In gridTelerik.MasterTableView.GetItems(GridItemType.GroupHeader)

item.Expanded = False

Dim groupDataRow As DataRowView = CType(item.DataItem, DataRowView)

If item.DataCell.Text.IndexOf("Partita:") > -1 Then

item.DataCell.Text = item.DataCell.Text.Replace(item.DataCell.Text.Substring(9, 8), "")

Dim StrdtReverse As String = item.DataCell.Text.Substring(item.DataCell.Text.Length - 10, 10)

Dim StrdtReverseConcat As String = String.Concat(StrdtReverse.Substring(6, 4), StrdtReverse.Substring(3, 2), StrdtReverse.Substring(0, 2))

Dim dtRowPartita() As DataRow = dataTableEstrattoConto.Select(String.Concat("Partita='", StrdtReverseConcat, item.DataCell.Text.Replace("Partita: ", ""), "'"))

For ik As Integer = 0 To dtRowPartita.Length - 1

totaleNettoPartita += Convert.ToDecimal(dtRowPartita(ik).Item("Importonetto"))

Next

item.DataCell.Text = String.Concat("Saldo partita: <b>", String.Format("{0:n2}", totaleNettoPartita), "</b>")

totaleNettoPartita = 0

End If

'item.DataCell.Text = "$" + groupDataRow("Cliente").ToString() + " (" + groupDataRow("Importonetto").ToString() + ")"

If item.DataCell.Text.IndexOf("Cliente:") > -1 Then

Dim dtRowCliente() As DataRow = dataTableEstrattoConto.Select(String.Concat("Cliente='", item.DataCell.Text.Replace("Cliente: ", ""), "'"))

For ik As Integer = 0 To dtRowCliente.Length - 1

totaleNetto += Convert.ToDecimal(dtRowCliente(ik).Item("Importonetto"))

totaleRitenuta += Convert.ToDecimal(dtRowCliente(ik).Item("Importoritenuta"))

totaleLordo += Convert.ToDecimal(dtRowCliente(ik).Item("Importolordo"))

totaleImponibileRitenuta += Convert.ToDecimal(dtRowCliente(ik).Item("Imponibileritenutaacconto"))

Next

item.DataCell.Text = String.Concat(groupDataRow("Cliente").ToString().TrimStart, "<br> <b>TOTALI: Importo lordo:</b> ", String.Format("{0:n2}", totaleLordo), _

" - <b>Imponibile ritenuta acconto:</b> ", String.Format("{0:n2}", totaleImponibileRitenuta), _

" - <b>Importo ritenuta:</b> ", String.Format("{0:n2}", totaleRitenuta), " - <b>Importo netto:</b> ", String.Format("{0:n2}", totaleNetto))

If totaleLordo = 0 Then

If (Request.QueryString("st") Is Nothing) Or _

(Not Request.QueryString("st") Is Nothing AndAlso Request.QueryString("St").ToString <> "1") Then

'se le partite si pareggiano tra di loro, perch ad es. c' una nota di credito in un altra partita

'non rendo visibile il tab

item.Visible = False

item.Display = False

item.Expanded = False

End If

End If

totaleGenerale += totaleNetto

totaleLordo = 0

totaleNetto = 0

totaleRitenuta = 0

totaleImponibileRitenuta = 0

End If

Next

Kostadin
Telerik team
 answered on 29 Mar 2013
5 answers
299 views
Hi,

In my RadGrid 10 rows are displaying while clicking the linkbutton which is outside the grid my grid should display 20 rows per page. Any one can help me on this.

Regards,
Nithya
Angel Petrov
Telerik team
 answered on 29 Mar 2013
2 answers
108 views
Hello,

How to use both InPlace and PopUp edit mode in same grid? 

I have the functionality like "adding new rows" and "editing the existing row", I wish to have PopUp for Adding new rows and InPlace for Editing the existing row.

Please let me know in which way I can able to accompolish this.

Thank You
Regards
Ganapathy
Ganapathy
Top achievements
Rank 1
 answered on 29 Mar 2013
2 answers
626 views
Hello,

I have disabled checkboxes within the rad grid on the server side and I am unable to enable them via javascipt.  How can this be achieved?

I use this code to enable/disable checkboxes via JavaScript
function SelectDependentRoles(checked, readerCheckbox, dropboxCheckbox) {
      if (checked) {
          readerCheckbox.checked = checked;
          readerCheckbox.disabled = true;
          dropboxCheckbox.checked = checked;
          dropboxCheckbox.disabled = true;
      }
      else {
          readerCheckbox.checked = checked;
          readerCheckbox.disabled = false;
          dropboxCheckbox.checked = checked;
          dropboxCheckbox.disabled = false;
      }
  }

This code above works just fine until i disable the checkboxes on the server:

private void EnableCheckboxes()
        {
            foreach (GridDataItem row in dgLoginRequest.MasterTableView.Items)
            {
                var chbxReader = (CheckBox)row.FindControl("chbxReader");
                var chbxRKDropbox = (CheckBox)row.FindControl("chbxRKDropbox");
                var chbxShare = (CheckBox)row.FindControl("chbxShare");
  
                chbxReader.Enabled = !chbxShare.Checked;
                chbxRKDropbox.Enabled = !chbxShare.Checked;
            
        }

Then when I try to run the javascript code it puts the checkboxes in a wierd state.  I have attached a screen shot.  How do I enable these checkboxes again via javascript?
Robert
Top achievements
Rank 1
 answered on 28 Mar 2013
4 answers
203 views
I have a webpage that has two buttons.
Button 1 : When you click on this button it opens up a modal window.
Button 2: Is to save the page data.

Scenario: When We click on Button1 it opens up a modal window..
 Then We close the window using windows close icon. (X)
 Then when we save the page(By clicking on button 2) 
 The modal window popus up again.

Please advise how can I avoid poping up the modal window on save button click.

Here is the code of Button1 click event

   protected void Button1_Click(object sender, EventArgs e)
    {
        RadWindow _menuwindow = new RadWindow();
        _menuwindow.NavigateUrl = "~/Console/L/Details.aspx";
        _menuwindow.VisibleOnPageLoad = true;
        _menuwindow.ShowContentDuringLoad = true;
        _menuwindow.Style.Value = "z-index:7010;";
        _menuwindow.ID = "Button1";
        _menuwindow.Modal = true;
        _menuwindow.Height = 600;
        _menuwindow.Width = 900;
        _menuwindow.DestroyOnClose = true;
        _menuwindow.Title = "Button1";
        CathWindowManager.Windows.Add(_menuwindow);
    }

Thanks.
Gauri
Top achievements
Rank 1
 answered on 28 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?