Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
204 views
Hello,


I want to add a custom checkbox on the Upload window, checking/unchecking of which will decide something related to documents.
Is that possible somehow?

Regards,
Priya Angolkar 
Vessy
Telerik team
 answered on 25 Jul 2012
3 answers
184 views
I have a name column in my grid.
I am trying to get the value in the filter textbox for the name column.

<telerik:GridBoundColumn HeaderText="Patient Name" UniqueName="pt_name" DataField="pt_name" >
               <FilterTemplate>
                   <telerik:RadTextBox ID="RTName" runat="server" Width="200px" ClientEvents-OnValueChanged="ValueChanged" ></telerik:RadTextBox>
                       <telerik:RadScriptBlock ID="RBName" runat="server">
 
                               <script type="text/javascript">
                                   function ValueChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       var Name = $find('<%# ((GridItem)Container).FindControl("RTName").ClientID %>');
 
                                       tableView.filter("pt_name", Name, "StartsWith");
                                   }                                  
                               </script>
 
                           </telerik:RadScriptBlock>
                    
               </FilterTemplate>
              </telerik:GridBoundColumn>

aspx.cs
if (e.CommandName == RadGrid.FilterCommandName)
            {
                Pair filterPair = (Pair)e.CommandArgument;
                switch (filterPair.Second.ToString())
                {
                    case "pt_Date":
                        {
                           //
                        }
                    case ("pt_name"):
                        {
                             
                            TextBox searchName = (e.Item as GridFilteringItem)[filterPair.Second.ToString()].FindControl("RTName") as TextBox;
                           search = searchName.Text + "%";
                            break;
                        }
 
                }
            }

But I am not getting the textbox control in the program. Value of 'searchName' is Null.
Please help me on this....


Soumya
Top achievements
Rank 1
 answered on 25 Jul 2012
1 answer
101 views
Hi ,

I use the RadSchedular in which i use the AdvancedEditTemplate this Schedular is inside an RadPanelBar and when i edit the appointment the edit window gets opened within the RadPanelBar . I want it to cover up the whole screen instead just the panel .

I have also found that this works fine in FireFox and does not work in IE .

I have also found that to make it work in IE (IE 9) i had to change the DOCTYPE attribute to

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
but the project im working on uses the one below and changing it to the above one will require a lot of changes to the Project.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

Also find the attached images in order to reproduce the error .
The doc.png shows the DOCTYPE being used .
The ie9opensinsidethepanelbar.png and firefox.png shows the output in the IE 9 and Firefox when using the DOCTYPE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

Thanks & Regards,
Francis P.
Ivana
Telerik team
 answered on 25 Jul 2012
2 answers
181 views
Hi all,

I have a multi column rad combo box, and the combo box having two columns. when i try to use the combo box filter that time i need to work that filter on that two columns at a time. how can i achieve this.. 
Please help..


Regards,

Prassin
Prassin
Top achievements
Rank 1
 answered on 25 Jul 2012
5 answers
186 views
Sir ,

I am new for telerik. Am using the  hierarchical  radgrid. But causing error when enableviewstate=false.
NeedDataSource called before ItemCommand.So my grid not able to fetch the proper data as its not gets the parentid in NeedDataSource.

If enableviewstate=true my hierarchical  radgrid working fine but the parent columns header goes disappers.

Am creating radgrid columns dynamically.

The main thing is that am not getting my parent ticket it first as NeedDatasource calling first than itemdatacommand.


Events are like this.

initializParentGrid() 

 protected void radrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
      ;;;;;;;;;;;;
bindGrid();
}

 protected void radrid 
