Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
208 views

Is it possible to return a parentID values that are loaded dynamically (MS SQL server)?

I’m using the code below but I’m only getting values from the items that are within the tab.

    Protected Sub RadPanelbar_ItemClick(ByVal sender As Object, ByVal e As Telerik.WebControls.RadPanelbarEventArgs) Handles RadPanelBar.ItemClick

 

        Dim ItemClicked As Telerik.WebControls.RadPanelItem = e.Item

 

 

        End Select

 

        Response.Write("Server event raised -- you clicked: " + CStr(ItemClicked.Value))

 

    End Sub

Rosi
Telerik team
 answered on 07 May 2008
5 answers
311 views
Hi All,

I'm trying to get one ajax panel to cause another ajax panel to update its content when both ajax panels are children of a user control in two different ajax panels on that control.

It seems to work fine in the code behind and no errors are displayed. But on the page nothing updates.

Then if you interact with the ajax panel control that is meant to change and cause a postback it then shows the changes that were meant to be there.

Is it possible for two child ajax panels to interact with each other?

cheers
Adam.
Rosen
Telerik team
 answered on 07 May 2008
4 answers
196 views
Is there a way to set the width on a RadTextBox and not have it grow if the entered text is longer than that width?

I am using a RadTextBox in a RadGrid.  I have set the width to 200px for the textbox itself.  However, if the user enters a bood bit of text, the textbox will grow out to the right thus making the entire grid grow to the right - and off the edge of the screen.

Thanks,
David Martin
Sebastian
Telerik team
 answered on 07 May 2008
3 answers
96 views
I took the sample code on the website and modified it to add an array of items. Basically I have an array of strings and for each stirng in that array add a new RadDock control to the RadDockZone and have the RadDock's text property = the string value in the array.
From the originial code I have only modified the code below.
This sounds simple enough but for some reason only the first item in the array is being added to the RadDockZone.
So I'm guessing it has to do something with the order of precedence?

private void AddDocks(string text)  
        {  
            RadDock dock = CreateRadDock(text);  
            //In order to optimize the execution speed we are adding the dock to a   
            // hidden update panel and then register a script which will move it  
            // to RadDockZone1 after the AJAX request completes. If you want to   
            // dock the control in other zone, modify the script according your needs.  
            UpdatePanel1.ContentTemplateContainer.Controls.Add(dock);  
 
            ScriptManager.RegisterStartupScript(  
            dock,  
            this.GetType(),  
            "AddDock",  
            string.Format(@"function _addDock() {{
    Sys.Application.remove_load(_addDock);
    $find('{1}').dock($find('{0}'));
    $find('{0}').doPostBack('DockPositionChanged');
}};
Sys.Application.add_load(_addDock);", dock.ClientID, RadDockZone1.ClientID),  
            true);  
 
            //Right now the RadDock control is not docked. When we try to save its state  
            // later, the DockZoneID will be empty. To workaround this problem we will   
            // set the AutoPostBack property of the RadDock control to true and will   
            // attach an AsyncPostBackTrigger for the DockPositionChanged client-side  
            // event. This will initiate second AJAX request in order to save the state  
            // AFTER the dock was docked in RadDockZone1.  
            CreateSaveStateTrigger(dock);  
        } 

protected void ButtonAddDock_Click(object sender, EventArgs e)  
        {  
            List<string> array = new List<string>();  
            array.Add("test1");  
            array.Add("test2");  
            array.Add("test3");  
 
            for (int i = 0; i < array.Count; i++)  
            {  
                AddDocks(array[i].ToString());  
            }  
        } 

private RadDock CreateRadDock(string text)  
        {  
            int docksCount = CurrentDockStates.Count;  
 
            RadDock dock = new RadDock();  
            dock.UniqueName = Guid.NewGuid().ToString();  
            dock.ID = string.Format("RadDock{0}", dock.UniqueName);  
            dock.Title = "Dock";  
            dock.Text = text;  
            dock.Width = Unit.Pixel(300);  
 
            dock.Commands.Add(new DockCloseCommand());  
            dock.Commands.Add(new DockExpandCollapseCommand());  
            dock.Command += new DockCommandEventHandler(dock_Command);  
 
            return dock;  
        } 
Sophy
Telerik team
 answered on 07 May 2008
1 answer
80 views
Hi,

