Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
120 views
im having a composite control with radcombobox inside, the radcombobox include a radgrid (but the same problem happend when i put a radtree instead of it). the problem is that when opening the combobox, theres a javascript error alert: "Script control '' is not registered script control. script control must be registered using registerscriptcontrol before..."

another problem is that when postback to ComboBox_ItemsRequested, OnPreRender is not called & i dont see the radgrid inside the drop down area of the combobox.

i suppose those three porblems are related.

here is the code:

public

 

class BOBComboBox : CompositeControl {
RadComboBox  ComboBox;
protected override void CreateChildControls()

 

 

 {

 

 

  ComboBox =

new RadComboBox();

 

 

 

 ComboBox.ItemsRequested +=

new RadComboBoxItemsRequestedEventHandler(ComboBox_ItemsRequested);

 

 

 

  ComboBox.EnableLoadOnDemand =

true;
  Controls.Add(ComboBox);

 

 

 

  base.CreateChildControls();
}

void
ComboBox_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)

 

 

 

 

 {

 

 

    RadGrid RadGrid = new RadGrid();

 

 

 

 

   RadComboBoxItem RadComboBoxItem = new RadComboBoxItem();

 

 

     RadComboBoxItem.Controls.Add(RadGrid);

     ComboBox.Items.Add(RadComboBoxItem);

 }

 

 



protected
override void OnPreRender(EventArgs e)

 

 

 

{

 

   if (ComboBox != null)

 

 

   { 

 

        RadAjaxManager manager = RadAjaxManager.GetCurrent(this.Page);

        manager.AjaxSettings.AddAjaxSetting(ComboBox, ComboBox);

   }

 

    base.OnPreRender(e);

}

}

 

 

 

 

 

 

 

 

Simon
Telerik team
 answered on 11 Dec 2009
1 answer
942 views
Hi Telerik Team,

I had created a application which will export RAD Grid to CSV File. however i cannot export data with proper formatting which i have given to Grid. My requirement is set the background color of Header to Red. It is properly working if i export data to Excel Sheet. how ever my requirement is export data to CSV with proper Formatting

Here is what i have used

         rgExport.DataSource = timesheetList;
                rgExport.DataBind();
                rgExport.ExportSettings.FileName = NextJobPLConstants.TIMESHEET_EXPORT_FILE;

                
                rgExport.ExportSettings.ExportOnlyData = true;
                rgExport.ExportSettings.IgnorePaging = true;
                rgExport.ExportSettings.OpenInNewWindow = true;
                rgExport.MasterTableView.ExportToCSV();
                rgExport.Rebind();



protected void rgExport_ItemCreated(object sender, GridItemEventArgs e)
    {

     


        if (e.Item is GridHeaderItem)
        {
            GridHeaderItem headerItem = (GridHeaderItem)e.Item;
            headerItem.Style["font-size"] = "12px";
            headerItem.Style["font-style"] = "Verdana";
            headerItem.Style["color"] = "black";
            headerItem.Style["background-color"] = "#99CC00";
            headerItem.Style["border-width"] = "1";
            headerItem.Style["border-style"] = "Solid";
            headerItem.Style["border-color"] = "black";
            headerItem.Style["height"] = "50px";
            headerItem.Style["vertical-align"] = "bottom";
            headerItem.Style["horizontal-align"] = "center";
            foreach (TableCell cell in headerItem.Cells)
            {
                cell.Style["text-align"] = "center";
                cell.Style["font-weight"] = "bold";

            }
        }

        if (e.Item is GridDataItem)
        {
            GridDataItem dataItem = (GridDataItem)e.Item;
            dataItem.Style["background-color"] = "#CCFFFF";
            dataItem.Style["border-width"] = "1";
            dataItem.Style["border-style"] = "Solid";
            dataItem.Style["border-color"] = "black";
            dataItem.Style["font-style"] = "Verdana";

        }
        
    }

Please help me in this matter.

Thanks,

Amol




Daniel
Telerik team
 answered on 11 Dec 2009
1 answer
242 views
 Hi,
 Please can you tell my how I can access the appointment clicked date in a RadScheduler. It is not the Selected date, as this seems to be the same no matter what date I click. You would have thought that this was simple, but apparently not.

Below is the html for my scheduler and the onclick event


 <telerik:RadScheduler ID="RadSchedAbsence"
               runat="server" AllowEdit="False" AllowInsert="False" AllowDelete="False"  Height="550px"
                  Culture="English (United Kingdom)" DataEndField="event_end" DataKeyField="id"
                  DataSourceID="sds_absence_for_scheduler" DataStartField="event_start" DataSubjectField="absence_detail"
                  SelectedView="MonthView" Width="600px" Visible="False" Skin="Vista" OnAppointmentClick="RadSchedAbsence_AppointmentClick" ReadOnly="True" >
                  <TimelineView UserSelectable="False" />
                  <WeekView UserSelectable="False" />
                  <DayView UserSelectable="False" />
              </telerik:RadScheduler>

// On appointment click event

          Servizio.Rota rota = new Servizio.Rota();

        DataTable dtAbsences ;

        dtAbsences = rota.GetAbsencesForDay(Convert.ToInt32(ddl_absenceType.SelectedValue), this.RadSchedAbsence.SelectedDate.ToString("yyyy-MM-dd"));
        //this.sds_absence_by_date.SelectParameters["absence_type_id"].DefaultValue = ddl_absenceType.SelectedValue;
        //this.sds_absence_by_date.SelectParameters["selected_date"].DefaultValue = this.RadSchedAbsence.SelectedDate.ToString("yyyy-dd-MM");

        RadGrid1.DataSource = dtAbsences;

        DataView returnedDataView = (DataView)sds_absence_by_date.Select(DataSourceSelectArguments.Empty);

        RadGrid1.DataBind();

