﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Server-side</title><link>http://www.intersoftsolutions.com/Community/Tags/Server-side/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Create WebGrid in Server-side programmatically but Error in Sorting</title><link>http://www.intersoftsolutions.com/Community/Tags/Server-side/</link><pubDate>Thu, 30 Mar 2017 03:31:50 GMT</pubDate><dc:creator>uwei</dc:creator><category>Server-side</category><category>error</category><category>sorting</category><category>retrive</category><description>&lt;p&gt;I want to sort when user click colums, but there is error when it clicked. (see attach: Error01.png)&lt;/p&gt;&lt;p&gt;I write the code by&amp;nbsp;&lt;a href="http://www.intersoftsolutions.com/Support/WebGrid/Tutorial/Text/Create-WebGrid-in-Server-Side-programmatically/" target="_blank" style="font-size: 10pt;"&gt;http://www.intersoftsolutions.com/Support/WebGrid/Tutorial/Text/Create-WebGrid-in-Server-Side-programmatically/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;There is not struncture of root table in webgrid.&lt;/p&gt;&lt;p&gt;only the code like:&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGrid&amp;gt;
&amp;lt;LayoutSettings RowHeightDefault="26px" AllowSorting="Yes"&amp;gt;
...
&amp;lt;/LayoutSettings&amp;gt;
&amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;How can I fix it?&lt;/p&gt;</description></item><item><title>Remove column defined in aspx markup, from server-side</title><link>http://www.intersoftsolutions.com/Community/Tags/Server-side/</link><pubDate>Tue, 16 Apr 2013 16:03:03 GMT</pubDate><dc:creator>sinan.biondic@gmail.com</dc:creator><category>WebGrid</category><category>DataSource</category><category>Server-side</category><category>serverside</category><category>dynamically</category><category>column</category><category>remove</category><category>Unbound</category><category>DataBind</category><category>collection</category><category>datatable</category><category>PrepareDataBinding</category><category>aspx</category><category>server</category><category>side</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to implement webgrid but the problem exists when I'm binding it to datasource. I have a stored procedure that returns some data.However, I don't know how many columns will be returned in that procedure, but I know the names of all columns that can be returned. So what I wanted to do, is to define all possible columns in aspx page, and in server-side PrepareDataBinding method remove columns from webgrid's column collection that don't have their match in datasource datatable that I'm binding it to.&lt;/p&gt;
&lt;p&gt;This doesn't really work as I get an error stating that columne "XYZ" which is defined in aspx can't be found in datasource, although it was removed (I checked with debugger) in PrepareDataBinding event handler.&lt;/p&gt;
&lt;p&gt;I presume this then is not possible, or am I wrong? The reason I am not creating columns from codebehind is simply that I would have to check datasource for every column to see if it exists and then create that column dynamically and add it to the column collection of webgrid. We did that in old version of our application and that PrepareDataBinding method has over 1600 lines of code, so I am looking for a better way of doing this. Please help me for the love of god!&lt;/p&gt;
&lt;p&gt;This is my PrepareDataBinding method (column named "Check" is rowchecker column so i don't want it removed):&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;Dim dt As DataTable = CType(e.DataSource, DataTable)
 Dim grid As WebGrid = CType(sender, WebGrid)
 Dim colName As String
 For Each col As WebGridColumn In grid.RootTable.Columns
 colName = col.DataMember
 If Not colName = "Check" AndAlso Not dt.Columns.Contains(colName) Then
 grid.RootTable.Columns.Remove(col)
 End If
 Next&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p /&gt;
&lt;p /&gt;</description></item><item><title>Unbound WebGrid example wanted / Help on common design</title><link>http://www.intersoftsolutions.com/Community/Tags/Server-side/</link><pubDate>Mon, 07 Jun 2010 12:13:20 GMT</pubDate><dc:creator>Eric</dc:creator><category>WebGrid</category><category>Server-side</category><category>WebGrid 6</category><category>Unbound</category><category>example</category><category>postback</category><category>new row</category><category>add row</category><description>&lt;p&gt;Hi, I have a screen with lots of controls and one list of items. This item list is shown in a WebGrid. I have two buttons to add and remove items into/from that list. When adding, another modal dialog pops up to select the correct item. When deleting, this is done by a checkbox column in the grid. And there's a save button on the form to save all data together back to the database. When a new row gets added to the WebGrid, this may not be saved to the database at that time, only later, if the user clicks on Save.&lt;/p&gt;
&lt;p&gt;I had to make bigger changes of this existing (working) page, because of bad design. Actually I almost had to rewrite it.&lt;/p&gt;
&lt;p&gt;In Page.Load I read in all data from the database (including the list of items) and store this in a local structure. I do not want to use session variables. Storing data in ViewState would be ok.&lt;/p&gt;
&lt;p&gt;What is the correct way of implementing something like this? It seems to be a standard problem. Is there a demo for this available somewhere? Should I make the WebGrid somehow unbound?&lt;/p&gt;
&lt;p&gt;In Page.Load I read in the data. And in grid.&lt;span style="font-size: 13px"&gt;InitializeDataSource I set the e.DataSource to the values from what I read in Page.Load earlier (by creating a table and assigning it). On Postback, I cannot read in the data again, because this would overwrite the current data. So after a Postback, the internal variable doesn't contain any data anymore. When clicking on Save, I save all fields back to the database. Is this design correct so far?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 13px"&gt;But how would I implement the insert/delete of the rows to the WebGrid? For the Add button (&amp;lt;asp:Button&amp;gt;) I &lt;/span&gt;have an attribute like this: OnClientClick="ModalDialog(...&lt;/p&gt;
&lt;p&gt;In the click handler on the server side I read the ID of the selected item from a session variable (still bad design, but unchanged), which was set in the selection dialog, then get some more info from the DB and I think then I should add this data as a row to the WebGrid. Is that correct? How would I add this row? In the Button click event adding a row to the grid.RootTable? And even if this would work, how should I afterwards refresh the grid?&lt;/p&gt;
&lt;p&gt;Please help getting this designed correct with your control. We are using WebGrid version 6.0.7200.218. An example would be even better. But just help on the design is also ok. I think because this is a common problem, maybe there is already an example somewhere.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Unbound Server and client side creation</title><link>http://www.intersoftsolutions.com/Community/Tags/Server-side/</link><pubDate>Fri, 12 Feb 2010 12:16:35 GMT</pubDate><dc:creator>twor</dc:creator><category>WebCombo</category><category>Server-side</category><category>Client</category><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Im trying a cenario with webcombo box, and til now a could get all running correctly.&lt;/p&gt;
&lt;p&gt;I was wondering if someone could give me an example of a unboud combo that gets its rows added in client side and another example in server side.&lt;/p&gt;
&lt;p&gt;But i want this example of data:&lt;/p&gt;
&lt;p&gt;text: item 1, value:1&lt;/p&gt;
&lt;p&gt;text: item 2, value:2&lt;/p&gt;
&lt;p&gt;and then i wanto to be able in client side and server side to get the onselecteditem the value of combo.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Can anyone help me?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Tanks&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title> Expanded property row server-side</title><link>http://www.intersoftsolutions.com/Community/Tags/Server-side/</link><pubDate>Wed, 19 Aug 2009 06:47:26 GMT</pubDate><dc:creator>cymap</dc:creator><category>Server-side</category><category>Expand row</category><description>&lt;div dir="ltr" style="text-align: left"&gt;Thank you very much, &lt;/div&gt;
&lt;div dir="ltr" style="text-align: left"&gt;but I needed to know if there is a server-side property. &lt;br /&gt;&lt;br /&gt;Greetings. &lt;br /&gt;&lt;br /&gt;Agustin.&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left"&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left"&gt;--------------------------------------------------------------------------------&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left"&gt;&lt;/div&gt;
&lt;div dir="ltr" style="text-align: left"&gt;&lt;hr color="#c0c0c0" size="1" /&gt; &lt;table class="NoBorder" width="100%"&gt;
&lt;tbody&gt;&lt;tr _id="99992745" _userid="1748"&gt;
&lt;td class="NoBorder" style="width: 10%"&gt;&lt;/td&gt;
&lt;td class="NoBorder"&gt;&lt;table class="FullThreadTable" id="99992745_Date" style="margin-left: 0px; background-color: #c0c0ff"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class="FullThreadTD"&gt;Tuesday, August 18, 2009 3:10 AM &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table class="FullThreadTable" id="99992745_Content" style="margin-left: 0px; background-color: #c0c0ff"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class="FullThreadTD" style="width: 20%; text-align: center" rowspan="2"&gt;&lt;img id="2745" height="35" src="http://dev2.intersoftpt.com/Images/Person-32.gif" width="35" /&gt; &lt;br /&gt;Carlos Gimenez &lt;br /&gt;CYMAP S.L. &lt;br /&gt;&lt;br /&gt;Joined on Nov 20, 2007 &lt;br /&gt;Spain &lt;/td&gt;
&lt;td class="FullThreadTD" style="font-weight: bold" name="99992745_Name"&gt;&lt;a id="99992745_Subject"&gt;Expanded property row &lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;
&lt;td class="FullThreadTD"&gt;&lt;div class="MessageContent"&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal"&gt;&lt;span lang="undefined" style="font-size: 12pt; color: black; font-family: 'courier new'; mso-fareast-font-family: 'times new roman'; mso-ansi-language: en-us; mso-fareast-language: es"&gt;Hello. 
&lt;p&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal"&gt;&lt;span lang="undefined" style="font-size: 12pt; color: black; font-family: 'courier new'; mso-fareast-font-family: 'times new roman'; mso-ansi-language: en-us; mso-fareast-language: es"&gt;&lt;br /&gt;I would like to know which rows are expanded in a grid. &lt;br /&gt;I have searched properties in wedgrid.Rootable.rows (0) but not property that can be, and I suspect that all are false. &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; color: black; font-family: 'courier new'; mso-fareast-font-family: 'times new roman'; mso-fareast-language: es"&gt;Use LoadOnDemand. &lt;br /&gt;&lt;br /&gt;Thank you very much. 
&lt;p&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal"&gt;&lt;span style="font-size: 12pt; color: black; font-family: 'courier new'; mso-fareast-font-family: 'times new roman'; mso-fareast-language: es"&gt;&lt;br /&gt;Agustin. 
&lt;p&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span style="font-family: 'arial','sans-serif'"&gt;
&lt;p&gt;&lt;span color="#000000" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/td&gt;
&lt;td class="NoBorder" style="width: 10%"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr _id="3799" _userid="1605"&gt;
&lt;td class="NoBorder" style="width: 10%"&gt;&lt;/td&gt;
&lt;td class="NoBorder"&gt;&lt;table class="Alt" id="3799_Date" style="margin-left: 50px"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class="FullThreadTD"&gt;Wednesday, August 19, 2009 3:05 AM &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table class="Alt" id="3799_Content" style="margin-left: 50px"&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class="FullThreadTD" style="width: 20%; text-align: center" rowspan="2"&gt;&lt;img id="3799" height="35" src="http://dev2.intersoftpt.com/Images/Person-32.gif" width="35" /&gt; &lt;br /&gt;Handy Surya &lt;br /&gt;Intersoft Solutions &lt;br /&gt;&lt;br /&gt;Joined on Jun 5, 2007 &lt;br /&gt;Indonesia &lt;/td&gt;
&lt;td class="FullThreadTD" style="font-weight: bold" name="3799_Name"&gt;&lt;a id="3799_Subject"&gt;Re: Expanded property row &lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;
&lt;td class="FullThreadTD"&gt;&lt;div class="MessageContent"&gt;
&lt;p&gt;Hello Agustin,&lt;/p&gt;
&lt;p&gt;For now, we don't have special method about that. Only property. You will need to loop the first row until the last row and check the property if it is expanded or not.&lt;/p&gt;
&lt;p&gt;grid.RootTable.GetRow(i).ChildExpanded;&lt;/p&gt;
&lt;p&gt;Btw, thanks for your posting in here. However, for the next time issue, could you please post your questions in our new forum? We'll answer your questions there. &lt;a href="http://www.intersoftpt.com/Community"&gt;http://www.intersoftpt.com/Community&lt;/a&gt;&lt;span color="#808000"&gt;&lt;span color="#808000"&gt;&lt;p&gt;&lt;span color="#000000"&gt;Regards,&lt;br /&gt;Handy&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span color="#000000"&gt;Regards,&lt;br /&gt;Handy&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</description></item></channel></rss>