We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Add a check box control in gribweb

Help me.

I have Gridweb that bind with a table got of the next store procedure

ALTER PROCEDURE [QUERIES].[spUploadSpecif_GetSpecificationsStatus]
@specification nvarchar(4000) = null,
@product nvarchar(50) = null,
@side int
AS
BEGIN
SET NOCOUNT ON;
declare @XmlHandle int
declare @outSpecificationID int
EXEC sp_xml_preparedocument @XmlHandle output, @specification
SELECT IDENTITY(int, 1,1) as id, *
INTO #specification
FROM OPENXML (@XmlHandle, '/root/SPEC',1)
WITH (E nvarchar(10), D float, T float,M float,C float,P nvarchar(50),R nvarchar(10),S nvarchar (10))

select s.E, s.D as Diam, s.T as Thick, s.M as Mand, s.C as Coup, s.P as Plano, s.R as Rev, s.S as Subn ,case when (select count(*) from EPREMIUM.ESPECIFICACIONES SP
where SP.DIAMETRO = s.D and SP.ESPESOR = s.T and SP.MANDRIL = s.M and SP.DIAM_EXT_COPLE = s.C and SP.PRODUCTO=@product and SP.CVE_LADO=@side )> 0 then cast('True' as bit) else cast('False' as bit) end as [Exists], e.MATRICULA1 as Firma1, e.MATRICULA2 as Firma2, case when (select count(*) from EPREMIUM.ESPECIFICACIONES SP
where SP.DIAMETRO = s.D and SP.ESPESOR = s.T and SP.MANDRIL = s.M and SP.DIAM_EXT_COPLE = s.C and SP.PRODUCTO=@product and SP.CVE_LADO=@side )> 0 then cast('False' as bit) else cast('True' as bit) end as [Pasar]
into #tmp
from EPREMIUM.ESPECIFICACIONES E right join #specification s
on E.DIAMETRO = s.D and E.ESPESOR = s.T and E.MANDRIL = s.M and E.DIAM_EXT_COPLE = s.C and E.PRODUCTO = @product and E.CVE_LADO = @side
group by id, s.E, s.D , s.T , s.M, s.C ,s.P, s.R, s.S,e.MATRICULA1, e.MATRICULA2
order by id

select * from #tmp

END

in the "Pasar" column your value is showed with a check box, this value may be modified by the user, but when is checked/uncheked by the user and the values of the gridweb are readed to set in the database, the screen show me the next error:

System.nullreferenceException: Reference to object not established like instance of an object

Thanks by your help

Hi,

Thanks for considering Aspose.

Which version of Aspose.Grid.Web you are using. Could you try the latest version 1.9.3

https://www.nuget.org/packages/Aspose.Cells.GridWeb

Thank you.

Hi...

I´m using the aspose.grid.web, and I saw that the aspose.grid.desktop allows to add buttons, checkbox and ComboBox, but the aspose.grid.web hasn´t this option, then what do I do for to change the values of the column that contain to the checkbox, using the click event?

Thank you

Hi,

Well, I don't find the problem you are describing. Aspose.Grid.Web supports to apply checkbox and dropdownlist validation but not an individual controls, please check:

And if your data source column yes/no column type, Aspose.Grid.Web will automatically places checkbox validation for that column values and you may check / uncheck the values. I am not sure what's going wrong with you. any how you may try to code for that column :

E.g, in the page load event before binding your sheet data, you may add a few lines to off the checkbox validation type for that column:

Validation v1 = new Validation();

v1.ValidationType = ValidationType.AnyValue;

sheet.BindColumns["ColumnName"].Validation = v1;

And could you create a sample project with data source, zip the project and post it here to reproduce the problem. Also mention your details like OS, env. IIS settings, browser type, .NET framework etc.

Thank you.