Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
1.9K+ views
Ok, I am at wits end and hope someone can help me because I cannot figure out this problem.

I have a RadUpload in a nestedviewtemplate of a RadGrid that I want to use to store PDF, XLS, DOC, etc. files to my database.  At present I am using the development SQL Server Express 2008 with VS2008.  Originally I went to fast and easy by using SQLDataSources to drive my grids and provide the select, update, and insert funcitonallity but intermittently received the error:

Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query.


After searching around the Telerik site I stumbled on the Upload and open documents in a SQL database demo in the code library, took some time wrapping my head around the C# code and figured out what made it tick.  This worked flawlessly for every file I tried to upload so I thought, this is it!  I converted this demo app to work with my SQL Express table, added the extra fields I wanted stored with my data, popped a reference to the FileUpload.BLL into my application and finally got everything running as expected, well until I tried to upload a file and blast you implict conversion!

I then spent even more time researching the interweb for a possible solution to this problem and found some vague reference to converting the System.Link.Data.Binary to a byte[] array and changed the FileUpload.BLL line from:

private System.Data.Linq.Binary _FileBinary; to private byte[] _File_Data;

and then changed the inserting code from:

 fileStorage.File_Data = new System.Data.Linq.Binary(file.File_Data);

to:

 fileStorage.File_Data = (byte[])file.File_Data.ToArray();

I rubbed my hands together gleefully, fired up the app, inserted a file and.....BLAST IT, error again.

Well, now I am all out of ideas as to what is throwing this error and have no clue what to try next.  Even with all of that, know what the kicker is?  My record is apparently saving in the database and the binary data appears to be there since I can hit the back button, refresh the grid and there it is.  So, please one of you smarter than me folks tell me what I can do to get this working, even if it is just surpressing this error.  I REALLY need this database online to track my project.
Dave
Top achievements
Rank 1
 answered on 18 Sep 2009
2 answers
192 views
Dear all,
is possible to specify something like "best-fit" - autosize for column width?

We are searching a new grid component and this is fundamental question for us.

Thank you for answer.

Best regards,
  David Mensik.
Randy
Top achievements
Rank 1
 answered on 18 Sep 2009
3 answers
169 views
When I  try to upload a document,I am getting this error.

Radupload Ajax callback error.source url returned error :12031

unknown
.../../Telerik.RadUploadProgressHandler.ashx

 

Did you register the RadUploadProgressHandler in web.config?


Can someone please help me..I am using asp.net 3.5

ManniAT
Top achievements
Rank 2
 answered on 18 Sep 2009
1 answer
122 views
Hi,

is there a way to rebind MasterTableView after DetailTables collapsed?
This should be done after client OnCommand event fires.

Thanks in advance. 

Schlurk
Top achievements
Rank 2
 answered on 18 Sep 2009
4 answers
127 views
AFTER updating the Telerik from version 701 to 826, 
(RadControls_for_ASP.NET_AJAX_2009_2_701_dev to
 RadControls_for_ASP.NET_AJAX_2009_2_826_dev)

on every postbacks the width of the columns is shrinking.
First time by 40%, then 30% and so on (I did not check up to what size).
That is, in a few postbacks, the grid becomes very very small.
If I remove from the setting: 

 

RadGrid1.ClientSettings.Resizing.AllowColumnResize = true

 

then no shrinking on postbacks as well as no resizing.
What is wrong with version 2009.2.826 ?

Ildar

Dimo
Telerik team
 answered on 18 Sep 2009
1 answer
183 views
Hey,

I have a javascript function (below) that calls the RadGrid1_ItemCommand.  In all instances in which there is any data currently in my radgrid the firecommand works perfectly.  However, if there is no data in the grid yet the firecommand never reaches the RadGrid1_ItemCommand method.  Can someone explain why this is the case?  Any suggestions on how to make the fireCommand fire in instances in which there is not yet data in the grid?

Thanks for any insight!  Winston

 

function Insert()

 

{

 

var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();

 

masterTable.fireCommand(

"Insert","");

 

}


Schlurk
Top achievements
Rank 2
 answered on 18 Sep 2009
4 answers
132 views
I have a grid that's declared in the ASPX and I want to create the columns in the codebehind. I think I'm doing exactly waht's in the documentation but all I get is an empty box displaying. Here's my code:

In the ASPX:

<radG:RadGrid ID="RadSummary" runat="server" AllowSorting="True" AutoGenerateColumns="false">

 

 

    <MasterTableView AutoGenerateColumns="false" AllowNaturalSort="False"></MasterTableView>

 

 

    <ClientSettings AllowColumnsReorder="true" ApplyStylesOnClient="False" EnablePostBackOnRowClick="false">

 

 

        <Selecting AllowRowSelect="false" />

 

 

    </ClientSettings>

 

 

</radG:RadGrid>


In the code-behind in the clicked event of a button I have:

GridBoundColumn

 

boundColumn = new GridBoundColumn();

 

RadSummary.MasterTableView.Columns.Add(boundColumn);

boundColumn.HeaderText = "Column 1;

 

 

RadSummary.DataBind();

 


I want this grid to display with no datarows - just the column headings, but when the event fires to add the columns nothing (visible) happens. What am I doing wrong - does the grid need to be bound to some datasource before it will display?

 

 

bgoldca
Top achievements
Rank 1
 answered on 18 Sep 2009
3 answers
485 views
Hello,

I'm having issues with the RadGrid. I'm loading data in a Grid and at times, certain columns need to be hidden dynamically.

For example, the user selects such by "A" and we want to hide a column because that data is not related to search "A" but the rest of the columns are.

The issue is when the hidden column, using display none (because you may want to interact with the column still; javascript, print, etc.), has successors (columns that follow) everything gets hidden.

For example, a grid has columns A, B, C, D. You set column "B" to be display none via C# in the code behind of an aspx page and now columns B, C, D disappear as well. Think of it as the display none property / setting of column B cascades through columns C and D.

Is this a bug and if so is there a plan to resolve it in the next release?

Thanks, assistance is appreciated.
Schlurk
Top achievements
Rank 2
 answered on 18 Sep 2009
3 answers
392 views
Hi,

I saw your example about the SkinChooser combobox of the RadSkinManager.

In this example you show how to remove some skin, but no how to add new one.

so it's possible to add new Skin in the RadSkinManager and how.

Thanks.
Sebastian
Telerik team
 answered on 18 Sep 2009
2 answers
286 views
I want to put a label on a toolbar.

I  tried adding a button and disabling it (so the user couldn't click on it) but it looks deadful ('cos of what IE does to the text when the object's been disabled).

Can anyone think of a way of adding a bog-standard asp:Label to a toolbar that doesn't cause any toolbar events?

--
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 18 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?