Princy
Top achievements
Rank 2
 answered on 11 Dec 2009
1 answer
127 views
Hallo Telerik-Team,

I need to have a custom paging under my RadGrid like 1 2 3 4 5 6 7 ... without using PagerStyle Mode="NumericPages"></PagerStyle>.

Is there any example how to do this.

regards
Christian
Shinu
Top achievements
Rank 2
 answered on 11 Dec 2009
3 answers
147 views
Hello mates,
I have a little question, just couldn't figure the solution...

The web application have a structure like;
-interface.aspx (Contains Ajaxmanager)
----manageitems.ascx (dynamicly added to interface with loadUserControl approach - not ajaxified-contains ajaxproxy)
-------itembase.ascx  (added to manageitems.ascx as referance - ajaxified inside radajaxpanel)


my save button in the itembase.ascx and when save succeed, triggers a event as saveComplete..
manageitems.ascx contains a grid.

my scenario requires after saveComplete event triggered refresh the grid in the manageitems.ascx, but nothing happens when I ajaxified them.  But not ajaxified version works.

What you suggest for this scenario?

TIA.








Pavlina
Telerik team
 answered on 11 Dec 2009
1 answer
82 views
Hi,

I have a grid with a RadEditor in it.
Everything works fine - except when I use spell checking.
After this my filter "textboxes" are no longer focusable.

Example:
I filter for XXXX - contains - works fine
I edit the record and use spell checking.
---No matter what I do after this (update or cancel)...
When edit mode is ended the filter TextBox is no longer focusable
....
I can use the filter button and select "No filter" - this clears the TextBox.
But I'm still not able to focus it or enter text.

After a page refresh the things work again.

Regards
Manfred
Yavor
Telerik team
 answered on 11 Dec 2009
1 answer
70 views
I've got the following javascript code and a web page with 3 combo boxes (combo1, combo2)

 

function LoadCombo2(combo, eventArqs) {

 

 

        var item = eventArqs.get_item();

 

        _Combo2.set_text(

"Loading...");

 

The above funtion gets fired during combo1's fired OnClientSelectedIndexChanging event, which works fine when the page is initially rendered. But after a 'CancelAll' or cancel command, I get the an error on _Combo2.set_text("Loading...");
In fact, no matter what property or method I try to use for combo2, I get the following javascript error...
        

 

            this.get_element() is null or not an object

Any ideas what is causing this error?  I'm using IE7, RadControls for ASP.NET AJAX Q3 2009

Thanks,
weezie

Veselin Vasilev
Telerik team
 answered on 11 Dec 2009
1 answer
156 views
Hi
I Working on RAD ComboBox with Multiple Selection loading on Demand
I am getting the Data from StoredProc.
RadComboBox1 is getting values from 1StoredProc(CustomerNames);
Problem
RadComboBox2 to has to pop with ID on Demand(Just Like the Ex in Telerik Site)

I used the Example BUT
i unable to get that where i am going wrong
for each and every click(on RadComboBox1) its adding the values(again and again) in RadComboBox2
AND
It is not working basing on CheckBoxs it is working basing the SelectedItem(Click on Item)
plz help me
Where i am going wrong

My Default.CS File

 

using

 

System;

 

 

 

 

using

 

System.Collections.Generic;

 

 

 

 

using

 

System.Linq;

 

 

 

 

using

 

System.Web;

 

 

 

 

using

 

System.Web.UI;

 

 

 

 

using

 

System.Web.UI.WebControls;

 

 

 

 

using

 

System.Data;

 

 

 

 

using

 

System.Data.SqlClient;

 

 

 

 

using

 

Telerik.Web.UI;

 

 

 

 

namespace

 

Combotry

 

{

 

public partial class _Default : System.Web.UI.Page

 

 

 

 

 

{

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

 

if (!Page.IsPostBack)

 

{

 

 

this.RadComboBox1.DataBind();

 

 

this.RadComboBox1.Text = String.Empty;

 

 

//fill the continents combo

 

 

 

 

 

LoadCustomerName();

 

this.Label4.Text = this.RadComboBox1.Text;

 

 

}

}

 

protected void LoadCustomerName()

 

{

 

SqlConnection connection = new SqlConnection("Data Source=vijay;Initial Catalog=TRY;Integrated Security=True");

 

 

SqlDataAdapter adapter = new SqlDataAdapter("usp_GetCustomers", connection);

 

 

DataTable dt = new DataTable();

 

adapter.Fill(dt);

RadComboBox1.DataTextField =

"customerName";

 

RadComboBox1.DataValueField =

"customerid";

 

RadComboBox1.DataSource = dt;

RadComboBox1.DataBind();

 

//insert the first item

 

 

 

 

 

RadComboBox1.Items.Insert(0,

new RadComboBoxItem("- Select Customer -"));

 

 

this.Label4.Text = this.RadComboBox1.Text;

 

 

this.Label4.Text = this.comboValue.Value;

 

 

}

 

protected void LoadStoreID(string customerid)

 

{

 

this.Label4.Text = this.RadComboBox1.Text;

 

 

this.Label4.Text = this.comboValue.Value;

 

 

SqlCommand cmd = new SqlCommand("dbo.StoreID", new SqlConnection("Data Source=vijay;Initial Catalog=TRY;Integrated Security=True"));

 

 

//select a StoreID based on the CustomerID

 

 

 

 

 

 

//SqlDataAdapter adapter = new SqlDataAdapter("dbo.StoreID", cmd);

 

 

 

 

 

 

SqlDataAdapter adapter = new SqlDataAdapter(cmd);

 

cmd.CommandType =

CommandType.StoredProcedure;

 

 

 

//adapter.SelectCommand.Parameters.AddWithValue("@CustomerID", customerid);

 

 

 

 

 

cmd.Parameters.Add(

new SqlParameter("@CustomerID", customerid ));

 

 

DataTable dt = new DataTable();

 

adapter.Fill(dt);

cmd.Connection.Open();

RadComboBox2.DataTextField =

"storeid";

 

RadComboBox2.DataValueField =

"storeid";

 

RadComboBox2.DataSource = dt;

RadComboBox2.DataBind();

 

}

 

protected void LoadStoreName(string storeid)

 

{

 

SqlConnection connection = new SqlConnection("Data Source=vijay;Initial Catalog=TRY;Integrated Security=True");

 

 

//select a StoreID based on the CustomerID

 

 

 

 

 

 

SqlDataAdapter adapter = new SqlDataAdapter("SELECT name FROM StoreMaster WHERE storeid=@storeid", connection);

 

adapter.SelectCommand.Parameters.AddWithValue(

"@storeid", storeid);

 

 

DataTable dt = new DataTable();

 

adapter.Fill(dt);

RadComboBox3.DataTextField =

"Name";

 

RadComboBox3.DataValueField =

"name";

 

RadComboBox3.DataSource = dt;

RadComboBox3.DataBind();

}

 

protected void RadComboBox1_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)

 

{

LoadCustomerName();

 

}

 

protected void RadComboBox2_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)

 