_ItemCommand(object source, GridCommandEventArgs e)
    {

 if (e.CommandName == "ExpandCollapse")
        {
            GridTableView gtv = radrid 
.MasterTableView.Items[e.Item.ItemIndex].ChildItem.NestedTableViews[0];
            Telerik.Web.UI.DataKey gdka = radrid 
        .MasterTableView.DataKeyValues[e.Item.ItemIndex];


            hdnDetailTableIndex.Value = e.Item.ItemIndex.ToString();


            if (gdka != null)
                hdnParentTicketid.Value = gdka["ParentId"].ToString();


}


Please suggest.
Jayesh Goyani
Top achievements
Rank 2
 answered on 25 Jul 2012
10 answers
180 views
Hi,

I have 2 rad grids. First one is master and second one is detail. I can delete rows from both grids independently by pressing "Delete" button on toolbar above each grid. I also have "Refresh" buttons in toolbar of both grids.

The problem is with detail grid. When I delete item(s) the grid doesn't refresh. Calling Rebind method doesn't help. The only thing that helps is to press "Refresh" button in toolbar of master grid and select the row in master grid by mouse that was previously selected. After that I can see refreshed detail grid.

So, I don't need to press "Refresh" button in toolbar of master grid and select the row in master grid by mouse. I can refresh the master grid programmatically and only want to reselect the item that was originally selected also programmatically. I've tried this:

item.Selected = true;

But, it only visually selects the item in master grid and doesn't refresh the detail grid.

So, how to select the item in master grid programmatically in order to get the same effect as selecting it by mouse?

Thank you in advance.
Shinu
Top achievements
Rank 2
 answered on 25 Jul 2012
0 answers
61 views
Hi
I have created a web site which has Master Page.
At left side there is a tree view control. after clicking on it a HTML file must be shown on right side in the content page.
I have the html files but i don't know hot show them load them into content area.
please help me.
Tooraj
Top achievements
Rank 1
 asked on 25 Jul 2012
1 answer
72 views
Hi,

I have two line series.I set the first serie color to BLUE, then I set the second serie color to RED.
I don't know why the second serie always appear BLUE. I think this might be simple but I can't visualize the solution.
Can anyone help? The code Follows below:

private void PopulateChart3(string seriesID)
{
    RadChart1.Clear();
    SapeDBDataContext db = new SapeDBDataContext();
 
    int ID = Convert.ToInt32(seriesID);
    var windh = from p in db.SAPE_WindSeries where p.id_localidade == ID where p.valorh != null select p;
    var windp = from p in db.SAPE_WindSeries where p.id_localidade == ID where p.valorp != null select p;
 
    ChartSeries s = new ChartSeries();
    s.Type = Telerik.Charting.ChartSeriesType.Line;
    s.Appearance.LabelAppearance.Visible = false;
    s.Name = "Historic";
    s.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Blue;
 
    foreach (var wi in windh)
    {
        ChartSeriesItem item = new ChartSeriesItem();
        item.XValue = Convert.ToInt32(wi.dia);
        item.YValue = Convert.ToDouble(wi.valorh);
        s.Items.Add(item);
    }
 
    ChartSeries s2 = new ChartSeries();
    s2.Type = Telerik.Charting.ChartSeriesType.Line;
    s2.Appearance.LabelAppearance.Visible = false;
    s2.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Red;
    s2.Name = "Projected";
     
 
    foreach (var wi in windp)
    {
        ChartSeriesItem item2 = new ChartSeriesItem();
        item2.XValue = Convert.ToInt32(wi.dia);
        item2.YValue = Convert.ToDouble(wi.valorp);
        s.Items.Add(item2);
    }
 
    RadChart1.Series.Add(s);
    RadChart1.Series.Add(s2);
}

Thanks,

Marcio Nascimento
Maxime
Top achievements
Rank 1
 answered on 25 Jul 2012
1 answer
149 views
I have two page 
PoliklinlList.aspx
Tanilar.ascx

I use Tanilar.ascx web user control in the Polklinik page.
Ajax manager is in the Poliklinik page.
There are two radgrid in web user controls: radTanilar and radSeciliTanilar
I want to add some value from radTanilar  to radSeciliTanilar after adding I want to show it in the page.But radSeciliTanilar  isn't refresh itself although my web user control is in the updatecontrol of ajax settings.

.

I manage to call my ajax manager from web user control like:
function TanilarRowClick(sender, eventArgs) {
            var id = eventArgs.getDataKeyValue("ID");
            document.getElementById("grdTanilarDClickedRowIndex").value = id;
            $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("taniekle");
 
        }

When I click the radTanilar  row, TanilarRowClick event run and myRadAjaxManager1_AjaxRequest which is in the PoliklinlList page is run also.

myRadAjaxManager settings like this:   (ucpTani is the Id of web user controls')
)
<telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
        runat="server">
        <AjaxSettings>               
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="ucpTani" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>    
</telerik:RadAjaxManager>


When I add my controls(radseciliTanilar and radTanilar) which are in web user controls manually on code like this:

RadGrid grdSeciliTanilar = (RadGrid)ucpTani.FindControl("grdSeciliTanilar");
RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, grdSeciliTanilar);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdTani, grdSeciliTanilar);

 I get error like this:

Server Error in '/' Application.
 
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
 
Stack Trace:
 
 
[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) +9585723
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +221
 
[HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.]
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +286
   Telerik.Web.UI.RadAjaxControl.PerformRender() +498
   Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1819
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +155
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1284

when I add RadAjaxManagerProxy to my user control I get the same error.



Radoslav
Telerik team
 answered on 25 Jul 2012
9 answers
408 views
I have a RadGrid control that has been created dynamically and added to the page.

I have enabled paging for it by setting AllowPaging = true.

I have also set the EnableViewState = true for both RadGrid and its MasterTableView.

I've read this page and am using NeedDataSource event already.

Now, Next Page button works fine and I can see that RadGrid_PageIndexChanged event is raised.

However, when I click the Previous Page button, it doesn't work and indeed the RadGrid_PageIndexChanged event is not raised at all!

Why? How to fix this?

Thanks,
Pavlina
Telerik team
 answered on 25 Jul 2012
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?