Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
425 views

In FormTemplate I place combobox that select value from LinqDataSource, I want to find Selected Row’s Key value inside Linq’s selecting event at server side that will fire when user click on Add/Edit row in grid.

 

My code is.

 

<asp:LinqDataSource ID="linq_Students" runat="server"  

ContextTypeName="dbLibrary.StudentDataContext"

TableName="tbl_Students" OnSelecting="linq_Student_Selecting">            

</asp:LinqDataSource>

 

<telerik:RadGrid ID="gv_Student" runat="server"...

<MasterTableView...

<Columns>

...

</Columns>

<EditFormSettings...

      <FormTemplate>

<telerik:RadComboBox ID="list_Students" runat="server" SelectedValue='<%# Bind("StudentID") %>' DataSourceID="linq_Students"

DataTextField="StudentName" DataValueField="StudentId">

</telerik:RadComboBox>

 

...

 

 

 

protected void linq_Student_Selecting (object sender, LinqDataSourceSelectEventArgs e)

{

      Here I want to find Key Value.

}

 


With ASP Grid we can obtain the same behaviour using following technique.

 

<asp:LinqDataSource ID="linq_Students" runat="server"  

ContextTypeName="dbLibrary.StudentDataContext"

TableName="tbl_Students" OnSelecting="linq_Student_Selecting">

<SelectParameters>

            <asp:ControlParameter ControlID="ASPGridName" DefaultValue="0"

                  Name="StudentID" PropertyName="SelectedValue" 

Type="Int32"/>

       </SelectParameters>

</asp:LinqDataSource>

 

protected void linq_ContactPersons_Selecting(object sender, LinqDataSourceSelectEventArgs e)

{

Console.WriteLine(e.SelectParameters.ElementAt(0).Value);

}

Dharmesh Barochia
Top achievements
Rank 1
 answered on 09 Nov 2009
3 answers
173 views
I think its really nice that the RadWindow can be used as a div-like control container.  This works nice when there is just one or two windows on the webpage.  However, I need to create about 4 "dashboards" on my webpage.  With the RadWindow I need to end the content templates to place controls onto the window.  With 4 windows on the page tings do nto lineup correctly.  I also have to expand the template editor on all 4 windows to see what the whole page looks like. 

Are there any guidlines to using the RadWindow in my scenarion or should I be using a different apporach??

Thanks in advance!
Georgi Tunev
Telerik team
 answered on 09 Nov 2009
3 answers
189 views

Hi,

     I am using RadWindowManager to open radwindows and I'm opening the window from clientside (i.e from javascript). On test, I have noticed that the rad window loads in its first call status and not get refreshing on its consecutive calls with new values when i pass the same querstring. The window should reload (actually the page load event of radwindow itself not called in the consecutive calls) so that i can show the values updated in the previous load.

To achieve this I used ReloadOnShow="true", its working but the page is get loaded 2 times, which takes double time to load the radwindow. So I tried to use ReloadOnShow="false" and PreserveClientState="false". Now the expected behavior is working. But if I refresh the page the page load is not get loaded again (ie, radwindow get loaded in its previous state). What I need to load the page with current state without loading it double time. I don’t like to use some random numbers in querystring as a parameter. Is there any better solution than this?

Please help me

Georgi Tunev
Telerik team
 answered on 09 Nov 2009
1 answer
112 views
Hi,

i am new to Rad Editor , can we hide the tools in the Rad editor.

can we write our own functionalities for our tools?

thanks,
mano
Princy
Top achievements
Rank 2
 answered on 09 Nov 2009
1 answer
150 views
I am having an issue retaining the values in a popup form if the save of the underlying object is not successful.  Specifically, I am using a custom ObjectDataSource and handling its Inserting event.  I then attempt to create a new object, bind it's value to those found on the popup's controls, and save the object in a try/catch block.

If the save throws an exception, I set a class level variable (_errorOccurred) to true.  Then, I handle the Grid's ItemUpdated event as shown below:

 

 

protected void RadGrid1_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)  
{  
   e.KeepInEditMode = _errorOccurred;  
}  
 


What this does is keeps the popup open, which works great.  However, all of the values are lost, and the user has to re-enter all of the values.

How do I retain the values in the popup in this case?

Thanks!

 

Yavor
Telerik team
 answered on 09 Nov 2009
1 answer
175 views
Hello,
Is the OnClick event  for the sitemap control missing by design ?

As I was hoping one was there so that I could use it in the following senarios...

  1)  Dynamically change the URL links 
  2)  Deny access on specifc links based on a users security level.

If it is possible please could you advise as to how i can do this

Cheers

Pete 
Paul
Telerik team
 answered on 09 Nov 2009
1 answer
139 views
The Title says it all.
I have an existing window:
<telerik:RadWindowManager ID="_windowBranch" runat="server" Behaviors="Close" VisibleTitlebar="true" > 
            <Windows> 
                <telerik:RadWindow ID="_branchWindow" VisibleStatusbar="false" VisibleTitlebar="true" runat="server" 
                  RestrictionZoneID="zone" ShowContentDuringLoad="false" Behaviors="Close"  /> 
            </Windows> 
        </telerik:RadWindowManager> 

Which I'm opening clientside:
var oManager = GetRadWindowManager(); 
            CloseOpenWindowFromParent(); 
            var window = oManager.open(Path, "_branchWindow"); 
            window.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close); 
            window.set_visibleTitlebar(true); 
            window.Maximize(); 


The Titlebar is always missing if I open it Maximized.  If don't open it maximized the Titlebar is not missing.




Georgi Tunev
Telerik team
 answered on 09 Nov 2009
4 answers
118 views
Hi,

I want to know how to modify the cells in the sorted column of the RadGrid. I've tried many ways using the Visual Style Builder, but with no success.

Thanks in advance,

Simón de Lizarza
Simón
Top achievements
Rank 1
 answered on 09 Nov 2009
2 answers
135 views
I use wcf function to bind grid via client.(like this example http://demos.telerik.com/aspnet-ajax/grid/examples/client/declarativedatabinding/defaultcs.aspx). I can load data without any problem. But column grouping was not work.
anyone help me or any sample?

eitan
Top achievements
Rank 1
 answered on 09 Nov 2009
1 answer
103 views
Assume you assign an image to your menu item as such:

menuItemL1.ImageUrl = "menu/icon-home.gif" 
menuItemL1.HoveredImageUrl = "menu/icon-home-hover.gif" 
menuItemL1.SelectedImageUrl = "menu/icon-home-selected.gif" 

 


When you hover over the menu item the Hovered image displays fine but once you select a menu item and then hover over it again the hover image is not rendered - it remains on the selected menu image. This is not correct.

Thanks for the help.


 

 

Yana
Telerik team
 answered on 09 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?