Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
413 views
Hi,

1) How do I get the DataKeyValues (ID) of the selected item?

<telerik:RadGrid ID="GridDocument" runat="server">
<MasterTableView DataKeyNames="ID">
    <Columns>
        ...
    </Columns>
</MasterTableView>
<ClientSettings>
    <Selecting AllowRowSelect="True"></Selecting>
</ClientSettings>
</telerik:RadGrid>

2) Is there a url that I can refer to the Client Object API?

Thanks in advance.

Jing
Princy
Top achievements
Rank 2
 answered on 13 Aug 2010
3 answers
144 views
I have looked through many articles and examples, but I cannot find something that will work with what I am trying to accomplish.

We do not use the grid's filtering capability. Rather, we have a panel that has all filtering necessary with the buttons to apply and clear the filter. We are also using advanced databinding (NeedDataSource event) with stored procedures. I would like to use data binding with web services, but the problem that we have converting to this model is the filter expressions. Any suggestions? Questions?
Maria Ilieva
Telerik team
 answered on 13 Aug 2010
3 answers
307 views
is it possible to make the panel header to become a link without interfering the collapse / expand button

my current HTML code is
<telerik:RadPanelBar ID="rpMainMenu" runat="server">
    <Items>
        <telerik:RadPanelItem runat="server" Text="Main Menu" ImageUrl="~/images/AddRecord.gif">
            <Items>
                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 3">
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>
Nikolay Tsenkov
Telerik team
 answered on 13 Aug 2010
2 answers
288 views
Good Day All

I have a Method that i have defined that i will access in JavaScript(Page Method) and its defined like this


  
[WebMethod, System.Web.Script.Services.ScriptMethod]
 public static void Getadata(String StrSearch)
 {
     View obj = new View();
     obj.Bind_SearchBox(StrSearch);
          
    // return Scriptt;
 }


And the Bind_SearchBox() method is a non static method that is defined in this code behind of this page and View is the class name of the Page.  Now i debugged this and i see the results are passed to the method and the Method is Defined like this
 
 
public void Bind_SearchBox(String Search)
    {
 
 
        ViewerService.ViewerService obj = new ViewerService.ViewerService();
 
        String SessionKey = obj.newSession();
 
        DateTime Date1 = Convert.ToDateTime("1980-01-01");
        DateTime Date2 = Convert.ToDateTime("2012-12-31");
 
        ViewerService.extract extract = obj.getObjects(SessionKey, Search, Date1, false, Date2, false, "", "");
        try
        {
            RadPanelBar1.Items.Clear();
            RadScheduler1.Appointments.Clear();
 
            int Len = extract.set.Length;
            for (int i = 0; i < Len; i++)
            {
                ViewerService.vertex value = extract.set[i];
 
                String PanelClass = value.meta;
                PanelClass = PanelClass.Replace(Remstr, "");
                PanelClass = PanelClass.Replace(Remstr2, "");
                Appointment app = null;
                if (value.atom != null)
                {
 
                    RadPanelItem pane = RadPanelBar1.Items.FindItemByText(PanelClass);
                    if (pane == null)
                    {
                        RadPanelItem nwpane = new Telerik.Web.UI.RadPanelItem(PanelClass);
                        RadPanelItem nwpaneSpliter = new Telerik.Web.UI.RadPanelItem(PanelClass);
                        nwpaneSpliter.IsSeparator = true;
                        RadPanelBar1.Items.Add(nwpane);
                        pane = nwpane;
                    }
                    if (value.meta == "za.co.abacus.C_EVENT")
                    {
                        app = new Appointment();
                    }
 
                    int atomLen = value.atom.Length;
                    for (int j = 0; j < atomLen; j++)
                    {
                        ViewerService.atom atm = value.atom[j];
 
                        if (atm.meta.Contains("za.co.reactor.A_LABEL"))
                        {
                            RadPanelItem NewItem = new RadPanelItem(atm.content);
                            pane.Items.Add(NewItem);
                            if (app != null)
                            {
                                app.Subject = atm.content;
                                app.Description = atm.content;
                                app.ID = value.key;
                            }
 
                        }
 
                        if (app != null && atm.meta.Contains("za.co.abacus.C_EVENT"))
                        {
                            app.ID = atm.content;
                        }
                        if (app != null && atm.meta.Contains("za.co.reactor.A_HORIZON"))
                        {
                            app.Start = Convert.ToDateTime(atm.content);
                        }
                        if (app != null && atm.meta.Contains("za.co.reactor.AA_HORIZON"))
                        {
                            app.End = Convert.ToDateTime(atm.content);
                        }
                        if (app != null && atm.meta.Contains("za.co.reactor.A_TEXT"))
                        {
                            app.Description = atm.content;
                        }
  
                        if (app != null && app.End > app.Start)
                        {
                            RadScheduler1.DataStartField = app.Start.ToString();
                            RadScheduler1.DataSubjectField = app.Subject.ToString();
                            RadScheduler1.DataEndField = app.ToString();
                            RadScheduler1.DataKeyField = app.ID.ToString();
                            RadScheduler1.SelectedView = SchedulerViewType.MonthView;
                            RadScheduler1.SelectedDate = app.Start;
                            RadScheduler1.Visible = true;
 
                        }
                    }
 
 
                }
 
            }
        }
        catch (ApplicationException ex)
        {
 
        }
        finally
        {
            obj.closeSession(SessionKey);
 
        }
  
 
    }


Now this Function works well and it has no problems , in the debug more, i check the value that is supplied to this function from the page method function its fine.  and my JS looks like this