{

 

// e.Text is the first parameter of the requestItems method

 

 

 

 

 

 

// invoked in LoadStoreID method

 

 

 

 

 

LoadStoreID(e.Text );

 

 

}

 

protected void RadComboBox3_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)

 

{

 

// e.Text is the first parameter of the requestItems method

 

 

 

 

 

 

// invoked in LoadStoreName method

 

 

 

 

 

LoadStoreName(e.Text);

}

 

protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)

 

{

}

}

}

My .ASPX File

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Combotry._Default" %>

 

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

head>

 

<

 

title = "ComboBox"></title>

 

</

 

head>

 

<

 

body >

 

 

<form runat="server" id="mainForm" method="post" style="width: 100%">

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

</telerik:RadScriptManager>

 

 

<script type="text/javascript">

 

 

var supressDropDownClosing = false;

 

 

function OnClientDropDownClosing(sender, eventArgs) {

 

eventArgs.set_cancel(supressDropDownClosing);

}

 

function OnClientSelectedIndexChanging(sender, eventArgs) {

 

eventArgs.set_cancel(supressDropDownClosing);

}

 

function OnClientDropDownOpening(sender, eventArgs) {

 

supressDropDownClosing =

true;

 

}

 

function OnClientBlur(sender) {

 

supressDropDownClosing =

false;

 

sender.toggleDropDown();

}

 

function checkboxClick() {

 

collectSelectedItems();

}

 

function getItemCheckBox(item) {

 

 

//Get the 'div' representing the current RadComboBox Item.

 

 

var itemDiv = item.get_element();

 

 

//Get the collection of all 'input' elements in the 'div' (which are contained in the Item).

 

 

var inputs = itemDiv.getElementsByTagName("input");

 

 

for (var inputIndex = 0; inputIndex < inputs.length; inputIndex++) {

 

 

var input = inputs[inputIndex];

 

 

//Check the type of the current 'input' element.

 

 

if (input.type == "checkbox") {

 

 

return input;

 

}

}

 

return null;

 

}

 

function collectSelectedItems() {

 

 

var combo = $find("<%= RadComboBox1.ClientID %>");

 

 

var items = combo.get_items();

 

 

var selectedItemsTexts = "";

 

 

var selectedItemsValues = "";

 

 

var itemsCount = items.get_count();

 

 

for (var itemIndex = 0; itemIndex < itemsCount; itemIndex++) {

 

 

var item = items.getItem(itemIndex);

 

 

var checkbox = getItemCheckBox(item);

 

 

//Check whether the Item's CheckBox) is checked.

 

 

if (checkbox.checked) {

 

selectedItemsTexts += item.get_text() +

", ";

 

selectedItemsValues += item.get_value() +

", ";

 

}

}

selectedItemsTexts = selectedItemsTexts.substring(0, selectedItemsTexts.length - 2);

selectedItemsValues = selectedItemsValues.substring(0, selectedItemsValues.length - 2);

 

//Set the text of the RadComboBox with the texts of the selected Items, separated by ','.

 

combo.set_text(selectedItemsTexts);

 

//Set the comboValue hidden field value with values of the selected Items, separated by ','.

 

 

//document.getElementById("comboValue").value = selectedItemsValues;

 

 

//Clear the selection that RadComboBox has made internally.

 

 

if (selectedItemsValues == "") {

 

combo.clearSelection();

}

}

 

</script>

 

 

 

<div>

 

 

<asp:Label ID="Label1" runat="server"

 

 

style="z-index: 1; left: 162px; top: 38px; position: absolute; height: 20px; width: 112px">

 