We have a situation where our testers have found that, if they undock a window so it's floating, they can then grab the window and fling it off-screen. As the position of the dock is saved in viewstate, the dock remains off-screen and you can't get it back.

Is there any way of preventing a user from dragging beyond the screen bounds without us have to develop custom code to do this?

Thanks,

.s
Ubong
Telerik team
 answered on 07 May 2008
11 answers
361 views

I come accross a bug (or at least i think it is)

First I need to ask -does the latest RagGrid 2008 Q1 'futures build' support LINQ datasources   -or code linq generated queries from codebehind?

If not then when binding a RadGrid to LINQ datasource -an error occurs when paging...


The state information is invalid for this page and might be corrupted.

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 state information is invalid for this page and might be corrupted.

Source Error:

[No relevant source lines]

Source File: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\b7fbaab6\a8202dcc\App_Web_0goxrvq9.0.cs    Line: 0

Assembly Load Trace: The following information can be helpful to determine why the assembly 'DynamicClasses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileNotFoundException: Could not load file or assembly 'DynamicClasses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.]
   System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +78
   System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58
   System.Type.GetType(String typeName, Boolean throwOnError) +57
   System.Web.UI.ObjectStateFormatter.DeserializeType(SerializerBinaryReader reader) +175
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +732
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +1283
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +198
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +210
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +210
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +210
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +198
   System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) +142

[ArgumentException: The serialized data is invalid.]
   System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) +206
   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +342
   System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4
   System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
   System.Web.UI.HiddenFieldPageStatePersister.Load() +136

[ViewStateException: Invalid viewstate. 
	Client IP: 127.0.0.1
	Port: 
	User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 3.5.21022; InfoPath.2)
	ViewState: /wEPDwUJLTQwNDg2NzM0D2QWAgIDD2QWBAIDDzwrAA0CABQrAAIPFggeF0VuYWJsZUFqYXhTa2luUmVuZGVyaW5naB4LRWRpdEluZGV4ZXMWAB4LXyFJdGVtQ291bnQCAR4LXyFEYXRhQm91bmRnZBcBBQ9TZWxlY3RlZEluZGV4ZXMWAAEWAhYKDwIMFCsADBQrAAUWBB4Eb2luZAICHghEYXRhVHlwZRkrAWRkZAULRXJyb3JOdW1iZXIUKwAFFgQfBAIDHwUZKwFkZGQFDEVycm9yTnVtYmVyMhQrAAUWAh8EAgRkZGQFDFJlcG9ydGVkRGF0ZRQrAAUWAh8EAgVkZGQFDURpc2NvdmVyeURhdGUUKwAFFgQfBAIGHwUZKwJkZGQFD0Vycm9yQnJlYWNoVHlwZRQrAAUWBB8EAgcfBRkrAmRkZAUMRXJyb3JEZXRhaWxzFCsABRYCHwQCCGRkZAUIQ2xvc2VkWU4UKwAFFgIfBAIJZGRkBQ1Fc3RpbWF0ZWRDb3N0FCsABRYCHwQCCmRkZAUKQWN0dWFsQ29zdBQrAAUWBB8EAgsfBRkrAmRkZAUSQ29tcGFueVJlc3BvbnNpYmxlFCsABRYEHwQCDB8FGSsCZGRkBQZDbGllbnQUKwAFFgQfBAINHwUZKwJkZGQFC0NvbXBsZXRlZEJ5ZGUUKwAACyl5VGVsZXJpay5XZWIuVUkuR3JpZENoaWxkTG9hZE1vZGUsIFRlbGVyaWsuV2ViLlVJLCBWZXJzaW9uPTIwMDguMS4zMjUuMzUsIEN1bHR1cmU9bmV1dH...]

[HttpException (0x80004005): The state information is invalid for this page and might be corrupted.]
   System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +267
   System.Web.UI.HiddenFieldPageStatePersister.Load() +218
   System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83
   System.Web.UI.Page.LoadAllState() +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
   System.Web.UI.Page.ProcessRequest() +86
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.modules_errors_errorsloglist_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\b7fbaab6\a8202dcc\App_Web_0goxrvq9.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


-however -it works fine for other datasources.
Vlad
Telerik team
 answered on 07 May 2008