function keyPress() {
     var tb = document.getElementById("<%=txtsearchid%>");
     if (tb.value.length == 2) {
         PageMethods.Getadata(tb.value);
         ToggleCollapsePane();
 
     }
     return false;
 }


and the Toggle function
 
 
function ToggleCollapsePane() {
 
        var splitter = $find("RadSplitter1");
 
        var pane = splitter.getPaneById("LeftPane");
 
        if (!pane) return;
 
        if (pane.get_collapsed()) {
            pane.expand();
        }
        else {
            pane.collapse();
 
        }
    }

so the Getadata() Function will call the Bind_SearchBox() Function and pass the Parameter and the function Bind_SearchBox() will do the Job as you can see at the end it sets some control to visible. But this does not bring me back results(The RadScheduler1 is not binded with data and RadPanelBar1 does not show anything)

I had a search button that is that was calling the same method and passing the same parameters but it could show results and it looked like this
 
protected void btnSearch_Click(object sender, EventArgs e)
    {
 
        RadToolBarItem textItem = RadToolBar1.FindItemByText("Button1");
 
        TextBox txtseach = (TextBox)textItem.FindControl("txtsearch");
 
        if (txtseach.Text != "")
        {
            Bind_SearchBox(txtseach.Text.Trim());
 
        }
 
    }


If i click this above button it will show results. The [B]txtseach[/B]  have the same text and it calls the same method but when i call this function and inject parameters from page method it does not work.

I realized that when i debug , when it comes to this line

RadPanelBar1.Items.Clear();
RadScheduler1.Appointments.Clear();

and this one

RadPanelItem pane = RadPanelBar1.Items.FindItemByText(PanelClass);

the Code exists the Loops and go straight to the Finally block

I am Surprised.

Thanks 
Vuyiswa
Top achievements
Rank 2
 answered on 13 Aug 2010
3 answers
195 views
Hi
         I used Telerik Q2 2008 Version. In Rad grid is supported in row click event in IE and works fine.  But the same page is not supported for firefox 3.0.6. Let me know the solution of this problem.

Thanks
Mani


Pavlina
Telerik team
 answered on 13 Aug 2010
2 answers
144 views
Hi,

I am intending on making a dock expand to a bigger size upon clicking the content, is there any possible way you could help me with going about this task.

Any help is appreciated,

Ash.
Ashley
Top achievements
Rank 1
 answered on 13 Aug 2010
1 answer
202 views
When I use the fileupload, the control alerts the 'file already exists' message for each attempted file upload. That is, when the overwrite checkbox has not been checked. You upload three files that exists, and it tells you three times that the file exists. ("file already existsfile already existsfile already exists"). Is there some way I can make it say 'File(s) already exist' just once?

Then I tried the one online at the telerik site and i just says 'page not found' when I upload a file that's on the site already.

Finally I tried my local version, the demos installed on my machine and it will not allow me to upload. I assume it's a file access-issue, but I've googled it and tried setting full access for several (the obvoius system asp.net ones) of my users, but I can't seem to find the right one. Anyone who knows which user to allow (II7.5 - Windows 7 - .Net4)?
Fiko
Telerik team
 answered on 13 Aug 2010
1 answer
69 views
Hello,  I am trying out the new reminder feature in Q2 2010.  I have created a function for both OnReminderDismiss and OnReminderSnooze server side.  When I set breakpoints in both these events I am only catching the breakpoint on OnReminderDismiss.  The client side event for OnClientReminderSnoozing is firing off ok.  Just not catching anything server side for the snooze.

Here is some of the code I am using:

Client Side:
        onreminderdismiss="MyScheduler_ReminderDismiss"
        onremindersnooze="MyScheduler_ReminderSnooze">
        <AdvancedForm Modal="true" /><Reminders Enabled="true" />

Server Side:
    protected void MyScheduler_ReminderDismiss(object sender, ReminderDismissEventArgs e)
    {
        Reminder rem = e.Reminder;
        Appointment app = e.Appointment;
        Appointment appMod = e.ModifiedAppointment;
    }
    
    
    protected void MyScheduler_ReminderSnooze(object sender, ReminderSnoozeEventArgs e)
    {
        Reminder rem = e.Reminder;
        Appointment app = e.Appointment;
        Appointment appMod = e.ModifiedAppointment;
    }
Veronica
Telerik team
 answered on 13 Aug 2010
1 answer
116 views
Hello Sir,

I am using usercontrol in radtooltip as a modality control.

In usercontrol Search facility is availabel.
But when click on search button tooltip is close.

RadGrid is using in usercontrol. and is bind according to search criteria.

So Please give me solution for that when i click in the on search button tooltip will not close.

On particular event or on button tooltip will close.

thanks.

Kishor Dalwadi.
Svetlina Anati
Telerik team
 answered on 13 Aug 2010
1 answer
125 views
Hi telerik team,

In my application i'm using raddatepicker in Radtabpanel.
when ever i'm selecting another tab, raddatepicker is not displaying proplerly.
some time it is displaying correctly and some time it is not displaying

we already tried this

TextEditJoiningDate.Calendar.EnableAjaxSkinRendering =

 

True

 

TextEditJoiningDate.DateInput.EnableAjaxSkinRendering =

 

True


i'm using vs.net 2010 and IE8 and Q3-2009-.Net3.5 version Telerik Controls

here i'm attaching the snapshot,please have a glance on it and provide me some solution.

Dimo
Telerik team
 answered on 13 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?