CustomerID

 

</asp:Label>

 

 

<input type="hidden" id="comboValue" value="" runat="server" />

 

 

<telerik:RadComboBox ID="RadComboBox1"

 

 

runat="server"

 

 

OnClientSelectedIndexChanging="LoadCustomerName"

 

 

OnItemsRequested="RadComboBox1_ItemsRequested"

 

 

style="z-index: 1; left: 284px; top: 38px; position: absolute; height: 20px; width: 160px"

 

 

AllowCustomText="True" HighlightTemplatedItems="True"

 

 

onclientdropdownopening="OnClientDropDownOpening"

 

 

OnClientDropDownClosing="OnClientDropDownClosing"

 

 

OnClientBlur="OnClientBlur" DataTextField="CustomerName"

 

 

DataValueField="CustomerID" Skin="Web20">

 

 

<ItemTemplate>

 

 

<asp:CheckBox runat="server" ID="CheckBox" onclick="checkboxClick();" Text='<%# DataBinder.Eval(Container, "Text") %>' />

 

 

</ItemTemplate>

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

</telerik:RadComboBox>

 

 

<asp:SqlDataSource ID="DataSourceforCustomers" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:ULTIMATE_NEWConnectionString %>"

 

 

SelectCommand="usp_GetCustomers" SelectCommandType="StoredProcedure">

 

 

</asp:SqlDataSource>

 

 

<asp:Label ID="Label2" runat="server"

 

 

style="z-index: 1; left: 537px; top: 38px; position: absolute; height: 20px; width: 83px">

 

StoreID:

 

</asp:Label>

 

 

<telerik:RadComboBox ID="RadComboBox2"

 

 

runat="server"

 

 

Width="186px"

 

 

OnClientSelectedIndexChanging="LoadStoreName"

 

 

OnClientItemsRequested="ItemsLoaded"

 

 

OnItemsRequested="RadComboBox2_ItemsRequested"

 

 

style="z-index: 1; left: 634px; top: 38px; position: absolute; height: 20px; width: 160px"

 

 

DataTextField="StoreID" DataValueField="StoreID" Skin="Web20">

 

 

<ItemTemplate>

 

 

<asp:CheckBox runat="server" ID="CheckBox" onclick="checkboxClick();" Text='<%# DataBinder.Eval(Container, "Text") %>' />

 

 

</ItemTemplate>

 

<

 

CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

</telerik:RadComboBox>

 

 

<asp:SqlDataSource ID="DataSourceforStoreID" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:ULTIMATE_NEWConnectionString %>"

 

 

SelectCommand="StoreID" SelectCommandType="StoredProcedure">

 

 

<SelectParameters>

 

 

<asp:ControlParameter ControlID="RadComboBox1" Name="CustomerID"

 

 

PropertyName="SelectedValue" Type="String" />

 

 

</SelectParameters>

 

 

</asp:SqlDataSource>

 

 

<asp:Label ID="Label3" runat="server"

 

 

style="z-index: 1; left: 907px; top: 38px; position: absolute; height: 20px; width: 103px; right: 599px;">

 

StoreName:

 

</asp:Label>

 

 

<telerik:RadComboBox ID="RadComboBox3"

 

 

runat="server"

 

 

Width="186px"

 

 

OnClientItemsRequested="ItemsLoaded"

 

 

OnItemsRequested="RadComboBox3_ItemsRequested"

 

 

style="z-index: 1; left: 1024px; top: 38px; position: absolute; height: 20px; width: 160px" Skin="Web20">

 

<

 

CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

</telerik:RadComboBox>

 

 

</div>

 

 

<script type="text/javascript">

 

 

//global variables for the countries and cities comboboxes

 

 

var StoreIDCombo;

 

 

var StoreNameCombo;

 

 

function pageLoad() {

 

 

// initialize the global variables

 

 

// in this event all client objects

 

 

// are already created and initialized

 

StoreIDCombo = $find(

"<%= RadComboBox2.ClientID %>");

 

StoreNameCombo = $find(

"<%= RadComboBox3.ClientID %>");

 

}

 

 

function LoadCustomerName(combo, eventArqs) {

 

 

var item = eventArqs.get_item();

 

StoreIDCombo.set_text(

"Loading...");

 

StoreNameCombo.clearSelection();

 

// if a continent is selected

 

 

if (item.get_index() > 0) {

 

 

// this will fire the ItemsRequested event of the

 

 

// StoreID combobox passing the CustomerName as a parameter

 

StoreIDCombo.requestItems(item.get_value(), checkboxClick);

}

 

if (checkbox.checked) {

 

selectedItemsTexts += item.get_text() +

", ";

 

selectedItemsValues += item.get_value() +

", ";

 

}

 

}

 

function LoadStoreName(combo, eventArqs) {

 

 

var item = eventArqs.get_item();

 

StoreNameCombo.set_text(

"Loading...");

 

 

// this will fire the ItemsRequested event of the

 

 

// StoreName combobox passing the StoreID as a parameter

 

StoreNameCombo.requestItems(item.get_value(),

false );

 

}

 

function ItemsLoaded(combo, eventArqs) {

 

 

if (combo.get_items().get_count() > 0) {

 

 

// pre-select the first item

 

combo.set_text(combo.get_items().getItem(0).get_text());

combo.get_items().getItem(0).highlight();

}

combo.showDropDown();

}

 