10 answers
493 views
I've been working on this for a couple days now and I'm stumped.  I have a RadGrid on my page and I've set the OnSelectedIndexChanged event to a method that I've created.  But when I select a row it just refreshes the page.  If I run in debug mode it doesn't execute the method I've defined.  If I look at the SelectedValue it's null, the SelectedIndexes.Count = 0, the SelectedItems.Count = 0.  What am I missing here?  This is fairly trivial to do with GridView, so I'm shocked it's causing me such a headache in RadGrid...  I'd really like to be able to just select a row, not a Select checkbox or button or link.  What I want to do is redirect to a detail page, based on the SelectedValue.

One more related item - is there a way to highlight rows onmouseover?  Again, this is fairly simple to implement in GridView by adding an attribute in the RowDataBound method.  But I've tried the same thing in RadGrid and nothing I try works.  I know there's a "EnableRowHoverStyle" option, but it was left out of the build that I have for some reason, so I need a workaround.

Thanks for the help!
Eddie
Konstantin Petkov
Telerik team
 answered on 07 May 2008
1 answer
83 views
Hello all,
When I use the RadWindow I am having problems with the popup window showing the background of the title bar.
The spacing is correct, and the icons are usually there and function (though they look strange with the Default skin but they work).

In 2007 Q3, I could choose the Monochrome skin and the title bar was right, but the default skin also had the same problem in Q3.

I have read a refernce to using it in an update panel, but I am not using an update panel at all on the page.

The page contains a gridview, and is a content page with a master page, but nothing revolutionary there.

The window seems to popup fine and all functions work, I just cannot get the title bar background to show properly.

Thanks in advance!
Heath
Georgi Tunev
Telerik team
 answered on 07 May 2008
2 answers
161 views
I have a Radgrid on my page:

<

telerik:RadGrid ID="RadGrid1" OnColumnCreated="RadGrid1_ColumnCreated" runat="server" style="text-align: left" AutoGenerateColumns="False" GridLines="None">

<MasterTableView>

<RowIndicatorColumn Visible="False">

<HeaderStyle Width="20px" />

</RowIndicatorColumn>

<ExpandCollapseColumn Resizable="False" Visible="False">

<HeaderStyle Width="20px" />

</ExpandCollapseColumn>

<EditFormSettings>

<PopUpSettings ScrollBars="None" />

</EditFormSettings>

<Columns>

<telerik:GridBoundColumn DataField="SKU" HeaderText="SKU"

UniqueName="gcolumn1" >

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Description" HeaderText="Description"

UniqueName="gcolumn2" >

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Orig Qty" HeaderText="Orig Qty"

UniqueName="gcolumn3" >

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Shiped Qty" HeaderText="Shiped Qty"

UniqueName="gcolumn4" >

</telerik:GridBoundColumn>

</Columns>

</MasterTableView>

</telerik:RadGrid>

I want to allow sorting for just my first column. but code is not working.



Protected Sub RadGrid1_ColumnCreated(ByVal sender As Object, ByVal e As GridColumnCreatedEventArgs) Handles RadGrid1.ColumnCreated

If TypeOf e.Column Is GridHyperLinkColumn Then

Dim col As GridHyperLinkColumn = DirectCast(e.Column, GridHyperLinkColumn)

If col.UniqueName = "gcolumn1" Then

col.SortExpression =

True

End If

End If

End Sub

Shinu
Top achievements
Rank 2
 answered on 07 May 2008
2 answers
166 views
Hi I am trying to update/insert/delete data in the a heirarchical grid from code behind.

I am checking for the dataMember currently to update/insert/delete respectively from master/detail grid.

protected

void myGrid_DeleteCommand(object source, GridCommandEventArgs e)
{

if

(e.Item.OwnerTableView.DataMember == "Orders")
{

DataRow[] deleteRow = AssignmentRailItemDS.Tables["Orders"].Select("OrderID = " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["OrderID"]);
deleteRow[0].Delete();

}

else if (e.Item.OwnerTableView.DataMember == "Products")
{

DataRow[] deleteChildRow = AssignmentRailItemDS.Tables["Products"].Select("ProductID = " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ProductID"]);
deleteChildRow[0].Delete();

}

}

Is this the right approach?
Can I have a working example of the insert/delete operations?

newbie
Top achievements
Rank 1
 answered on 07 May 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?