On rowupdating event

26 Apr

Note: Instead of using Text Box in normal mode use Labels.

I am not able to get the changed values that i enter in the grid view .

For example, you can set the Command Name property to Sort and set the Command Argument property to Ascending to specify a command to sort in ascending order.

Command Name: Command Name property to determine the command to perform.

The Command Argument property complements the Command Name property by allowing you to provide any additional information for the command to perform.

I will also show you that how you can use validation against the Drop Down List control which is contained inside the Grid View control.

NETn Grid View Rg[Ńf[^\[X̓e\ɂ́Hvō쐬TvɁA݂̍̂ĂBGrid View Rg[̗̂̂[email protected]ɂ‚ẮATIPSĂQƂB Data Keysvpe B𗘗p @ō쐬̂́Amڍׁn{^Nb NƁAΉs̏ڍ׃y[WɈړƂTvłBړ́A @Obh\Ɋ܂܂L[̃XǵAGrid View Rg[Data Keysvpe BĎ擾łBData Keysvpe B́AL[̒l Xg Data Key Array Iu WFNgi System. Redirect\bhŃ_CNgsłB @ȏ𗝉łATvsĂ݂悤Bmڍׁn{^Nb N邱ƂŁAꂼ̍sɑΉڍ׃y[W\ΐłB @ȂA{Tv𓮍삷邤ŒӂĂ_Aȉɂ܂Ƃ߂ĂB i1j Data Key Namesvpe Bݒ肳Ă邩 @Data Key Namesvpe B́AGrid View Rg[Ƀo Chꂽf[^\[X̎L[\BGrid View Rg[́A̐ݒɊÂāAData Keysvpe BɎL[l Zbg BL[l擾悤ƂƁAOĂ܂Ƃꍇɂ́AData Key Namesvpe Bݒ肳Ă邩ǂm FĂق i2j Command Namevpe Bɂ锻͕Khg Detailsh̏ꍇɂ̂݁A_CNgsĂj B @A_炢Ă܂ƁȀ͕sŒłBɁu Ifcc End Ifvɂ폜ŁATvs AmҏWn{^Nb NĂ݂ĂقBƁAmڍׁn{^Nb NꍇƓl Ay[WړĂ܂B @̂Ƃ炢̂́ARow Command Cxg Button Fieldt B[h Nb Nꍇɂ̂ݔ킯ł͂ȂƂƂBCommand Fieldt B[h̃h Eh E{^Nb N^C~OŎs R[hi FC#AFVBj @ł́Aݍsf[^słꍇɂ̂݌㑱̏sĂ킯BRow Data Bound CxǵAwb_^tb^sy[WsȂǁAׂĂ̍sɂ‚Ĕ邽߁ALqɓĂ͕Ks̎ނŕs Kv B @ɁAL[iisbnj\Z擾BOq悤ɁAGrid View Row Iu WFNg•ʂ̃Zi Data Control Field Cell Iu WFNgjɃANZXɂ́ACellsvpe BɃANZX΂悢Bł́AɂControlsvpe BāAzɔzuĂ0Ԗڂ̎q Rg[擾Ă킯BButton Fieldt B[h Button Rg[擾łB @Ƃ́AButton.

Command Argumentvpe BɁAData Keysvpe BĎ擾L[l Zbg邾BData Keysvpe Bɓnsԍ́AGrid View Row.

The "Description" and "Choose" columns are template columns.

The Grid View looks something like this: If you carefully read the HTML code of the Grid View which I have posted above then you will notice one very special thing.