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);
}
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
| 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!
| <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> |
| var oManager = GetRadWindowManager(); |
| CloseOpenWindowFromParent(); |
| var window = oManager.open(Path, "_branchWindow"); |
| window.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close); |
| window.set_visibleTitlebar(true); |
| window.Maximize(); |
| menuItemL1.ImageUrl = "menu/icon-home.gif" |
| menuItemL1.HoveredImageUrl = "menu/icon-home-hover.gif" |
| menuItemL1.SelectedImageUrl = "menu/icon-home-selected.gif" |