function collectSelectedItems() {

 

 

var combo =$find ("<%= RadComboBox1.ClientID %>");

 

 

var items = combo.get_items();

 

 

var selectedItemsTexts = "";

 

 

var selectedItemsValues = "";

 

 

var itemsCount = items.get_count();

 

 

for (var itemIndex = 0; itemIndex < itemsCount; itemIndex++) {

 

 

var item = items.getItem(itemIndex);

 

 

var checkbox = getItemCheckBox(item);

 

 

//Check whether the Item's CheckBox) is checked.

 

 

if (checkbox.checked) {

 

selectedItemsTexts += item.get_text() +

", ";

 

selectedItemsValues += item.get_value() +

", ";

 

}

}

selectedItemsTexts = selectedItemsTexts.substring(0, selectedItemsTexts.length - 2);

selectedItemsValues = selectedItemsValues.substring(0, selectedItemsValues.length - 2);

 

//Set the text of the RadComboBox with the texts of the selected Items, separated by ','.

 

combo.set_text(selectedItemsTexts);

 

//Set the comboValue hidden field value with values of the selected Items, separated by ','.

 

}

 

</script>

 

 

<p>

 

 

&nbsp;</p>

 

 

 

<asp:Label ID="Label4" runat="server"

 

 

style="z-index: 1; left: 10px; top: 95px; position: absolute; height: 149px; width: 418px"

 

 

Text="Label"></asp:Label>

 

 

 

</form>

 

</

 

body>

 

</

 

html>

 

Test Test
Top achievements
Rank 1
 answered on 11 Dec 2009
3 answers
266 views
I have a tooltip right above an asp button that I would like to use as a notification when an update is successful. However, I set the toolTip.visible to true and the tooltip never shows. Any ideas why? Here is my aspx
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/admin/Admin.Master"
    CodeBehind="EditEntity.aspx.vb" Inherits="ClickableCommunity.EditEntity" %>

