You are on page 1of 2

AYUDAS:

Para poner un Datepicker en un input dentro de un DataTable:

$("input[id^='txtExpiration_']").each(function() { $.datepicker.setDefaults($.datepicker.regional[""]); $('#' + this.id).datepicker({ showButtonPanel: true, changeMonth: true, changeYear: true, dateFormat: 'mm-dd-yy', onSelect: function (dateText, inst) { $("#txtExpirationId").val(dateText.substr(0, 10)); } }); }); Se hace un ciclo y cuando encuentra los ids que comienzan con txtExpiration_

le coloca el

datepicker.
NO USAR DATATABLE A MENOS QUE SE NECESITEN FILTRAR Y/ O OARDENAR LAS COLUMNAS. Para armar un Dll del lado del servidor:

private void LoadListDivision() { ddlDivisionSelect.DataSource = Division.GetAll(); ddlDivisionSelect.DataTextField = "CodeAndName"; ddlDivisionSelect.DataValueField = "DivisionId"; ddlDivisionSelect.DataBind(); ListItem li = new ListItem("Select My Division 1995", "0"); ddlDivisionSelect.Items.Insert(0, li); }

Para obtener el valor seleccionado del Dll:

var DivisionId = GetElementById("ddlDivisionSelect")[GetElementById("ddlDivisionSelect").selectedIndex].va lue; Cuando arma una Tabla complete en C#, usando HtmlTable, antes de retornar se debe hacer la siguiente conversin:

string html; using (StringWriter sw = new StringWriter()) { tblCustomField.RenderControl(new HtmlTextWriter(sw)); html = sw.ToString(); } Y devolvemos el html.

You might also like