<%@ Register Assembly="RadMenu" Namespace="Telerik.WebControls" TagPrefix="radM" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <telerik:RadScriptBlock ID="ScriptBlock1" runat="server">

        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAANvmC5YwARPSDAHoiTGyjXRSmfv2uK-bEd6eXTQY7EyaTpVn3FxSr013tT5OlQzrX6y2uOmRLFFdYTw"
            type="text/javascript"></script>

        <script type="text/javascript">
            var map;
            var geocoder;
            globalLat = 40.7001;
            globalLon = -99.0844;

            function map_initialize() {

                //if the browser is compatible with the gmap api
                if (GBrowserIsCompatible()) {

                    //initialize the map
                    map = new GMap2(document.getElementById('entityMap'));

                    //add the controls
                    map.addControl(new GLargeMapControl());
                    map.addControl(new GMenuMapTypeControl());
                    map.setCenter(new GLatLng(globalLat, globalLon), 15);

                    //enable the zooming
                    map.enableDoubleClickZoom();
                    map.enableScrollWheelZoom();

                    //add the marker and set the drag to true
                    globalMarker = new GMarker(map.getCenter(), { draggable: true });

                    //these should get the object of the rad textbox
                    var templat = $find('<%= latInput.ClientID %>');
                    var templon = $find('<%= lonInput.ClientID %>');

                    //if they drag the marker
                    GEvent.addListener(globalMarker, 'dragend',

                        function(p) {
                            map.panTo(p);

                            //set the textboxes to the latitude and long
                            templat.set_value(map.getCenter().lat().toFixed(6));
                            templon.set_value(map.getCenter().lng().toFixed(6));

                        } //function(p)

                    ); //GEvent.addListener

                    //add the marker
                    map.addOverlay(globalMarker);

                    //add the geocoder
                    geocoder = new GClientGeocoder();

                } //if gbrowsercompatible

            } //map_initialize

            function map_geocode(address) {
                geocoder.getLatLng(address,
                        function(p) {

                            if (p) {
                                map.panTo(p);
                            } //if (p)

                            else {
                                alert('Sorry, the geocoder failed to locate the specified address :-(');
                            } //else
                        } //function
                    ); //geocoder.getLatLng
            } //map_geocode

            GEvent.addDomListener(window, 'load', map_initialize);

            //this function will get the latitude and longitude
            //for a given address and set a tool tip to visible
            //if it can't find the address.
            function getLatLon(sender, args) {

                //we only do something if the over ride button
                //is not checked
                var street = $find('<%= streetInput.ClientID %>').get_value();
                var city = $find('<%= cityInput.ClientID %>').get_value();
                var state = $find('<%= stateInput.ClientID %>').get_value();
                var zip = $find('<%= zipInput.ClientID %>').get_value();
                var address = (street + ", " + city + " " + zip);

                geocodeAddress(address);
            } //getLatLon

            //this function takes in an address and returns
            //the lattitude and longitude.
            function geocodeAddress(address) {
                var coder = new GClientGeocoder();
                coder.getLatLng(address,
                              function(point) {
                                  //the id of the tool tip
                                  var toolTip = $find("<%= cantFindLocation.ClientID %>");
                                  if (!point) {

                                      //show the tool tip if it is hidden
                                      if (!toolTip.isVisible()) {
                                          toolTip.show();
                                      } //if
                                      //the tool tip is showing and the clicked the link
                                      else {
                                          toolTip.set_text("Still no dice, <a href=\"#\" onclick=\"getLatLon()\">" +
                                                           "try again</a> or get them <a href=\"" +
                                                           "http://itouchmap.com/latlong.html\" target=\"_blank\"" +
                                                           ">manually</a>.");
                                      } //else
                                  } //if
                                  //we set the textboxes to their values
                                  else {

                                      //reset the global lat and long
                                      //and call the function to reload
                                      //the map
                                      var templat = $find('<%= latInput.ClientID %>');
                                      var templon = $find('<%= lonInput.ClientID %>');
                                      templat.set_value(point.lat());
                                      templon.set_value(point.lng());
                                      globalLat = point.lat();
                                      globalLon = point.lng();
                                      map_initialize();

                                      //hide the tooltip if its showing
                                      if (toolTip.isVisible()) {
                                          toolTip.hide();
                                      }

                                  } //else
                              } //function(point)
                            );
            } //geocodeAddress
        </script>

    </telerik:RadScriptBlock>
    <style type="text/css">
        .radfdSkinnedFormButton radfd_Web20
        {
            text-align: center !important;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="header" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadFormDecorator ID="decorator" Skin="Web20" DecoratedControls="Buttons"
        runat="server" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
        <table class="entityTable">
            <tr>
                <td width="410px">
                    <table>
                        <tr>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">Select Entity</span>
                                    <telerik:RadComboBox ID="businessNameDrop" runat="server" Skin="Web20" Width="150px"
                                        MarkFirstMatch="True" DropDownWidth="150px" CssClass="stateDropDownText" Font-Size="16px"
                                        AutoPostBack="true">
                                        <CollapseAnimation Duration="1000" Type="InOutBack" />
                                    </telerik:RadComboBox>
                                    <asp:SqlDataSource ID="businessDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:connectionString %>"
                                        SelectCommand="getAllBusinesses" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                                </center>
                            </td>
                            <td class="addBusinessSpacing">
                            </td>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">Entity Name</span>
                                    <telerik:RadTextBox ID="entityNameInput" runat="server" Skin="Web20" Width="150px">
                                    </telerik:RadTextBox>
                                </center>
                            </td>
                        </tr>
                        <tr>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">Category</span>
                                    <telerik:RadComboBox ID="categoryDrop" runat="server" Skin="Web20" Width="150px"
                                        MarkFirstMatch="True" DropDownWidth="150px" CssClass="stateDropDownText" Font-Size="16px"
                                        DataSourceID="categoriesDataSource" DataTextField="name" DataValueField="categoryid">
                                        <CollapseAnimation Duration="1000" Type="InOutBack" />
                                    </telerik:RadComboBox>
                                    <asp:SqlDataSource ID="categoriesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:connectionString %>"
                                        SelectCommand="getAllAttractionCategories" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                                </center>
                            </td>
                            <td class="addBusinessSpacing">
                            </td>
                            <td>
                                <span class="adminTableLabel">Description</span>
                                <center>
                                    <table>
                                        <tr>
                                            <td>
                                                <telerik:RadTextBox ID="descInput" runat="server" Skin="Web20" Height="150px" Width="150px"
                                                    Wrap="true" TextMode="MultiLine">
                                                </telerik:RadTextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </center>
                            </td>
                        </tr>
                        <tr>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">Street Address</span>
                                    <telerik:RadTextBox ID="streetInput" runat="server" Skin="Web20" Width="150px">
                                    </telerik:RadTextBox>
                                </center>
                            </td>
                            <td class="addBusinessSpacing">
                            </td>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">City</span>
                                    <telerik:RadTextBox ID="cityInput" runat="server" Skin="Web20" Width="150px">
                                    </telerik:RadTextBox>
                                </center>
                            </td>
                            <td class="tableColumn">
                                <telerik:RadToolTip runat="server" ID="overRideTip" Skin="Web20" Height="60px" Width="250px"
                                    Position="TopRight" RelativeTo="Element" TargetControlID="overRide" AutoCloseDelay="5000"
                                    IsClientID="true">
                                    <span class="normalText">Check this if you would like to enter the latitude and longitude
                                        manually.</span>
                                </telerik:RadToolTip>
                            </td>
                        </tr>
                        <tr>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">State</span>
                                    <telerik:RadComboBox ID="stateInput" runat="server" Skin="Web20" Width="150px" ChangeTextOnKeyBoardNavigation="true"
                                        MarkFirstMatch="true" DropDownWidth="150px" CssClass="stateDropDownText" Font-Size="16px">
                                        <CollapseAnimation Duration="1000" Type="InOutBack" />
                                        <Items>
                                            <telerik:RadComboBoxItem Text="Alabama" Value="AL" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Alaska" Value="AK" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Arizona" Value="AZ" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Arkansas" Value="AR" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="California" Value="CA" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Colorado" Value="CO" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Connecticut" Value="CT" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Delaware" Value="DE" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="District Of Columbia" Value="DC" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Florida" Value="FL" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Georgia" Value="GA" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Hawaii" Value="HI" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Idaho" Value="ID" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Illinois" Value="IL" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Indiana" Value="IN" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Iowa" Value="IA" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Kansas" Value="KS" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Kentucky" Value="KY" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Louisiana" Value="LA" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Maine" Value="ME" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Maryland" Value="MD" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Massachusetts" Value="MA" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Michigan" Value="MI" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Minnesota" Value="MN" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Mississippi" Value="MS" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Missouri" Value="MO" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Montana" Value="MT" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Nebraska" Value="NE" CssClass="stateDropDownText"
                                                Selected="true" />
                                            <telerik:RadComboBoxItem Text="Nevada" Value="NV" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="New Hampshire" Value="NH" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="New Jersey" Value="NJ" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="New Mexico" Value="NM" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="New York" Value="NY" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="North Carolina" Value="NC" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="North Dakota" Value="ND" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Ohio" Value="OH" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Oklahoma" Value="OK" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Oregon" Value="OR" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Pennsylvania" Value="PA" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Rhode Island" Value="RI" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="South Carolina" Value="SC" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="South Dakota" Value="SD" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Tennessee" Value="TN" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Texas" Value="TX" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Utah" Value="UT" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Vermont" Value="VT" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Virginia" Value="VA" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Washington" Value="WA" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="West Virginia" Value="WV" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Wisconsin" Value="WI" CssClass="stateDropDownText" />
                                            <telerik:RadComboBoxItem Text="Wyoming" Value="WY" CssClass="stateDropDownText" />
                                        </Items>
                                    </telerik:RadComboBox>
                                </center>
                            </td>
                            <td class="addBusinessSpacing">
                            </td>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">Zip</span>
                                    <telerik:RadTextBox ID="zipInput" runat="server" Skin="Web20" Width="150px">
                                    </telerik:RadTextBox>
                                    <asp:RegularExpressionValidator ID="reZipCode" ControlToValidate="zipInput" ValidationExpression="^((\d{5}){1}|^(\d{5}-\d{4}){1}){1}"
                                        ErrorMessage="Please enter a valid zip code." Display="Dynamic" runat="server"
                                        CssClass="errorMessage" />
                                    <telerik:RadToolTip runat="server" ID="cantFindLocation" Skin="Web20" Height="100px"
                                        Width="400px" ManualClose="true" Position="TopRight" RelativeTo="Element" TargetControlID="streetInput">
                                        <span class="normalText">I can't find the address you specified. Please make sure that
                                            it is typed in correctly. If you would like to manually find the latitude and longitude,
                                            go to <a href="http://itouchmap.com/latlong.html" target="_blank">here</a> and get
                                            the coordinates. <a href="#" onclick="getLatLon()">Look Again</a> </span>
                                    </telerik:RadToolTip>
                                </center>
                            </td>
                        </tr>
                        <tr>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">Latitude</span>
                                    <telerik:RadTextBox ID="latInput" runat="server" Skin="Web20" Width="150px">
                                    </telerik:RadTextBox>
                                </center>
                            </td>
                            <td class="addBusinessSpacing">
                            </td>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">Longitude</span>
                                    <telerik:RadTextBox ID="lonInput" runat="server" Skin="Web20" Width="150px">
                                    </telerik:RadTextBox>
                                </center>
                            </td>
                            <td class="tableColumn">
                                <a href="#" onclick="getLatLon()" style="font-size: 11px; font-family: Arial;">Find
                                    on map </a>
                            </td>
                        </tr>
                        <tr>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">Website</span>
                                    <telerik:RadTextBox ID="siteInput" runat="server" Skin="Web20" Width="150px">
                                    </telerik:RadTextBox>
                                </center>
                            </td>
                            <td class="addBusinessSpacing">
                            </td>
                            <td class="tableColumn">
                                <center>
                                    <span class="adminTableLabel">Phone Number</span>
                                    <telerik:RadTextBox ID="phoneInput" runat="server" Skin="Web20" Width="150px">
                                    </telerik:RadTextBox>
                                </center>
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <td>
                                <table style="margin-left: 140px">
                                    <tr>
                                        <td>
                                            <telerik:RadToolTip ID="toolTip" Skin="Web20"
                                                Position="TopRight" runat="server" Height="100" Width="300"
                                                RelativeTo="Element" HideDelay="25"
                                                TargetControlID="addEntity" VisibleOnPageLoad="false">
                                                </telerik:RadToolTip>
                                            <asp:Button ID="addEntity" runat="server" Text="Change" /><br />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <center>
                                    <asp:Label ID="output" runat="server" Text=""></asp:Label></center>
                            </td>
                        </tr>
                    </table>
                </td>
                <td class="entityMapClass">
                    <div id="entityMap">
                    </div>
                </td>
            </tr>
        </table>
        <asp:SqlDataSource ID="usersDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:connectionString %>"
            SelectCommand="returnAllNonAdminUsers" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
        <asp:Label Style="visibility: hidden;" ID="hiddenJs" runat="server" Text=""></asp:Label>
    </telerik:RadAjaxPanel>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" SkinID="Web20"
        Height="75px" Transparency="10" BackgroundPosition="Center">
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.LoadingProgressBar.gif") %>'
            style="border: 0px;" />
    </telerik:RadAjaxLoadingPanel>
</asp:Content>

And here is my vb
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports Telerik.Web.UI

Partial Public Class EditEntity
    Inherits System.Web.UI.Page

    'my connection string
    Dim conn As String = System.Configuration.ConfigurationManager.ConnectionStrings("connectionString").ToString

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        'populate the dropdown
        Dim tableOfData As DataTable = createTable()
        businessNameDrop.DataSource = tableOfData
        businessNameDrop.DataTextField = "text"
        businessNameDrop.DataValueField = "id"
        businessNameDrop.DataBind()

    End Sub

    'this fires when they change the business name drop down box
    Private Sub businessNameDrop_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles businessNameDrop.SelectedIndexChanged

        If (businessNameDrop.Text <> "- Please Select -") Then

            'the id
            Dim entityId As Integer = businessNameDrop.SelectedValue

            'set the entity name to the name
            entityNameInput.Text = businessNameDrop.SelectedItem.Text

            'my sql connection
            Dim myConn As New Data.SqlClient.SqlConnection(conn)

            'the name of the stored procedure
            Dim strSQL = "getEntityInfo"

            Dim returnCommand As New Data.SqlClient.SqlCommand(strSQL, myConn)

            'add the parameters
            returnCommand.Parameters.AddWithValue("@entityId", entityId)

            'tell the system it is a stored procedure
            returnCommand.CommandType = CommandType.StoredProcedure

            Try
                myConn.Open()
                Dim dr As SqlDataReader = returnCommand.ExecuteReader()

                While dr.Read()

                    'set all of the textboxes to the input
                    streetInput.Text = dr.Item(0).ToString
                    cityInput.Text = dr.Item(1).ToString
                    stateInput.SelectedValue = dr.Item(2).ToString
                    zipInput.Text = dr.Item(3).ToString
                    latInput.Text = dr.Item(4).ToString
                    lonInput.Text = dr.Item(5).ToString
                    phoneInput.Text = dr.Item(6).ToString
                    siteInput.Text = dr.Item(7).ToString
                    descInput.Text = dr.Item(8).ToString
                    categoryDrop.SelectedValue = dr.Item(9)

                End While 'while dr.read()

            Catch ex As Exception

                output.Text = ("<span class='textRed'>There was an error in retrieving the entity information,<br>" & _
                               " please contact the system administrator if the problem persists.</span>")

            End Try

        End If 'if businessNameDrop.text

    End Sub

    'if they click the add button
    Protected Sub addEntity_Click(ByVal sender As Object, ByVal e As EventArgs) Handles AddEntity.Click

        'a boolean if the form submission was successful
        Dim success As Boolean = True

        'all of the user input
        Dim entityId As Integer = businessNameDrop.SelectedValue
        Dim entityName As String = entityNameInput.Text
        Dim street As String = streetInput.Text
        Dim city As String = cityInput.Text
        Dim state As String = stateInput.SelectedValue
        Dim website As String = siteInput.Text
        Dim phone As String = phoneInput.Text
        Dim zip As Integer = CInt(zipInput.Text)
        Dim lat As String = CDbl(latInput.Text)
        Dim lon As String = CDbl(lonInput.Text)
        Dim fkCatId As Integer = categoryDrop.SelectedValue
        Dim desc As String = descInput.Text

        'my sql connection
        Dim myConn As New Data.SqlClient.SqlConnection(conn)

        'the name of the stored procedure
        Dim strSQL = "updateEntity"

        Dim insertCommand As New Data.SqlClient.SqlCommand(strSQL, myConn)

        'add all of the parameters
        insertCommand.Parameters.AddWithValue("@entityId", entityId)
        insertCommand.Parameters.AddWithValue("@entityName", entityName)
        insertCommand.Parameters.AddWithValue("@street", street)
        insertCommand.Parameters.AddWithValue("@city", city)
        insertCommand.Parameters.AddWithValue("@state", state)
        insertCommand.Parameters.AddWithValue("@zip", zip)
        insertCommand.Parameters.AddWithValue("@lat", lat)
        insertCommand.Parameters.AddWithValue("@lon", lon)
        insertCommand.Parameters.AddWithValue("@phone", phone)
        insertCommand.Parameters.AddWithValue("@website", website)
        insertCommand.Parameters.AddWithValue("@desc", desc)
        insertCommand.Parameters.AddWithValue("@fkCatId", fkCatId)

        'tell the system its a stored procedure
        insertCommand.CommandType = CommandType.StoredProcedure

        Try
            myConn.Open()
            insertCommand.ExecuteNonQuery()
        Catch ex As Exception
            toolTip.Text = "<span style='color:red;'>There was an error in adding the Place.<br>" & _
                          "Please contact the system administrator if the problem persists. "
            'output.Text = ex.ToString
            toolTip.Visible = True
            success = False
        Finally
            myConn.Close()
        End Try

        If (success) Then

            toolTip.Visible = True
            toolTip.Text = "<span class='successText'>The entity was successfully updated.</span>"

        End If
    End Sub
    'this sub returns a data table to bind to the dropdown
    Private Function createTable()

        'a new data table
        Dim table As DataTable = New DataTable()
        table.Columns.Add("id")
        table.Columns.Add("text")

        'my sql connection
        Dim myConn As New Data.SqlClient.SqlConnection(conn)

        'the name of the stored procedure
        Dim strSQL = "getAllBusinesses"

        'add the initial - Please Select -
        table.Rows.Add(New String() {"-1", "- Please Select -"})

        Try

            myConn.Open()
            Dim readCommand As New Data.SqlClient.SqlCommand(strSQL, myConn)

            'while we have rows from the stored procedure
            'we will add them to a data table
            Dim cdr As SqlDataReader = readCommand.ExecuteReader()
            While cdr.Read()

                If (cdr.Item(0).ToString <> "") Then

                    table.Rows.Add(New String() {cdr.Item(0), cdr.Item(1)})

                End If

            End While 'while cdr.Read()

        Catch ex As Exception
            output.Text = "There was an internal error. Please reload the page.<br>" & _
                        "If the problem persists, contact the system administrator"
        End Try
        myConn.Close()

        Return table

    End Function 'createTable
End Class

Thanks,
Svetlina Anati
Telerik team
 answered on 11 Dec 2009
3 answers
121 views
is there a way to assign the skin to templated controls based on the parent controls skin? or is there an eay way to assign the skin based on formdecorator?
Dimo
Telerik team
 answered on 11 Dec 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?